Changeset 1650697
- Timestamp:
- 05/04/2017 03:10:40 AM (9 years ago)
- Location:
- cyclone-slider/trunk
- Files:
-
- 7 edited
-
README.txt (modified) (1 diff)
-
cyclone-slider.php (modified) (1 diff)
-
src/CycloneSlider/Data.php (modified) (1 diff)
-
src/CycloneSlider/Exporter.php (modified) (1 diff)
-
src/CycloneSlider/Frontend.php (modified) (1 diff)
-
src/functions.php (modified) (1 diff)
-
src/plugin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cyclone-slider/trunk/README.txt
r1647737 r1650697 119 119 == Changelog == 120 120 121 = 3.1.2 - 2017-05-04 = 122 * Fix "Slideshow not found" error when using numeric slideshow slugs. Eg. "011". 123 121 124 = 3.1.1 - 2017-04-29 = 122 125 * Fix slide type image edit area not showing when adding slide for the first time. -
cyclone-slider/trunk/cyclone-slider.php
r1647737 r1650697 4 4 Plugin URI: http://www.codefleet.net/cyclone-slider/ 5 5 Description: Create and manage sliders with ease. Built for both casual users and developers. 6 Version: 3.1. 16 Version: 3.1.2 7 7 Author: Nico Amarilla 8 8 Author URI: http://www.codefleet.net/ -
cyclone-slider/trunk/src/CycloneSlider/Data.php
r1646975 r1650697 244 244 } 245 245 246 /** 247 * @param $slug Post slug 248 * 249 * @return array|NULL 250 */ 251 public function get_slider_by_slug( $slug ){ 252 global $wp_version; 253 254 $args = array( 255 'numberposts' => 1 // 1 only 256 ); 257 258 $args['name'] = $slug; 259 if ( version_compare( $wp_version, '4.4', '>=' ) ) { // post_name__in avail only in 4.4 260 $args['post_name__in'] = array( $slug ); // Workaround: Using "post_name__in" not "name" as WP returns a post instead of nothing when name is ''. 261 } 262 263 $sliders = $this->get_sliders( $args ); 264 return array_pop($sliders); // Return the lone slideshow or NULL if empty 265 } 266 246 267 /** 247 268 * @param $id_or_slug -
cyclone-slider/trunk/src/CycloneSlider/Exporter.php
r1635527 r1650697 98 98 foreach( $sliders_slugs_array as $i=>$slider_slug){ 99 99 100 $slider = $this->data->get_slider ( $slider_slug );100 $slider = $this->data->get_slider_by_slug( $slider_slug ); 101 101 102 102 if($slider){ -
cyclone-slider/trunk/src/CycloneSlider/Frontend.php
r1646975 r1650697 95 95 96 96 $slider_slug = $shortcode_settings['id']; // Slideshow slug passed from shortcode 97 $slider = $this->data->get_slider ( $slider_slug ); // Get slider by slug97 $slider = $this->data->get_slider_by_slug( $slider_slug ); // Get slider by slug 98 98 99 99 // Abort if slider not found! -
cyclone-slider/trunk/src/functions.php
r1635527 r1650697 1 1 <?php 2 /** 3 * Cyclone Slider 4 * 5 * Displays the slider on template files. 6 * 7 * @param string $slider_slug The slug of the slider. 8 */ 9 function cyclone_slider( $slider_slug ){ 10 global $cyclone_slider_plugin_instance; 11 if(isset($cyclone_slider_plugin_instance)){ 12 echo $cyclone_slider_plugin_instance['frontend']->cycloneslider_shortcode( array('id'=>$slider_slug) ); 13 } 14 } 2 15 3 16 4 /** -
cyclone-slider/trunk/src/plugin.php
r1646975 r1650697 139 139 } 140 140 141 // PHP embed code function 142 /** 143 * Cyclone Slider 144 * 145 * Displays the slider on template files. 146 * 147 * @param string $slider_slug The slug of the slider. 148 */ 149 function cyclone_slider( $slider_slug ){ 150 global $cyclone_slider_plugin_instance; 151 if(isset($cyclone_slider_plugin_instance)){ 152 echo $cyclone_slider_plugin_instance['frontend']->cycloneslider_shortcode( array('id'=>$slider_slug) ); 153 } 154 } 155 141 156 // Service Definitions 142 157 function cs3_service_plugin_headers( $plugin ){
Note: See TracChangeset
for help on using the changeset viewer.