Slideshow - Version 2.1.9

Version Description

  • Fixed: Not all admin themes support scripts in the admin footer, admin scripts are moved to the header.
Download this release

Release Info

Developer stefanboonstra
Plugin Icon 128x128 Slideshow
Version 2.1.9
Comparing to
See all releases

Code changes from version 2.1.8 to 2.1.9

classes/SlideshowPluginPostType.php CHANGED
@@ -4,7 +4,7 @@
4
  * slideshows and their individual settings
5
  *
6
  * @author: Stefan Boonstra
7
- * @version: 25-09-12
8
  */
9
  class SlideshowPluginPostType {
10
 
@@ -62,12 +62,30 @@ class SlideshowPluginPostType {
62
  )
63
  );
64
 
65
- // Enqueue associating script
66
- wp_enqueue_script(
67
- 'post-type-handler',
68
- SlideshowPluginMain::getPluginUrl() . '/js/' . __CLASS__ . '/post-type-handler.js',
69
- array('jquery')
70
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  }
72
 
73
  /**
@@ -183,13 +201,6 @@ class SlideshowPluginPostType {
183
  // Set url from which a substitute icon can be fetched
184
  $noPreviewIcon = SlideshowPluginMain::getPluginUrl() . '/images/' . __CLASS__ . '/no-img.png';
185
 
186
- // Enqueue scripts required for sorting the slides list
187
- wp_enqueue_script('jquery');
188
- wp_enqueue_script('jquery-ui-sortable');
189
-
190
- // Enqueue JSColor
191
- wp_enqueue_script('jscolor-colorpicker', SlideshowPluginMain::getPluginUrl() . '/js/SlideshowPluginPostType/jscolor/jscolor.js');
192
-
193
  // Include slides preview file
194
  include(SlideshowPluginMain::getPluginPath() . '/views/' . __CLASS__ . '/slides.php');
195
  }
4
  * slideshows and their individual settings
5
  *
6
  * @author: Stefan Boonstra
7
+ * @version: 03-10-12
8
  */
9
  class SlideshowPluginPostType {
10
 
62
  )
63
  );
64
 
65
+ // jQuery
66
+ wp_enqueue_script('jquery');
67
+
68
+ // If on the admin page
69
+ if(is_admin()){
70
+ // Enqueue associating script
71
+ wp_enqueue_script(
72
+ 'post-type-handler',
73
+ SlideshowPluginMain::getPluginUrl() . '/js/' . __CLASS__ . '/post-type-handler.js',
74
+ array('jquery')
75
+ );
76
+
77
+ // TODO: These scripts have been moved here from the footer. They need to be always printed in the header
78
+ // TODO: a solution for this needs to be found.
79
+ // Enqueue scripts required for sorting the slides list
80
+ wp_enqueue_script('jquery');
81
+ wp_enqueue_script('jquery-ui-sortable');
82
+
83
+ // Enqueue JSColor
84
+ wp_enqueue_script('jscolor-colorpicker', SlideshowPluginMain::getPluginUrl() . '/js/SlideshowPluginPostType/jscolor/jscolor.js');
85
+
86
+ // Enqueue slide insert script and style
87
+ SlideshowPluginSlideInserter::enqueueFiles();
88
+ }
89
  }
90
 
91
  /**
201
  // Set url from which a substitute icon can be fetched
202
  $noPreviewIcon = SlideshowPluginMain::getPluginUrl() . '/images/' . __CLASS__ . '/no-img.png';
203
 
 
 
 
 
 
 
 
204
  // Include slides preview file
205
  include(SlideshowPluginMain::getPluginPath() . '/views/' . __CLASS__ . '/slides.php');
206
  }
classes/SlideshowPluginSlideInserter.php CHANGED
@@ -5,10 +5,13 @@
5
  * TODO This class will probanbly need to be renamed to SlideshowPluginSlideHandler to explain more functionality
6
  * TODO than just inserting slides. (Show and delete functionality should be applied here as well)
7
  * @author Stefan Boonstra
8
- * @version 24-09-2012
9
  */
