Plugin Directory

Changeset 1442528


Ignore:
Timestamp:
06/23/2016 03:43:12 PM (10 years ago)
Author:
r0bsc0tt
Message:

update shortcode function to reduce conflicts

Location:
eazy-flickity-slider/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • eazy-flickity-slider/trunk/eazy_flickity_slider.php

    r1434579 r1442528  
    44Plugin URI: http://robjscott.com/wordpress/
    55Description:  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.2
     6Version: 1.2.0
    77Author: Rob Scott, LLC
    88Author URI: http://robjscott.com
  • eazy-flickity-slider/trunk/readme.txt

    r1434579 r1442528  
    22Contributors: r0bsc0tt
    33Requires at least: 4.5
    4 Tested up to: 4.5.1
     4Tested up to: 4.5.3
    55Stable tag: trunk
    66License: GPLv2 or any later version
     
    4646
    4747== 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
    4853= 1.1.2 =
    4954*Update CSS for gallery-cell.
     
    6570
    6671== Upgrade Notice ==
     72= 1.2.0 =
     73*Updated to improve shortcode compatibility
     74
    6775= 1.0.1 =
    6876* Initial version of plugin.
  • eazy-flickity-slider/trunk/resources/eazy_flickity_slider_shortcode.php

    r1426194 r1442528  
    6363          $thumb_id = get_post_thumbnail_id();
    6464          $eazyimage_attributes = wp_get_attachment_image_src($thumb_id,'full', true);
    65           print_r($image_attributes);
    6665          $flickity_slides[] = "
    6766          <div class='gallery-cell'>
     
    8887  }
    8988
    90  if (!is_front_page()){ 
     89 
    9190    add_action( 'wp_enqueue_scripts', 'eazy_flickity_shortcode_scripts_styles' );
    9291    function eazy_flickity_shortcode_scripts_styles(){
     
    103102          && in_array( 'eazy-flickity-slider', $matches[2] ) ){
    104103            foreach ($matches[0] as $key => $value) {
    105               $toys[$key] = $value;
     104              $matches[$key] = $value;
    106105             
    107106              $eznameflag = '~eazy_flickity_slider="(.*?)"~';
    108107              $ezwidthflag = '~width="(.*?)"~';
    109108              $ezheightflag = '~height="(.*?)"~';
     109              $thiswidth = '';
     110              $thisheight = '';
     111
    110112              if(preg_match($eznameflag, $value, $m)){
    111113                $thisname = $m[1];
     114                //$matches[$key] .= ['sliderid' => $thisname];
    112115              }
    113116              if(preg_match($ezwidthflag, $value, $m)){
    114117                $thiswidth = $m[1];
     118                //$matches[$key] .= ['width' => $thiswidth];
    115119              }
    116120              if(preg_match($ezheightflag, $value, $m)){
    117121                $thisheight = $m[1];
     122                //$matches[$key] .= ['height' => $thisheight];
    118123              }
    119124
    120               $toys[$key] = ['sliderid' => $thisname, 'width' => $thiswidth, 'height' => $thisheight];
     125              $matches[$key] = ['sliderid' => $thisname, 'width' => $thiswidth, 'height' => $thisheight];
    121126            }
    122127          break; 
     
    124129      } //end foreach
    125130   
    126     wp_localize_script( 'eazy-flickity-shortcode-extra', 'eazyoptions', $toys );
     131    wp_localize_script( 'eazy-flickity-shortcode-extra', 'eazyoptions', $matches );
    127132    }
    128 }
    129133
    130134
Note: See TracChangeset for help on using the changeset viewer.