Changeset 687400
- Timestamp:
- 03/26/2013 08:22:16 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-fading-content-slider/trunk/wp-fading-content-slider.php
r669898 r687400 4 4 * Plugin URI: http://www.mba-multimedia.com/en/innovation/wordpress/plugins/wp-fading-content-slider/ 5 5 * Description: A customizable JQuery content slider with CSS3 animations and fading effects 6 * Version: 0.2. 16 * Version: 0.2.2 7 7 * Author: MBA Multimedia 8 8 * Author URI: http://www.mba-multimedia.com/ … … 194 194 } 195 195 196 function get_wp_generated_thumb( $thumb ) { 197 $thumb = explode("\"", $thumb); 198 return $thumb[5]; 199 } 200 196 201 /** 197 202 * Show the slider to the front-end … … 236 241 237 242 $args = array( 'meta_key' => 'fading_slider', 238 'meta_value'=> '1', 243 'meta_value'=> '1', // Seulement les objets dont la case est cochée dans le back 239 244 'suppress_filters' => 0, 240 245 'post_type' => array('post', 'page'), 241 246 'orderby' => $sort, 242 247 'order' => 'DESC', // DESC = Show last post first 243 'numberposts'=> 4); // HTML Markup only allows 4 slides 244 245 global $myposts; 248 'numberposts'=> 4); // HTML Markup only allows 4 slides 249 246 250 $myposts = get_posts( $args ); 247 251 248 252 if (function_exists('add_image_size')) { 249 //add_image_size( 'fading_slider', $img_width, $img_height, true );250 253 add_image_size( 'fading_slider', $img_width, $img_height, true ); // Miniatures des archives 251 254 } 252 255 253 function get_wp_generated_thumb($position) {254 $thumb = get_the_post_thumbnail($post_id, $position);255 $thumb = explode("\"", $thumb);256 return $thumb[5];257 }258 259 256 /* PHP Generated Styles here */ 260 261 257 ?> 262 263 258 <style type="text/css"> 264 259 … … 268 263 width: <?php $width = get_option('fading_slider_width'); if(!empty($width)) {echo $width;} else {echo "580";}?>px; 269 264 } 270 271 265 <?php 272 266 … … 275 269 276 270 $custom = get_post_custom($post->ID); 277 $thumb = get_wp_generated_thumb("fading_slider"); 271 echo "/* ID POST : " . $post->ID . "*/"; 272 $thumb = $this->get_wp_generated_thumb( get_the_post_thumbnail( $post->ID ) ); 273 // $thumb = $this->get_wp_generated_thumb( get_the_post_thumbnail($post->ID, "fading_slider") ); 278 274 279 275 echo ".cr-container input.cr-selector-img-".$i.":checked ~ .cr-bgimg, … … 284 280 $i++; 285 281 endforeach; wp_reset_postdata(); 282 286 283 ?> 287 284 </style> … … 341 338 foreach( $myposts as $post ) : setup_postdata($post); 342 339 343 $custom = get_post_custom($post->ID);344 $thumb = get_wp_generated_thumb("fading_slider");340 // $custom = get_post_custom($post->ID); 341 $thumb = $this->get_wp_generated_thumb( get_the_post_thumbnail($post->ID, "fading_slider") ); 345 342 ?> 346 343 … … 356 353 <?php 357 354 $i++; 358 endforeach; 355 endforeach; wp_reset_postdata(); 359 356 ?> 360 357
Note: See TracChangeset
for help on using the changeset viewer.