Version Description
- 2013-09-27 =
- New! Added ability in Settings page to enable/disable templates.
- Change. Move settings page form to its own view file.
Download this release
Release Info
Developer | kosinix |
Plugin | Cyclone Slider |
Version | 2.7.2 |
Comparing to | |
See all releases |
Code changes from version 2.7.1 to 2.7.2
- README.txt +14 -4
- classes/class-cyclone-slider-admin.php +12 -6
- classes/class-cyclone-slider-scripts.php +29 -23
- classes/class-cyclone-slider-settings-page.php +40 -81
- classes/class-cyclone-templates-manager.php +20 -0
- cyclone-slider.php +14 -13
- views/export-step-1.php +1 -1
- views/settings-page.php +90 -0
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.codefleet.net/donate/
|
|
4 |
Tags: slider, slideshow, drag-and-drop, wordpress-slider, wordpress-slideshow, cycle 2, jquery, responsive, translation-ready, custom-post, cyclone-slider
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.6.1
|
7 |
-
Stable tag: 2.7.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -72,10 +72,12 @@ GPLv2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
|
72 |
== Frequently Asked Questions ==
|
73 |
|
74 |
= Why is my slider not working? =
|
75 |
-
Check for javascript errors in your page. This is the most common cause of the slider not running.
|
76 |
-
`cycle not a function` error - most probably you have double jquery (jquery.js) included from improperly coded plugins. Remove the duplicate jquery or deactivate the plugin causing the double jquery include.
|
77 |
|
78 |
-
Also check if you are using
|
|
|
|
|
|
|
79 |
|
80 |
= Why is there is an extra slide that I didn't add? =
|
81 |
Most probably its wordpress adding paragpraphs on line breaks next to the slides therefore adding a blank `<p>` slide. You can try adding this to functions.php:
|
@@ -97,6 +99,10 @@ Inside your current active theme create a folder named "cycloneslider". Add your
|
|
97 |
|
98 |
== Changelog ==
|
99 |
|
|
|
|
|
|
|
|
|
100 |
= 2.7.1 - 2013-09-23 =
|
101 |
* Added Width Management option. Three options available: Responsive (default), Full width, and Fixed width. Templates that support this feature are Dark, Default, Standard and Thumbnails.
|
102 |
* Added [Dark template](http://www.codefleet.net/cyclone-slider-2/templates/dark/) with RTL support.
|
@@ -250,6 +256,10 @@ Inside your current active theme create a folder named "cycloneslider". Add your
|
|
250 |
|
251 |
== Upgrade Notice ==
|
252 |
|
|
|
|
|
|
|
|
|
253 |
= 2.7.1 - 2013-09-23 =
|
254 |
* Added Width Management option. Three options available: Responsive (default), Full width, and Fixed width. Templates that support this feature are Dark, Default, Standard and Thumbnails.
|
255 |
* Added [Dark template](http://www.codefleet.net/cyclone-slider-2/templates/dark/) with RTL support.
|
4 |
Tags: slider, slideshow, drag-and-drop, wordpress-slider, wordpress-slideshow, cycle 2, jquery, responsive, translation-ready, custom-post, cyclone-slider
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.6.1
|
7 |
+
Stable tag: 2.7.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
72 |
== Frequently Asked Questions ==
|
73 |
|
74 |
= Why is my slider not working? =
|
75 |
+
Check for javascript errors in your page. This is the most common cause of the slider not running. See [diagnosing javascript errors](http://codex.wordpress.org/Using_Your_Browser_to_Diagnose_JavaScript_Errors). Fix the javascript errors and the slider will run.
|
|
|
76 |
|
77 |
+
Also check if you are using jQuery Cycle 1 script by viewing your page source. jQuery Cycle2 won't work if both are present.
|
78 |
+
|
79 |
+
= How do I pause an auto running slider when I play a YouTube or Vimeo video? =
|
80 |
+
Sorry but its not currently supported as it requires loading the YouTube API which is an extra overhead. A solution would be to disable auto transition.
|
81 |
|
82 |
= Why is there is an extra slide that I didn't add? =
|
83 |
Most probably its wordpress adding paragpraphs on line breaks next to the slides therefore adding a blank `<p>` slide. You can try adding this to functions.php:
|
99 |
|
100 |
== Changelog ==
|
101 |
|
102 |
+
= 2.7.2 - 2013-09-27 =
|
103 |
+
* New! Added ability in Settings page to enable/disable templates.
|
104 |
+
* Change. Move settings page form to its own view file.
|
105 |
+
|
106 |
= 2.7.1 - 2013-09-23 =
|
107 |
* Added Width Management option. Three options available: Responsive (default), Full width, and Fixed width. Templates that support this feature are Dark, Default, Standard and Thumbnails.
|
108 |
* Added [Dark template](http://www.codefleet.net/cyclone-slider-2/templates/dark/) with RTL support.
|
256 |
|
257 |
== Upgrade Notice ==
|
258 |
|
259 |
+
= 2.7.2 - 2013-09-27 =
|
260 |
+
* New! Added ability in Settings page to enable/disable templates.
|
261 |
+
* Change. Move settings page form to its own view file.
|
262 |
+
|
263 |
= 2.7.1 - 2013-09-23 =
|
264 |
* Added Width Management option. Three options available: Responsive (default), Full width, and Fixed width. Templates that support this feature are Dark, Default, Standard and Thumbnails.
|
265 |
* Added [Dark template](http://www.codefleet.net/cyclone-slider-2/templates/dark/) with RTL support.
|
classes/class-cyclone-slider-admin.php
CHANGED
@@ -6,22 +6,24 @@ if(!class_exists('Cyclone_Slider_Admin')):
|
|
6 |
*/
|
7 |
class Cyclone_Slider_Admin {
|
8 |
|
9 |
-
|
10 |
public $slider_count;
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
15 |
|
16 |
/**
|
17 |
* Initializes the plugin by setting localization, filters, and administration functions.
|
18 |
*/
|
19 |
-
public function __construct( $view, $cyclone_slider_scripts, $cyclone_slider_templates_manager, $cyclone_slider_data ) {
|
20 |
|
21 |
$this->view = $view;
|
22 |
$this->cyclone_slider_scripts = $cyclone_slider_scripts;
|
23 |
$this->cyclone_slider_data = $cyclone_slider_data;
|
24 |
$this->templates_manager = $cyclone_slider_templates_manager;
|
|
|
25 |
|
26 |
// Set defaults
|
27 |
$this->slider_count = 0;
|
@@ -381,6 +383,7 @@ if(!class_exists('Cyclone_Slider_Admin')):
|
|
381 |
|
382 |
$slider_settings = $this->cyclone_slider_data->get_slider_settings($post->ID);
|
383 |
$templates = $this->templates_manager->get_all_templates();
|
|
|
384 |
ksort ( $templates ); // Sort assoc array alphabetically
|
385 |
foreach($templates as $name=>$template){
|
386 |
if( $name == $slider_settings['template'] ){
|
@@ -394,6 +397,9 @@ if(!class_exists('Cyclone_Slider_Admin')):
|
|
394 |
} else {
|
395 |
$templates[$name]['screenshot'] = CYCLONE_URL.'images/screenshot.png';
|
396 |
}
|
|
|
|
|
|
|
397 |
}
|
398 |
|
399 |
$this->view->set_view_file( CYCLONE_PATH . 'views/template-selection.php' );
|
6 |
*/
|
7 |
class Cyclone_Slider_Admin {
|
8 |
|
9 |
+
protected $view; // Holds the instance of Cyclone_Slider_View
|
10 |
public $slider_count;
|
11 |
+
protected $message_id;
|
12 |
+
protected $cyclone_slider_scripts; // Holds frontend scripts object
|
13 |
+
protected $templates_manager; // Holds template manager object
|
14 |
+
protected $cyclone_slider_data; // Holds cyclone slider data object
|
15 |
+
protected $cyclone_settings_data; // Holds cyclone settings array
|
16 |
|
17 |
/**
|
18 |
* Initializes the plugin by setting localization, filters, and administration functions.
|
19 |
*/
|
20 |
+
public function __construct( $view, $cyclone_slider_scripts, $cyclone_slider_templates_manager, $cyclone_slider_data, $cyclone_settings_data ) {
|
21 |
|
22 |
$this->view = $view;
|
23 |
$this->cyclone_slider_scripts = $cyclone_slider_scripts;
|
24 |
$this->cyclone_slider_data = $cyclone_slider_data;
|
25 |
$this->templates_manager = $cyclone_slider_templates_manager;
|
26 |
+
$this->cyclone_settings_data = $cyclone_settings_data;
|
27 |
|
28 |
// Set defaults
|
29 |
$this->slider_count = 0;
|
383 |
|
384 |
$slider_settings = $this->cyclone_slider_data->get_slider_settings($post->ID);
|
385 |
$templates = $this->templates_manager->get_all_templates();
|
386 |
+
$active_templates = $this->templates_manager->get_active_templates( $this->cyclone_settings_data );
|
387 |
ksort ( $templates ); // Sort assoc array alphabetically
|
388 |
foreach($templates as $name=>$template){
|
389 |
if( $name == $slider_settings['template'] ){
|
397 |
} else {
|
398 |
$templates[$name]['screenshot'] = CYCLONE_URL.'images/screenshot.png';
|
399 |
}
|
400 |
+
if($active_templates[$name]==0){
|
401 |
+
unset($templates[$name]);
|
402 |
+
}
|
403 |
}
|
404 |
|
405 |
$this->view->set_view_file( CYCLONE_PATH . 'views/template-selection.php' );
|
classes/class-cyclone-slider-scripts.php
CHANGED
@@ -7,16 +7,16 @@ if(!class_exists('Cyclone_Slider_Scripts')):
|
|
7 |
class Cyclone_Slider_Scripts {
|
8 |
|
9 |
private $templates_manager; // Holds templates manager object
|
10 |
-
private $
|
11 |
|
12 |
/**
|
13 |
* Initialize
|
14 |
*/
|
15 |
-
public function __construct( $templates_manager, $
|
16 |
|
17 |
// Inject dependencies
|
18 |
$this->templates_manager = $templates_manager;
|
19 |
-
$this->
|
20 |
|
21 |
} // end constructor
|
22 |
|
@@ -80,12 +80,12 @@ if(!class_exists('Cyclone_Slider_Scripts')):
|
|
80 |
public function register_frontend_scripts( $hook ) {
|
81 |
|
82 |
$in_footer = true;
|
83 |
-
if($this->
|
84 |
$in_footer = false;
|
85 |
}
|
86 |
|
87 |
/*** Magnific Popup Style ***/
|
88 |
-
if($this->
|
89 |
wp_enqueue_style( 'jquery-magnific-popup', CYCLONE_URL.'libs/magnific-popup/magnific-popup.css', array(), CYCLONE_VERSION );
|
90 |
}
|
91 |
|
@@ -95,29 +95,29 @@ if(!class_exists('Cyclone_Slider_Scripts')):
|
|
95 |
/*****************************/
|
96 |
|
97 |
/*** Easing ***/
|
98 |
-
if($this->
|
99 |
wp_enqueue_script( 'jquery-easing', CYCLONE_URL.'libs/jquery.easing.1.3.js', array('jquery'), CYCLONE_VERSION, $in_footer );
|
100 |
}
|
101 |
|
102 |
/*** Core Cycle2 Scripts ***/
|
103 |
-
if($this->
|
104 |
wp_enqueue_script( 'jquery-cycle2', CYCLONE_URL.'libs/cycle2/jquery.cycle2.min.js', array('jquery'), CYCLONE_VERSION, $in_footer );
|
105 |
}
|
106 |
-
if($this->
|
107 |
wp_enqueue_script( 'jquery-cycle2-carousel', CYCLONE_URL.'libs/cycle2/jquery.cycle2.carousel.min.js', array('jquery', 'jquery-cycle2'), CYCLONE_VERSION, $in_footer );
|
108 |
}
|
109 |
-
if($this->
|
110 |
wp_enqueue_script( 'jquery-cycle2-swipe', CYCLONE_URL.'libs/cycle2/jquery.cycle2.swipe.min.js', array('jquery', 'jquery-cycle2'), CYCLONE_VERSION, $in_footer );
|
111 |
}
|
112 |
-
if($this->
|
113 |
wp_enqueue_script( 'jquery-cycle2-tile', CYCLONE_URL.'libs/cycle2/jquery.cycle2.tile.min.js', array('jquery', 'jquery-cycle2'), CYCLONE_VERSION, $in_footer );
|
114 |
}
|
115 |
-
if($this->
|
116 |
wp_enqueue_script( 'jquery-cycle2-video', CYCLONE_URL.'libs/cycle2/jquery.cycle2.video.min.js', array('jquery', 'jquery-cycle2'), CYCLONE_VERSION, $in_footer );
|
117 |
}
|
118 |
|
119 |
/*** Magnific Popup Scripts ***/
|
120 |
-
if($this->
|
121 |
wp_enqueue_script( 'jquery-magnific-popup', CYCLONE_URL.'libs/magnific-popup/jquery.magnific-popup.min.js', array('jquery'), CYCLONE_VERSION, $in_footer );
|
122 |
}
|
123 |
|
@@ -136,13 +136,16 @@ if(!class_exists('Cyclone_Slider_Scripts')):
|
|
136 |
$ds = DIRECTORY_SEPARATOR;
|
137 |
|
138 |
$template_folders = $this->templates_manager->get_all_templates();
|
139 |
-
|
|
|
140 |
foreach($template_folders as $name=>$folder){
|
141 |
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
|
|
|
|
146 |
}
|
147 |
}
|
148 |
}
|
@@ -154,18 +157,21 @@ if(!class_exists('Cyclone_Slider_Scripts')):
|
|
154 |
$ds = DIRECTORY_SEPARATOR;
|
155 |
|
156 |
$in_footer = true;
|
157 |
-
if($this->
|
158 |
$in_footer = false;
|
159 |
}
|
160 |
|
161 |
$template_folders = $this->templates_manager->get_all_templates();
|
162 |
-
|
|
|
163 |
foreach($template_folders as $name=>$folder){
|
164 |
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
|
|
|
|
169 |
}
|
170 |
}
|
171 |
}
|
7 |
class Cyclone_Slider_Scripts {
|
8 |
|
9 |
private $templates_manager; // Holds templates manager object
|
10 |
+
private $cyclone_settings_data; // Holds cyclone settings array
|
11 |
|
12 |
/**
|
13 |
* Initialize
|
14 |
*/
|
15 |
+
public function __construct( $templates_manager, $cyclone_settings_data ) {
|
16 |
|
17 |
// Inject dependencies
|
18 |
$this->templates_manager = $templates_manager;
|
19 |
+
$this->cyclone_settings_data = $cyclone_settings_data;
|
20 |
|
21 |
} // end constructor
|
22 |
|
80 |
public function register_frontend_scripts( $hook ) {
|
81 |
|
82 |
$in_footer = true;
|
83 |
+
if($this->cyclone_settings_data['load_scripts_in'] == 'header'){
|
84 |
$in_footer = false;
|
85 |
}
|
86 |
|
87 |
/*** Magnific Popup Style ***/
|
88 |
+
if($this->cyclone_settings_data['load_magnific'] == 1){
|
89 |
wp_enqueue_style( 'jquery-magnific-popup', CYCLONE_URL.'libs/magnific-popup/magnific-popup.css', array(), CYCLONE_VERSION );
|
90 |
}
|
91 |
|
95 |
/*****************************/
|
96 |
|
97 |
/*** Easing ***/
|
98 |
+
if($this->cyclone_settings_data['load_cycle2'] == 1){
|
99 |
wp_enqueue_script( 'jquery-easing', CYCLONE_URL.'libs/jquery.easing.1.3.js', array('jquery'), CYCLONE_VERSION, $in_footer );
|
100 |
}
|
101 |
|
102 |
/*** Core Cycle2 Scripts ***/
|
103 |
+
if($this->cyclone_settings_data['load_cycle2'] == 1){
|
104 |
wp_enqueue_script( 'jquery-cycle2', CYCLONE_URL.'libs/cycle2/jquery.cycle2.min.js', array('jquery'), CYCLONE_VERSION, $in_footer );
|
105 |
}
|
106 |
+
if($this->cyclone_settings_data['load_cycle2_carousel'] == 1){
|
107 |
wp_enqueue_script( 'jquery-cycle2-carousel', CYCLONE_URL.'libs/cycle2/jquery.cycle2.carousel.min.js', array('jquery', 'jquery-cycle2'), CYCLONE_VERSION, $in_footer );
|
108 |
}
|
109 |
+
if($this->cyclone_settings_data['load_cycle2_swipe'] == 1){
|
110 |
wp_enqueue_script( 'jquery-cycle2-swipe', CYCLONE_URL.'libs/cycle2/jquery.cycle2.swipe.min.js', array('jquery', 'jquery-cycle2'), CYCLONE_VERSION, $in_footer );
|
111 |
}
|
112 |
+
if($this->cyclone_settings_data['load_cycle2_tile'] == 1){
|
113 |
wp_enqueue_script( 'jquery-cycle2-tile', CYCLONE_URL.'libs/cycle2/jquery.cycle2.tile.min.js', array('jquery', 'jquery-cycle2'), CYCLONE_VERSION, $in_footer );
|
114 |
}
|
115 |
+
if($this->cyclone_settings_data['load_cycle2_video'] == 1){
|
116 |
wp_enqueue_script( 'jquery-cycle2-video', CYCLONE_URL.'libs/cycle2/jquery.cycle2.video.min.js', array('jquery', 'jquery-cycle2'), CYCLONE_VERSION, $in_footer );
|
117 |
}
|
118 |
|
119 |
/*** Magnific Popup Scripts ***/
|
120 |
+
if($this->cyclone_settings_data['load_magnific'] == 1){
|
121 |
wp_enqueue_script( 'jquery-magnific-popup', CYCLONE_URL.'libs/magnific-popup/jquery.magnific-popup.min.js', array('jquery'), CYCLONE_VERSION, $in_footer );
|
122 |
}
|
123 |
|
136 |
$ds = DIRECTORY_SEPARATOR;
|
137 |
|
138 |
$template_folders = $this->templates_manager->get_all_templates();
|
139 |
+
$active_templates = $this->templates_manager->get_active_templates( $this->cyclone_settings_data );
|
140 |
+
|
141 |
foreach($template_folders as $name=>$folder){
|
142 |
|
143 |
+
if( 1 == $active_templates[$name] ){
|
144 |
+
$file = $folder['path']."/style.css"; // Path to file
|
145 |
+
|
146 |
+
if( file_exists( $file ) ){ // Check existence
|
147 |
+
wp_enqueue_style( 'cyclone-template-style-'.sanitize_title($name), $folder['url'].'/style.css', array(), CYCLONE_VERSION );
|
148 |
+
}
|
149 |
}
|
150 |
}
|
151 |
}
|
157 |
$ds = DIRECTORY_SEPARATOR;
|
158 |
|
159 |
$in_footer = true;
|
160 |
+
if($this->cyclone_settings_data['load_scripts_in'] == 'header'){
|
161 |
$in_footer = false;
|
162 |
}
|
163 |
|
164 |
$template_folders = $this->templates_manager->get_all_templates();
|
165 |
+
$active_templates = $this->templates_manager->get_active_templates( $this->cyclone_settings_data );
|
166 |
+
|
167 |
foreach($template_folders as $name=>$folder){
|
168 |
|
169 |
+
if( 1 == $active_templates[$name] ){
|
170 |
+
$file = $folder['path']."/script.js"; // Path to file
|
171 |
+
|
172 |
+
if( file_exists( $file ) ){ // Check existence
|
173 |
+
wp_enqueue_script( 'cyclone-template-script-'.sanitize_title($name), $folder['url'].'/script.js', array(), CYCLONE_VERSION, $in_footer );
|
174 |
+
}
|
175 |
}
|
176 |
}
|
177 |
}
|
classes/class-cyclone-slider-settings-page.php
CHANGED
@@ -5,92 +5,49 @@ if(!class_exists('Cyclone_Slider_Settings_Page') and class_exists('Codefleet_Set
|
|
5 |
*/
|
6 |
class Cyclone_Slider_Settings_Page extends Codefleet_Settings_Sub_Page {
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
/**
|
9 |
* Render settings page. This function should echo the HTML form of the settings page.
|
10 |
*/
|
11 |
public function render_settings_page($post){
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
</div>
|
19 |
-
<?php settings_errors();
|
20 |
-
$settings_data = $this->get_settings_data();
|
21 |
-
if(CYCLONE_DEBUG) echo cyclone_slider_debug($settings_data);
|
22 |
-
?>
|
23 |
-
|
24 |
-
<form method="post" action="options.php">
|
25 |
-
<?php
|
26 |
-
echo $this->settings_fields( $this->option_group );
|
27 |
-
?>
|
28 |
-
<table class="form-table">
|
29 |
-
<tr>
|
30 |
-
<th><label for="cs2-settings-load_scripts_in"><?php _e('Load scripts in:', 'cycloneslider'); ?></label></th>
|
31 |
-
<td>
|
32 |
-
<select name="<?php echo esc_attr( $this->option_name."[load_scripts_in]" ); ?>" id="cs2-settings-load_scripts_in">
|
33 |
-
<option value="header" <?php selected($settings_data['load_scripts_in'], 'header'); ?>><?php _e('Header', 'cycloneslider'); ?></option>
|
34 |
-
<option value="footer" <?php selected($settings_data['load_scripts_in'], 'footer'); ?>><?php _e('Footer', 'cycloneslider'); ?></option>
|
35 |
-
</select>
|
36 |
-
</td>
|
37 |
-
</tr>
|
38 |
-
<tr>
|
39 |
-
<th><label for=""><?php _e('Load these scripts:', 'cycloneslider'); ?></label></th>
|
40 |
-
<td>
|
41 |
-
<label for="cs2-settings-load_cycle2">
|
42 |
-
<input type="hidden" name="<?php echo esc_attr( $this->option_name."[load_cycle2]" ); ?>" value="0">
|
43 |
-
<input type="checkbox" id="cs2-settings-load_cycle2" name="<?php echo esc_attr( $this->option_name."[load_cycle2]" ); ?>" value="1" <?php checked($settings_data['load_cycle2'], 1); ?> />
|
44 |
-
<span><em><?php _e('Cycle 2. This is the core script needed by the plugin.', 'cycloneslider'); ?></em></span>
|
45 |
-
</label> <br />
|
46 |
-
<label for="cs2-settings-load_cycle2_carousel">
|
47 |
-
<input type="hidden" name="<?php echo esc_attr( $this->option_name."[load_cycle2_carousel]" ); ?>" value="0">
|
48 |
-
<input type="checkbox" id="cs2-settings-load_cycle2_carousel" name="<?php echo esc_attr( $this->option_name."[load_cycle2_carousel]" ); ?>" value="1" <?php checked($settings_data['load_cycle2_carousel'], 1); ?> />
|
49 |
-
<span><em><?php _e('Cycle 2 - Carousel. Used by these templates: Galleria, Lea, Dos.', 'cycloneslider'); ?></em></span>
|
50 |
-
</label> <br />
|
51 |
-
<label for="cs2-settings-load_cycle2_swipe">
|
52 |
-
<input type="hidden" name="<?php echo esc_attr( $this->option_name."[load_cycle2_swipe]" ); ?>" value="0">
|
53 |
-
<input type="checkbox" id="cs2-settings-load_cycle2_swipe" name="<?php echo esc_attr( $this->option_name."[load_cycle2_swipe]" ); ?>" value="1" <?php checked($settings_data['load_cycle2_swipe'], 1); ?> />
|
54 |
-
<span><em><?php _e('Cycle 2 - Swipe. For touch swipe events.', 'cycloneslider'); ?></em></span>
|
55 |
-
</label> <br />
|
56 |
-
<label for="cs2-settings-load_cycle2_tile">
|
57 |
-
<input type="hidden" name="<?php echo esc_attr( $this->option_name."[load_cycle2_tile]" ); ?>" value="0">
|
58 |
-
<input type="checkbox" id="cs2-settings-load_cycle2_tile" name="<?php echo esc_attr( $this->option_name."[load_cycle2_tile]" ); ?>" value="1" <?php checked($settings_data['load_cycle2_tile'], 1); ?> />
|
59 |
-
<span><em><?php _e('Cycle 2 - Tile. Used for tile transition effects.', 'cycloneslider'); ?></em></span>
|
60 |
-
</label> <br />
|
61 |
-
<label for="cs2-settings-load_cycle2_video">
|
62 |
-
<input type="hidden" name="<?php echo esc_attr( $this->option_name."[load_cycle2_video]" ); ?>" value="0">
|
63 |
-
<input type="checkbox" id="cs2-settings-load_cycle2_video" name="<?php echo esc_attr( $this->option_name."[load_cycle2_video]" ); ?>" value="1" <?php checked($settings_data['load_cycle2_video'], 1); ?> />
|
64 |
-
<span><em><?php _e('Cycle 2 - Video. Used by YouTube template.', 'cycloneslider'); ?></em></span>
|
65 |
-
</label> <br />
|
66 |
-
<label for="cs2-settings-load_magnific">
|
67 |
-
<input type="hidden" name="<?php echo esc_attr( $this->option_name."[load_magnific]" ); ?>" value="0">
|
68 |
-
<input type="checkbox" id="cs2-settings-load_magnific" name="<?php echo esc_attr( $this->option_name."[load_magnific]" ); ?>" disabled value="1" <?php checked($settings_data['load_magnific'], 1); ?> />
|
69 |
-
<span class="cs2-disabled"><em><?php _e('Magnific Popup - Enable lightbox option.', 'cycloneslider'); ?></em></span> <a href="http://www.codefleet.net/cyclone-slider-pro/"><?php _e('Available in pro version.', 'cycloneslider'); ?></a>
|
70 |
-
</label> <br />
|
71 |
-
<label for="cs2-settings-load_easing">
|
72 |
-
<input type="hidden" name="<?php echo esc_attr( $this->option_name."[load_easing]" ); ?>" value="0">
|
73 |
-
<input type="checkbox" id="cs2-settings-load_easing" name="<?php echo esc_attr( $this->option_name."[load_easing]" ); ?>" disabled value="1" <?php checked($settings_data['load_easing'], 1); ?> />
|
74 |
-
<span class="cs2-disabled"><em><?php _e('Easing - Enable easing options.', 'cycloneslider'); ?></em></span> <a href="http://www.codefleet.net/cyclone-slider-pro/"><?php _e('Available in pro version.', 'cycloneslider'); ?></a>
|
75 |
-
</label> <br />
|
76 |
-
</td>
|
77 |
-
</tr>
|
78 |
-
<tr>
|
79 |
-
<th><label for="cs2-settings-script_priority"><?php _e('Scripts loading priority:', 'cycloneslider'); ?></label></th>
|
80 |
-
<td>
|
81 |
-
<input type="number" id="<?php echo esc_attr( 'script_priority' ); ?>" name="<?php echo esc_attr( $this->option_name."[script_priority]" ); ?>" value="<?php echo esc_attr( $this->get_data('script_priority') ); ?>" />
|
82 |
-
<em><?php _e('Make this value bigger to load scripts last.', 'cycloneslider'); ?></em>
|
83 |
-
</td>
|
84 |
-
</tr>
|
85 |
-
</table>
|
86 |
-
<br /><br />
|
87 |
-
<?php submit_button( __('Save Options', 'cycloneslider'), 'primary', 'submit', false) ?>
|
88 |
-
<?php submit_button( __('Restore Defaults', 'cycloneslider'), 'secondary', 'reset', false) ?>
|
89 |
-
</form>
|
90 |
-
|
91 |
-
</div><?php
|
92 |
-
}
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
/**
|
95 |
* Validate data from HTML form
|
96 |
*/
|
@@ -126,6 +83,8 @@ if(!class_exists('Cyclone_Slider_Settings_Page') and class_exists('Codefleet_Set
|
|
126 |
|
127 |
$defaults['load_magnific'] = 0;
|
128 |
|
|
|
|
|
129 |
$defaults['script_priority'] = 100;
|
130 |
return $defaults;
|
131 |
}
|
5 |
*/
|
6 |
class Cyclone_Slider_Settings_Page extends Codefleet_Settings_Sub_Page {
|
7 |
|
8 |
+
protected $view; // Holds the instance of Cyclone_Slider_View
|
9 |
+
protected $templates_manager; // Holds template manager object
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Initialize
|
13 |
+
*/
|
14 |
+
public function __construct( $view, $templates_manager ) {
|
15 |
+
parent::__construct();
|
16 |
+
// Dependency injections
|
17 |
+
$this->view = $view;
|
18 |
+
$this->templates_manager = $templates_manager;
|
19 |
+
}
|
20 |
+
|
21 |
/**
|
22 |
* Render settings page. This function should echo the HTML form of the settings page.
|
23 |
*/
|
24 |
public function render_settings_page($post){
|
25 |
+
$this->view->set_view_file( CYCLONE_PATH . 'views/settings-page.php' );
|
26 |
+
|
27 |
+
$settings_data = $this->get_settings_data();
|
28 |
+
$templates = $this->templates_manager->get_all_templates();
|
29 |
+
|
30 |
+
$settings_data['load_templates'] = $this->templates_manager->get_active_templates( $settings_data );// Filter load templates
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
+
|
33 |
+
$vars = array();
|
34 |
+
$vars['page_title'] = $this->page_title;
|
35 |
+
$vars['screen_icon'] = get_screen_icon('options-general'); ;
|
36 |
+
|
37 |
+
|
38 |
+
$vars['settings_fields'] = $this->settings_fields( $this->option_group );
|
39 |
+
$vars['option_name'] = $this->option_name;
|
40 |
+
|
41 |
+
|
42 |
+
$vars['templates'] = $templates;
|
43 |
+
$vars['settings_data'] = $settings_data;
|
44 |
+
|
45 |
+
$vars['debug'] = (CYCLONE_DEBUG) ? cyclone_slider_debug( $vars['settings_data'] ) : '';
|
46 |
+
|
47 |
+
$this->view->set_vars( $vars );
|
48 |
+
$this->view->render();
|
49 |
+
}
|
50 |
+
|
51 |
/**
|
52 |
* Validate data from HTML form
|
53 |
*/
|
83 |
|
84 |
$defaults['load_magnific'] = 0;
|
85 |
|
86 |
+
$defaults['load_templates'] = array();
|
87 |
+
|
88 |
$defaults['script_priority'] = 100;
|
89 |
return $defaults;
|
90 |
}
|
classes/class-cyclone-templates-manager.php
CHANGED
@@ -54,6 +54,26 @@ if(!class_exists('Cyclone_Templates_Manager')):
|
|
54 |
|
55 |
}
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
/**
|
58 |
* Get Template Locations
|
59 |
*
|
54 |
|
55 |
}
|
56 |
|
57 |
+
/**
|
58 |
+
* Get Active Templates
|
59 |
+
*
|
60 |
+
* Get templates that are enabled in settings page
|
61 |
+
*
|
62 |
+
* @return array Template locations
|
63 |
+
*/
|
64 |
+
public function get_active_templates( $settings_data ){
|
65 |
+
|
66 |
+
$templates = $this->get_all_templates();
|
67 |
+
|
68 |
+
foreach($templates as $name=>$template){
|
69 |
+
|
70 |
+
if( !isset($settings_data['load_templates'][$name]) ){
|
71 |
+
$settings_data['load_templates'][$name] = 1;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
return $settings_data['load_templates'];
|
75 |
+
}
|
76 |
+
|
77 |
/**
|
78 |
* Get Template Locations
|
79 |
*
|
cyclone-slider.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Cyclone Slider 2
|
4 |
Plugin URI: http://www.codefleet.net/cyclone-slider-pro/
|
5 |
Description: Create and manage sliders with ease. Built for both casual users and developers.
|
6 |
-
Version: 2.7.
|
7 |
Author: Nico Amarilla
|
8 |
Author URI: http://www.codefleet.net/
|
9 |
License:
|
@@ -25,7 +25,7 @@ License:
|
|
25 |
|
26 |
*/
|
27 |
if(!defined('CYCLONE_VERSION')){
|
28 |
-
define('CYCLONE_VERSION', '2.7.
|
29 |
}
|
30 |
if(!defined('CYCLONE_PATH')){
|
31 |
define('CYCLONE_PATH', realpath(plugin_dir_path(__FILE__)) . DIRECTORY_SEPARATOR );
|
@@ -79,15 +79,6 @@ $cyclone_slider_exporter = new Cyclone_Slider_Exporter( $cyclone_slider_data );
|
|
79 |
|
80 |
$cyclone_slider_importer = new Cyclone_Slider_Importer( $cyclone_slider_data );
|
81 |
|
82 |
-
$cyclone_slider_settings_page = new Cyclone_Slider_Settings_Page();
|
83 |
-
$cyclone_slider_settings_page->set_option_group('cyclone_option_group');
|
84 |
-
$cyclone_slider_settings_page->set_option_name('cyclone_option_name');
|
85 |
-
$cyclone_slider_settings_page->set_parent_slug('edit.php?post_type=cycloneslider');
|
86 |
-
$cyclone_slider_settings_page->set_menu_slug('cycloneslider-settings');
|
87 |
-
|
88 |
-
$cyclone_slider_youtube = new Cyclone_Slider_Youtube();
|
89 |
-
$cyclone_slider_vimeo = new Cyclone_Slider_Vimeo();
|
90 |
-
|
91 |
$cyclone_slider_templates_manager = new Cyclone_Templates_Manager();
|
92 |
|
93 |
// Add directories to get templates
|
@@ -97,7 +88,6 @@ $cyclone_slider_templates_manager->add_template_location(
|
|
97 |
'url'=>CYCLONE_URL.'templates/'
|
98 |
)
|
99 |
);
|
100 |
-
|
101 |
$cyclone_slider_templates_manager->add_template_location(
|
102 |
array(
|
103 |
'path'=> realpath(get_stylesheet_directory()).DIRECTORY_SEPARATOR.'cycloneslider'.DIRECTORY_SEPARATOR,// This resides in the current theme or child theme
|
@@ -105,9 +95,20 @@ $cyclone_slider_templates_manager->add_template_location(
|
|
105 |
)
|
106 |
);
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
$cyclone_slider_scripts = new Cyclone_Slider_Scripts( $cyclone_slider_templates_manager, $cyclone_slider_settings_page->get_settings_data() );
|
109 |
|
110 |
-
$cyclone_slider_admin = new Cyclone_Slider_Admin( $codefleet_view, $cyclone_slider_scripts, $cyclone_slider_templates_manager, $cyclone_slider_data );
|
111 |
|
112 |
$cyclone_slider_plugin_instance = new Cyclone_Slider( $cyclone_slider_scripts, $cyclone_slider_data, $codefleet_view, $cyclone_slider_templates_manager, $cyclone_slider_youtube, $cyclone_slider_vimeo );
|
113 |
|
3 |
Plugin Name: Cyclone Slider 2
|
4 |
Plugin URI: http://www.codefleet.net/cyclone-slider-pro/
|
5 |
Description: Create and manage sliders with ease. Built for both casual users and developers.
|
6 |
+
Version: 2.7.2
|
7 |
Author: Nico Amarilla
|
8 |
Author URI: http://www.codefleet.net/
|
9 |
License:
|
25 |
|
26 |
*/
|
27 |
if(!defined('CYCLONE_VERSION')){
|
28 |
+
define('CYCLONE_VERSION', '2.7.2' );
|
29 |
}
|
30 |
if(!defined('CYCLONE_PATH')){
|
31 |
define('CYCLONE_PATH', realpath(plugin_dir_path(__FILE__)) . DIRECTORY_SEPARATOR );
|
79 |
|
80 |
$cyclone_slider_importer = new Cyclone_Slider_Importer( $cyclone_slider_data );
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
$cyclone_slider_templates_manager = new Cyclone_Templates_Manager();
|
83 |
|
84 |
// Add directories to get templates
|
88 |
'url'=>CYCLONE_URL.'templates/'
|
89 |
)
|
90 |
);
|
|
|
91 |
$cyclone_slider_templates_manager->add_template_location(
|
92 |
array(
|
93 |
'path'=> realpath(get_stylesheet_directory()).DIRECTORY_SEPARATOR.'cycloneslider'.DIRECTORY_SEPARATOR,// This resides in the current theme or child theme
|
95 |
)
|
96 |
);
|
97 |
|
98 |
+
$cyclone_slider_settings_page = new Cyclone_Slider_Settings_Page( $codefleet_view, $cyclone_slider_templates_manager );
|
99 |
+
$cyclone_slider_settings_page->set_option_group('cyclone_option_group');
|
100 |
+
$cyclone_slider_settings_page->set_option_name('cyclone_option_name');
|
101 |
+
$cyclone_slider_settings_page->set_parent_slug('edit.php?post_type=cycloneslider');
|
102 |
+
$cyclone_slider_settings_page->set_menu_slug('cycloneslider-settings');
|
103 |
+
|
104 |
+
$cyclone_slider_youtube = new Cyclone_Slider_Youtube();
|
105 |
+
$cyclone_slider_vimeo = new Cyclone_Slider_Vimeo();
|
106 |
+
|
107 |
+
|
108 |
+
|
109 |
$cyclone_slider_scripts = new Cyclone_Slider_Scripts( $cyclone_slider_templates_manager, $cyclone_slider_settings_page->get_settings_data() );
|
110 |
|
111 |
+
$cyclone_slider_admin = new Cyclone_Slider_Admin( $codefleet_view, $cyclone_slider_scripts, $cyclone_slider_templates_manager, $cyclone_slider_data, $cyclone_slider_settings_page->get_settings_data() );
|
112 |
|
113 |
$cyclone_slider_plugin_instance = new Cyclone_Slider( $cyclone_slider_scripts, $cyclone_slider_data, $codefleet_view, $cyclone_slider_templates_manager, $cyclone_slider_youtube, $cyclone_slider_vimeo );
|
114 |
|
views/export-step-1.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
</h2>
|
9 |
<h2><?php _e('Cyclone Slider Export', 'cycloneslider'); ?></h2>
|
10 |
<div class="intro">
|
11 |
-
<?php echo cyclone_slider_debug( $cycloneslider_export ); ?>
|
12 |
</div>
|
13 |
<form method="post" action="<?php echo $form_url; ?>">
|
14 |
<input type="hidden" name="<?php echo $nonce_name; ?>" value="<?php echo $nonce; ?>" />
|
8 |
</h2>
|
9 |
<h2><?php _e('Cyclone Slider Export', 'cycloneslider'); ?></h2>
|
10 |
<div class="intro">
|
11 |
+
<?php if(CYCLONE_DEBUG) echo cyclone_slider_debug( $cycloneslider_export ); ?>
|
12 |
</div>
|
13 |
<form method="post" action="<?php echo $form_url; ?>">
|
14 |
<input type="hidden" name="<?php echo $nonce_name; ?>" value="<?php echo $nonce; ?>" />
|
views/settings-page.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if(!defined('ABSPATH')) die('Direct access denied.'); ?>
|
2 |
+
|
3 |
+
<div class="wrap">
|
4 |
+
<?php echo $screen_icon; ?>
|
5 |
+
<h2><?php echo $page_title; ?></h2>
|
6 |
+
<div class="intro">
|
7 |
+
<p><?php _e('Play with these settings if Cyclone Slider 2 is not working or if you want to optimize it.', 'cycloneslider'); ?></p>
|
8 |
+
</div>
|
9 |
+
<?php settings_errors();?>
|
10 |
+
<?php echo $debug; ?>
|
11 |
+
<form method="post" action="options.php">
|
12 |
+
<?php
|
13 |
+
echo $settings_fields;
|
14 |
+
?>
|
15 |
+
<table class="form-table">
|
16 |
+
<tr>
|
17 |
+
<th><label for="cs2-settings-load_scripts_in"><?php _e('Load scripts in:', 'cycloneslider'); ?></label></th>
|
18 |
+
<td>
|
19 |
+
<select name="<?php echo esc_attr( $option_name."[load_scripts_in]" ); ?>" id="cs2-settings-load_scripts_in">
|
20 |
+
<option value="header" <?php selected($settings_data['load_scripts_in'], 'header'); ?>><?php _e('Header', 'cycloneslider'); ?></option>
|
21 |
+
<option value="footer" <?php selected($settings_data['load_scripts_in'], 'footer'); ?>><?php _e('Footer', 'cycloneslider'); ?></option>
|
22 |
+
</select>
|
23 |
+
</td>
|
24 |
+
</tr>
|
25 |
+
<tr>
|
26 |
+
<th><label for=""><?php _e('Load these scripts:', 'cycloneslider'); ?></label></th>
|
27 |
+
<td>
|
28 |
+
<label for="cs2-settings-load_cycle2">
|
29 |
+
<input type="hidden" name="<?php echo esc_attr( $option_name."[load_cycle2]" ); ?>" value="0">
|
30 |
+
<input type="checkbox" id="cs2-settings-load_cycle2" name="<?php echo esc_attr( $option_name."[load_cycle2]" ); ?>" value="1" <?php checked($settings_data['load_cycle2'], 1); ?> />
|
31 |
+
<span><em><?php _e('Cycle 2. This is the core script needed by the plugin.', 'cycloneslider'); ?></em></span>
|
32 |
+
</label> <br />
|
33 |
+
<label for="cs2-settings-load_cycle2_carousel">
|
34 |
+
<input type="hidden" name="<?php echo esc_attr( $option_name."[load_cycle2_carousel]" ); ?>" value="0">
|
35 |
+
<input type="checkbox" id="cs2-settings-load_cycle2_carousel" name="<?php echo esc_attr( $option_name."[load_cycle2_carousel]" ); ?>" value="1" <?php checked($settings_data['load_cycle2_carousel'], 1); ?> />
|
36 |
+
<span><em><?php _e('Cycle 2 - Carousel. Used by these templates: Galleria, Lea, Dos.', 'cycloneslider'); ?></em></span>
|
37 |
+
</label> <br />
|
38 |
+
<label for="cs2-settings-load_cycle2_swipe">
|
39 |
+
<input type="hidden" name="<?php echo esc_attr( $option_name."[load_cycle2_swipe]" ); ?>" value="0">
|
40 |
+
<input type="checkbox" id="cs2-settings-load_cycle2_swipe" name="<?php echo esc_attr( $option_name."[load_cycle2_swipe]" ); ?>" value="1" <?php checked($settings_data['load_cycle2_swipe'], 1); ?> />
|
41 |
+
<span><em><?php _e('Cycle 2 - Swipe. For touch swipe events.', 'cycloneslider'); ?></em></span>
|
42 |
+
</label> <br />
|
43 |
+
<label for="cs2-settings-load_cycle2_tile">
|
44 |
+
<input type="hidden" name="<?php echo esc_attr( $option_name."[load_cycle2_tile]" ); ?>" value="0">
|
45 |
+
<input type="checkbox" id="cs2-settings-load_cycle2_tile" name="<?php echo esc_attr( $option_name."[load_cycle2_tile]" ); ?>" value="1" <?php checked($settings_data['load_cycle2_tile'], 1); ?> />
|
46 |
+
<span><em><?php _e('Cycle 2 - Tile. Used for tile transition effects.', 'cycloneslider'); ?></em></span>
|
47 |
+
</label> <br />
|
48 |
+
<label for="cs2-settings-load_cycle2_video">
|
49 |
+
<input type="hidden" name="<?php echo esc_attr( $option_name."[load_cycle2_video]" ); ?>" value="0">
|
50 |
+
<input type="checkbox" id="cs2-settings-load_cycle2_video" name="<?php echo esc_attr( $option_name."[load_cycle2_video]" ); ?>" value="1" <?php checked($settings_data['load_cycle2_video'], 1); ?> />
|
51 |
+
<span><em><?php _e('Cycle 2 - Video. Used by YouTube template.', 'cycloneslider'); ?></em></span>
|
52 |
+
</label> <br />
|
53 |
+
<label for="cs2-settings-load_magnific">
|
54 |
+
<input type="hidden" name="<?php echo esc_attr( $this->option_name."[load_magnific]" ); ?>" value="0">
|
55 |
+
<input type="checkbox" id="cs2-settings-load_magnific" name="<?php echo esc_attr( $this->option_name."[load_magnific]" ); ?>" disabled value="1" <?php checked($settings_data['load_magnific'], 1); ?> />
|
56 |
+
<span class="cs2-disabled"><em><?php _e('Magnific Popup - Enable lightbox option.', 'cycloneslider'); ?></em></span> <a href="http://www.codefleet.net/cyclone-slider-pro/"><?php _e('Available in pro version.', 'cycloneslider'); ?></a>
|
57 |
+
</label> <br />
|
58 |
+
<label for="cs2-settings-load_easing">
|
59 |
+
<input type="hidden" name="<?php echo esc_attr( $this->option_name."[load_easing]" ); ?>" value="0">
|
60 |
+
<input type="checkbox" id="cs2-settings-load_easing" name="<?php echo esc_attr( $this->option_name."[load_easing]" ); ?>" disabled value="1" <?php checked($settings_data['load_easing'], 1); ?> />
|
61 |
+
<span class="cs2-disabled"><em><?php _e('Easing - Enable easing options.', 'cycloneslider'); ?></em></span> <a href="http://www.codefleet.net/cyclone-slider-pro/"><?php _e('Available in pro version.', 'cycloneslider'); ?></a>
|
62 |
+
</label> <br />
|
63 |
+
</td>
|
64 |
+
</tr>
|
65 |
+
<tr>
|
66 |
+
<th><label for="cs2-settings-script_priority"><?php _e('Scripts loading priority:', 'cycloneslider'); ?></label></th>
|
67 |
+
<td>
|
68 |
+
<input type="number" id="<?php echo esc_attr( 'script_priority' ); ?>" name="<?php echo esc_attr( $option_name."[script_priority]" ); ?>" value="<?php echo esc_attr( $settings_data['script_priority'] ); ?>" />
|
69 |
+
<em><?php _e('Make this value bigger to load scripts last.', 'cycloneslider'); ?></em>
|
70 |
+
</td>
|
71 |
+
</tr>
|
72 |
+
<tr>
|
73 |
+
<th><label for=""><?php _e('Load these templates:', 'cycloneslider'); ?></label></th>
|
74 |
+
<td>
|
75 |
+
<?php foreach($templates as $name=>$template): ?>
|
76 |
+
<label for="cs2-settings-load_templates-<?php echo esc_attr( $name ); ?>">
|
77 |
+
<input type="hidden" name="<?php echo esc_attr( $option_name."[load_templates][$name]" ); ?>" value="0">
|
78 |
+
<input type="checkbox" id="cs2-settings-load_templates-<?php echo esc_attr( $name ); ?>" name="<?php echo esc_attr( $option_name."[load_templates][$name]" ); ?>" value="1" <?php checked(@$settings_data['load_templates'][$name], 1); ?> />
|
79 |
+
<span><em><?php echo esc_attr( ucwords($name) ); ?></em></span>
|
80 |
+
</label> <br />
|
81 |
+
<?php endforeach; ?>
|
82 |
+
</td>
|
83 |
+
</tr>
|
84 |
+
</table>
|
85 |
+
<br /><br />
|
86 |
+
<?php submit_button( __('Save Options', 'cycloneslider'), 'primary', 'submit', false) ?>
|
87 |
+
<?php submit_button( __('Restore Defaults', 'cycloneslider'), 'secondary', 'reset', false) ?>
|
88 |
+
</form>
|
89 |
+
|
90 |
+
</div>
|