Plugin Directory

Changeset 538430


Ignore:
Timestamp:
05/01/2012 05:24:23 AM (14 years ago)
Author:
JohnRazmus
Message:

Add all plugin files

Location:
qodys-pinner/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • qodys-pinner/trunk/frwk.php

    r538404 r538430  
    5252
    5353$fields = array();
    54 $fields['qodys-framework'] = '2.3.2';
     54$fields['qodys-framework'] = '2.3.3';
    5555
    5656foreach( $fields as $key => $value )
  • qodys-pinner/trunk/overseers/pinner/index.php

    r538404 r538430  
    1212            add_action( 'the_content', array( $this, 'InsertWidgetToContent' ) );
    1313            add_action( 'wp_footer', array( $this, 'InsertWidgetJavascript' ) );
     14        }
     15       
     16        // needs to happen after parent construct to load assets
     17        if( $this->get_option('use_pin_overlay') == 'yes' )
     18        {
     19            add_action( 'the_content', array( $this, 'InsertOverlayToContent' ) );
     20            add_action( 'template_redirect', array( $this, 'InsertOverlayCode' ) );
    1421        }
    1522       
     
    5461        // only show widget on selected post types
    5562        if( !in_array( $post->post_type, $post_types ) )
    56             return;
     63            return $content;
    5764       
    5865        // build widget code
     
    94101        }
    95102       
    96         $content .= '<style>'.$this->get_option('pin_widget_text').'</style>';
     103        return $content;
     104    }
     105   
     106    function InsertOverlayToContent( $content = '' )
     107    {
     108        global $post;
     109       
     110        // recall system variables
     111        $post_types = is_array( $this->get_option('pin_overlay_post_types') ) ? $this->get_option('pin_overlay_post_types') : array();
     112       
     113        // only show widget on selected post types
     114        if( !in_array( $post->post_type, $post_types ) )
     115            return $content;
     116       
     117        // this is what we can latch onto when adding stuff to images
     118        $content = '<span id="qody_pinner_content_container">'.$content.'</span>';
    97119       
    98120        return $content;
     
    128150    }
    129151   
     152    function InsertOverlayCode()
     153    {
     154        global $post;
     155       
     156        // recall system variables
     157        $count_layout = $this->get_option('pin_overlay_display_type');
     158        $post_types = is_array( $this->get_option('pin_overlay_post_types') ) ? $this->get_option('pin_overlay_post_types') : array();
     159       
     160        $clear = '<div style="clear:both;"></div>';
     161       
     162        // only show widget on selected post types
     163        if( !in_array( $post->post_type, $post_types ) )
     164            return;
     165       
     166        $fields = array();
     167        $fields['description'] = $this->FilterForDynamicPostVariables( $this->get_option('pin_overlay_text') );
     168        $fields['url'] = get_permalink( $post->ID );
     169       
     170        $this->RegisterScript( 'pin_overlay', $this->GetAsset( 'js', 'overlay', 'url' ).'?'.http_build_query( $fields ), array( 'jquery' ) );
     171        $this->EnqueueScript( 'pin_overlay' );
     172       
     173        $this->RegisterStyle( 'pin_overlay', $this->GetAsset( 'css', 'overlay', 'url' ) );
     174        $this->EnqueueStyle( 'pin_overlay' );
     175    }
     176   
    130177}
    131178?>
  • qodys-pinner/trunk/pages/settings/index.php

    r538404 r538430  
    2222        $this->AddMetabox( 'settings', 'Settings' );
    2323        $this->AddMetabox( 'widget', 'Widget Options' );
     24        $this->AddMetabox( 'overlay', 'Image Overlay Options' );
    2425        $this->AddMetabox( 'cron', 'Cronjob' );
    2526       
  • qodys-pinner/trunk/pages/settings/metaboxes/widget.php

    r538404 r538430  
    4848        <?php $nextValue = is_array( $this->get_option( $nextItem ) ) ? $this->get_option( $nextItem ) : array(); ?>
    4949        <div class="control-group">
    50             <label class="control-label" for="<?php echo $nextItem; ?>">Checkboxes</label>
     50            <label class="control-label" for="<?php echo $nextItem; ?>">Post Types</label>
    5151            <div class="controls">
    5252            <?php
     
    124124        <legend>Default Content</legend>
    125125       
    126         <?php $nextItem = 'pin_widget_title'; ?>
     126        <!--<?php $nextItem = 'pin_widget_title'; ?>
    127127        <div class="control-group">
    128128            <label class="control-label" for="<?php echo $nextItem; ?>">Default Pin Title</label>
     
    137137                </span>
    138138            </div>
    139         </div>
     139        </div>-->
    140140       
    141141        <?php $nextItem = 'pin_widget_text'; ?>
  • qodys-pinner/trunk/plugin.php

    r538404 r538430  
    44 * Plugin URI: http://qody.co
    55 * Description: The perfect match of Amazon and Pinterest
    6  * Version: 1.0.8
     6 * Version: 1.0.9
    77 * Author: Qody LLC
    88 * Author URI: http://qody.co
Note: See TracChangeset for help on using the changeset viewer.