10
  class SlideshowPluginSlideInserter {
11
 
 
 
 
12
  /**
13
  * Returns the html for showing the image insert button.
14
  * Enqueues scripts unless $enqueueFiles is set to false.
@@ -189,6 +192,10 @@ class SlideshowPluginSlideInserter {
189
  * Enqueues styles and scripts necessary for the media upload button.
190
  */
191
  static function enqueueFiles(){
 
 
 
 
192
  // Enqueue style
193
  wp_enqueue_style(
194
  'slideshow-slide-inserter',
@@ -201,5 +208,8 @@ class SlideshowPluginSlideInserter {
201
  SlideshowPluginMain::getPluginUrl() . '/js/' . __CLASS__ . '/slide-inserter.js',
202
  array('jquery')
203
  );
 
 
 
204
  }
205
  }
5
  * TODO This class will probanbly need to be renamed to SlideshowPluginSlideHandler to explain more functionality
6
  * TODO than just inserting slides. (Show and delete functionality should be applied here as well)
7
  * @author Stefan Boonstra
8
+ * @version 03-10-2012
9
  */
10
  class SlideshowPluginSlideInserter {
11
 
12
+ /** Flag to see if enqueue function has been called */
13
+ private static $enqueuedFiles;
14
+
15
  /**
16
  * Returns the html for showing the image insert button.
17
  * Enqueues scripts unless $enqueueFiles is set to false.
192
  * Enqueues styles and scripts necessary for the media upload button.
193
  */
194
  static function enqueueFiles(){
195
+ // Check if already enqueued
196
+ if(self::$enqueuedFiles)
197
+ return;
198
+
199
  // Enqueue style
200
  wp_enqueue_style(
201
  'slideshow-slide-inserter',
208
  SlideshowPluginMain::getPluginUrl() . '/js/' . __CLASS__ . '/slide-inserter.js',
209
  array('jquery')
210
  );
211
+
212
+ // Set enqueued to true
213
+ self::$enqueuedFiles = true;
214
  }
215
  }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: http://stefanboonstra.com/donate-to-slideshow/
5
  Tags: slideshow, slider, slide, slides, show, images, image, photo, gallery, galleries, jquery, javascript, video, text
6
  Requires at least: 3.3
7
  Tested up to: 3.4.2
8
- Stable tag: 2.1.8
9
  License: GPLv2
10
 
11
  Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
@@ -40,6 +40,7 @@ different images, settings and styles for each one of them.
40
 
41
  = Project board =
42
 
 
43
  [Slideshow project board - Trello.com](https://trello.com/board/slideshow-plugin-wordpress/506311260cc04591010463c2)
44
 
45
 
@@ -86,13 +87,13 @@ slideshow may not be styled.
86
 
87
  == Screenshots ==
88
 
89
- 1. Here's what some default slideshows can look like. Sit back grab a beer, enjoy.
90
 
91
  2. Create a new slideshow. A shortcode and a code snippet of how to call it is already visible.
92
 
93
- 3. Click the 'Insert Image Slide' button in the Slides List to search and pick images from the Wordpress media page.
94
 
95
- 4. If you haven't uploaded any images yet, you can do so on the Wordpress media page.
96
 
97
  5. The images you selected are directly visible in your Slides List, don't forget to save!
98
 
@@ -106,6 +107,9 @@ slideshow may not be styled.
106
  * Multiple slideshows can now be shown with each its separate styling.
107
  * Users can now search insertable images by post id.
108
 
 
 
 
109
  = 2.1.8 =
110
  * Option added to be able to control whether to use a filter, or to directly output on shortcode.
111
 
5
  Tags: slideshow, slider, slide, slides, show, images, image, photo, gallery, galleries, jquery, javascript, video, text
6
  Requires at least: 3.3
7
  Tested up to: 3.4.2
8
+ Stable tag: 2.1.9
9
  License: GPLv2
10
 
11
  Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
40
 
41
  = Project board =
42
 
43
+ Check upcoming features, bug-fixes and development progress that are currently on the Slideshow project board at:
44
  [Slideshow project board - Trello.com](https://trello.com/board/slideshow-plugin-wordpress/506311260cc04591010463c2)
45
 
46
 
87
 
88
  == Screenshots ==
89
 
90
+ 1. Here's what some default slideshows can look like. Sit back, grab a beer, enjoy.
91
 
92
  2. Create a new slideshow. A shortcode and a code snippet of how to call it is already visible.
93
 
94
+ 3. If you haven't uploaded any images yet, you can do so on the Wordpress media page. Don't forget to insert the images into the slideshow after uploading!
95
 
96
+ 4. Click the 'Insert Image Slide' button in the Slides List to search and pick images from the Wordpress media page.
97
 
98
  5. The images you selected are directly visible in your Slides List, don't forget to save!
99
 
107
  * Multiple slideshows can now be shown with each its separate styling.
108
  * Users can now search insertable images by post id.
109
 
110
+ = 2.1.9 =
111
+ * Fixed: Not all admin themes support scripts in the admin footer, admin scripts are moved to the header.
112
+
113
  = 2.1.8 =
114
  * Option added to be able to control whether to use a filter, or to directly output on shortcode.
115
 
screenshot-3.png CHANGED
Binary file
screenshot-4.png CHANGED
Binary file
slideshow.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Slideshow
4
  Plugin URI: http://wordpress.org/extend/plugins/slideshow-jquery-image-gallery/
5
  Description: This plugin offers a slideshow that is easily deployable in your website. Add any image that has already been uploaded to add to your slideshow. Options and styles are customizable for every single slideshow on your website.
6
- Version: 2.1.8
7
  Requires at least: 3.3
8
  Author: StefanBoonstra
9
  Author URI: http://stefanboonstra.com
@@ -21,7 +21,7 @@
21
  class SlideshowPluginMain {
22
 
23
  /** Variables */
24
- static $version = '2.1.8';
25
 
26
  /**
27
  * Bootstraps the application by assigning the right functions to
3
  Plugin Name: Slideshow
4
  Plugin URI: http://wordpress.org/extend/plugins/slideshow-jquery-image-gallery/
5
  Description: This plugin offers a slideshow that is easily deployable in your website. Add any image that has already been uploaded to add to your slideshow. Options and styles are customizable for every single slideshow on your website.
6
+ Version: 2.1.9
7
  Requires at least: 3.3
8
  Author: StefanBoonstra
9
  Author URI: http://stefanboonstra.com
21
  class SlideshowPluginMain {
22
 
23
  /** Variables */
24
+ static $version = '2.1.9';
25
 
26
  /**
27
  * Bootstraps the application by assigning the right functions to