cyclone slider : add page num setting

The Cyclone slider plugin for wordpress is one of the best free plugins available for making sliders within pages and posts. Apart from dealing with slides within a drag and drop framework, it also features a list of parameters for each slider, but the possibility to use numbers in the slide pagers is currently missing. it is very easy to add, so I put the code below until a new release comes with that feature.

 Note : before using the code below make sure you upgrade cyclone slider to the latest version of jcycle2  

  • in inc / admin parts/ slider-properties, add the html code to display the input field 

  • in class-cyclone-slider, add the save value code in save_settings function
      $settings['slide_num'] = (int) ($_POST['cycloneslider_settings']['slide_num']); //webmasterbulletin.net20130505
  • and in the same file add the get setting code in  the shortcode function : 
    $slider_settings['slide_num'] = $this->get_comp_slider_setting($admin_settings['slide_num'], $shortcode_settings['slide_num']); //webmasterbulletin.net20130505
  • finally in functions.php, add the jcycle setting if the cyclone slider setting is on in cyclone_settings function

    if ($slider_settings["slide_num"])$defaults['data-cycle-pager-template']="<strong><a href=#> {{slideNum}} </a></strong>"; //webmasterbulletin.net20130505