Changeset 1442528
- Timestamp:
- 06/23/2016 03:43:12 PM (10 years ago)
- Location:
- eazy-flickity-slider/trunk
- Files:
-
- 3 edited
-
eazy_flickity_slider.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
-
resources/eazy_flickity_slider_shortcode.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
eazy-flickity-slider/trunk/eazy_flickity_slider.php
r1434579 r1442528 4 4 Plugin URI: http://robjscott.com/wordpress/ 5 5 Description: Easily create slides to use with responsive sliders. Add them to page or post. Displays them using flickity.js by metafizzy. 6 Version: 1. 1.26 Version: 1.2.0 7 7 Author: Rob Scott, LLC 8 8 Author URI: http://robjscott.com -
eazy-flickity-slider/trunk/readme.txt
r1434579 r1442528 2 2 Contributors: r0bsc0tt 3 3 Requires at least: 4.5 4 Tested up to: 4.5. 14 Tested up to: 4.5.3 5 5 Stable tag: trunk 6 6 License: GPLv2 or any later version … … 46 46 47 47 == Changelog == 48 = 1.2.0 = 49 *Update shortcode function to declare width and height of shortcode 50 *Remove is front page conditional from shortcode 51 *Remove outdated variable names 52 48 53 = 1.1.2 = 49 54 *Update CSS for gallery-cell. … … 65 70 66 71 == Upgrade Notice == 72 = 1.2.0 = 73 *Updated to improve shortcode compatibility 74 67 75 = 1.0.1 = 68 76 * Initial version of plugin. -
eazy-flickity-slider/trunk/resources/eazy_flickity_slider_shortcode.php
r1426194 r1442528 63 63 $thumb_id = get_post_thumbnail_id(); 64 64 $eazyimage_attributes = wp_get_attachment_image_src($thumb_id,'full', true); 65 print_r($image_attributes);66 65 $flickity_slides[] = " 67 66 <div class='gallery-cell'> … … 88 87 } 89 88 90 if (!is_front_page()){89 91 90 add_action( 'wp_enqueue_scripts', 'eazy_flickity_shortcode_scripts_styles' ); 92 91 function eazy_flickity_shortcode_scripts_styles(){ … … 103 102 && in_array( 'eazy-flickity-slider', $matches[2] ) ){ 104 103 foreach ($matches[0] as $key => $value) { 105 $ toys[$key] = $value;104 $matches[$key] = $value; 106 105 107 106 $eznameflag = '~eazy_flickity_slider="(.*?)"~'; 108 107 $ezwidthflag = '~width="(.*?)"~'; 109 108 $ezheightflag = '~height="(.*?)"~'; 109 $thiswidth = ''; 110 $thisheight = ''; 111 110 112 if(preg_match($eznameflag, $value, $m)){ 111 113 $thisname = $m[1]; 114 //$matches[$key] .= ['sliderid' => $thisname]; 112 115 } 113 116 if(preg_match($ezwidthflag, $value, $m)){ 114 117 $thiswidth = $m[1]; 118 //$matches[$key] .= ['width' => $thiswidth]; 115 119 } 116 120 if(preg_match($ezheightflag, $value, $m)){ 117 121 $thisheight = $m[1]; 122 //$matches[$key] .= ['height' => $thisheight]; 118 123 } 119 124 120 $ toys[$key] = ['sliderid' => $thisname, 'width' => $thiswidth, 'height' => $thisheight];125 $matches[$key] = ['sliderid' => $thisname, 'width' => $thiswidth, 'height' => $thisheight]; 121 126 } 122 127 break; … … 124 129 } //end foreach 125 130 126 wp_localize_script( 'eazy-flickity-shortcode-extra', 'eazyoptions', $ toys );131 wp_localize_script( 'eazy-flickity-shortcode-extra', 'eazyoptions', $matches ); 127 132 } 128 }129 133 130 134
Note: See TracChangeset
for help on using the changeset viewer.