Changeset 538430
- Timestamp:
- 05/01/2012 05:24:23 AM (14 years ago)
- Location:
- qodys-pinner/trunk
- Files:
-
- 5 edited
-
frwk.php (modified) (1 diff)
-
overseers/pinner/index.php (modified) (4 diffs)
-
pages/settings/index.php (modified) (1 diff)
-
pages/settings/metaboxes/widget.php (modified) (3 diffs)
-
plugin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
qodys-pinner/trunk/frwk.php
r538404 r538430 52 52 53 53 $fields = array(); 54 $fields['qodys-framework'] = '2.3. 2';54 $fields['qodys-framework'] = '2.3.3'; 55 55 56 56 foreach( $fields as $key => $value ) -
qodys-pinner/trunk/overseers/pinner/index.php
r538404 r538430 12 12 add_action( 'the_content', array( $this, 'InsertWidgetToContent' ) ); 13 13 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' ) ); 14 21 } 15 22 … … 54 61 // only show widget on selected post types 55 62 if( !in_array( $post->post_type, $post_types ) ) 56 return ;63 return $content; 57 64 58 65 // build widget code … … 94 101 } 95 102 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>'; 97 119 98 120 return $content; … … 128 150 } 129 151 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 130 177 } 131 178 ?> -
qodys-pinner/trunk/pages/settings/index.php
r538404 r538430 22 22 $this->AddMetabox( 'settings', 'Settings' ); 23 23 $this->AddMetabox( 'widget', 'Widget Options' ); 24 $this->AddMetabox( 'overlay', 'Image Overlay Options' ); 24 25 $this->AddMetabox( 'cron', 'Cronjob' ); 25 26 -
qodys-pinner/trunk/pages/settings/metaboxes/widget.php
r538404 r538430 48 48 <?php $nextValue = is_array( $this->get_option( $nextItem ) ) ? $this->get_option( $nextItem ) : array(); ?> 49 49 <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> 51 51 <div class="controls"> 52 52 <?php … … 124 124 <legend>Default Content</legend> 125 125 126 < ?php $nextItem = 'pin_widget_title'; ?>126 <!--<?php $nextItem = 'pin_widget_title'; ?> 127 127 <div class="control-group"> 128 128 <label class="control-label" for="<?php echo $nextItem; ?>">Default Pin Title</label> … … 137 137 </span> 138 138 </div> 139 </div> 139 </div>--> 140 140 141 141 <?php $nextItem = 'pin_widget_text'; ?> -
qodys-pinner/trunk/plugin.php
r538404 r538430 4 4 * Plugin URI: http://qody.co 5 5 * Description: The perfect match of Amazon and Pinterest 6 * Version: 1.0. 86 * Version: 1.0.9 7 7 * Author: Qody LLC 8 8 * Author URI: http://qody.co
Note: See TracChangeset
for help on using the changeset viewer.