Plugin Directory

Changeset 1475666


Ignore:
Timestamp:
08/16/2016 04:17:35 PM (10 years ago)
Author:
elevaunt
Message:

Ensure 'inside' navigation is not considered a slide

Location:
versatile-jquery-slider/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • versatile-jquery-slider/trunk/readme.md

    r1474889 r1475666  
    7171
    7272 * **nav-next**
    73 When **navs** are enabled, the default will create a right arrow link. Use this attribute to change it to something else. It will accept plain text, `img` tag, or any html.
     73When **navs** are enabled, the default will create a right arrow link. Use this attribute to change it to something else. It will accept plain text, `img` tag, or any html. If you don't want an element inside (like you want to control it all with CSS), then just add `nav-next=""`.
    7474
    7575 * **nav-prev**
    76 When **navs** are enabled, the default will create a left arrow link. Use this attribute to change it to something else. It will accept plain text, `img` tag, or any html.
     76When **navs** are enabled, the default will create a left arrow link. Use this attribute to change it to something else. It will accept plain text, `img` tag, or any html. If you don't want an element inside (like you want to control it all with CSS), then just add `nav-prev=""`.
    7777
    7878 * **nav-selector**
  • versatile-jquery-slider/trunk/readme.txt

    r1474889 r1475666  
    66Requires at least: 3.0.1
    77Tested up to: 4.5.3
    8 Stable tag: trunk
     8Stable tag: 1.0
    99License: GPLv3
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.txt
     
    8080
    8181 * **nav-next**
    82 When **navs** are enabled, the default will create a right arrow link. Use this attribute to change it to something else. It will accept plain text, `img` tag, or any html.
     82When **navs** are enabled, the default will create a right arrow link. Use this attribute to change it to something else. It will accept plain text, `img` tag, or any html. If you don't want an element inside (like you want to control it all with CSS), then just add `nav-next=""`.
    8383
    8484 * **nav-prev**
    85 When **navs** are enabled, the default will create a left arrow link. Use this attribute to change it to something else. It will accept plain text, `img` tag, or any html.
     85When **navs** are enabled, the default will create a left arrow link. Use this attribute to change it to something else. It will accept plain text, `img` tag, or any html. If you don't want an element inside (like you want to control it all with CSS), then just add `nav-prev=""`.
    8686
    8787 * **nav-selector**
     
    114114
    115115== Screenshots ==
    116 
     116None yet.  Will add soon.
    117117
    118118== Changelog ==
  • versatile-jquery-slider/trunk/versatile-jquery-slider.php

    r1474889 r1475666  
    158158  vjs_register_scripts( $vjs_settings, $vjs_opts, $vjs_fix_dir, $vjs_fix );
    159159
    160   // vjs_slider_cycle_check();
     160  // Add slider initiation js
    161161  vjs_slider_init_script( $vjs_opts_filter, $vjs_id, $vjs_settings );
    162162   
     
    213213        $navSelector = 'id="'. str_replace( '#', '', $vjs_settings['nav-selector'] ) .'"';
    214214      }
    215       $vjs_div .= '<div '. $navSelector .' style="visibility: visible;">';
     215      if ( $vjs_opts['slides'] == '> div' ) {
     216        $vjs_div .= '<span ';
     217      } else {
     218        $vjs_div .= '<div ';
     219      }
     220      $vjs_div .= $navSelector .' style="visibility: visible;">';
    216221    }
    217222   
     
    242247    $vjs_div .= '<span '. $nextSelector .'>' . $vjs_settings['nav-next'] . '</span>';
    243248
    244     // close up <div> if
     249    // close up nav element when needed
    245250    if ( ! empty( $vjs_settings['nav-selector'] ) ) {
    246       $vjs_div .= '</div>';
     251      if ( $vjs_opts['slides'] == '> div' ) {
     252        $vjs_div .= '</span>';
     253      } else {
     254        $vjs_div .= '</div>';
     255      }
    247256    }
    248257  }
     
    257266    $vjs_fix = '2';
    258267  }
    259   // $vjs_slider_script = '';
    260268  // initialize the vjs_slider for this specific slider
    261269  $vjs_slider_script = 'jQuery(function($){';
     
    265273  wp_add_inline_script( 'vjs.cycle2', $vjs_slider_script, 'before' );
    266274}
    267 
    268 // function vjs_slider_cycle_check() {
    269 //   $vjs_slider_cycle_check = '';
    270 //   // $vjs_slider_cycle_check = 'jQuery(function($){';
    271 //   // check if theme has already loaded the jquery.cycle plugin and log message
    272 //   // $vjs_slider_cycle_check .= 'setTimeout(function() {';
    273 //   $vjs_slider_cycle_check .= 'if(jQuery().cycle) {';
    274 //   $vjs_slider_cycle_check .= 'console.log("[vjs_slider] *** jquery.cycle plugin already loaded by theme! ***");';
    275 //   $vjs_slider_cycle_check .= 'console.log("[vjs_slider] *** Use the | theme-fix | attribute of the Versatile jQuery Slider plugin ***");';
    276 //   $vjs_slider_cycle_check .= '}';
    277 //   // $vjs_slider_cycle_check .= '}}, 100);';
    278 
    279 //   wp_add_inline_script( 'vjs.cycle2', $vjs_slider_cycle_check, 'before' );
    280 
    281 // }
    282275
    283276function vjs_register_scripts( $vjs_settings, $vjs_opts, $vjs_fix_dir, $vjs_fix ) {
     
    327320
    328321?>
    329 
    330 <?php
    331 /*
    332 
    333 Variations:
    334 
    335 slides: don't add the '>', it will automatically be assumed
    336 navs: If 'outside' and you're using the default CSS, you'll need to add your own CSS to make things look right
    337 next and prev selectors: Must add own CSS.  Note: if the navs are inside the slider container they will be hidden by default
    338 slide-css: not used because it didn't work reliably. If you want slide specific CSS, just add your own class to your slide and add your own CSS
    339 swipe: automatically added, because let's face it, who doesn't want that
    340 
    341 */
    342 ?>
    343 
Note: See TracChangeset for help on using the changeset viewer.