Version Description
- Fixed: Namespace complications found with the Slideshow widget, renamed all classes.
Download this release
Release Info
Developer | stefanboonstra |
Plugin | Slideshow |
Version | 1.3.5 |
Comparing to | |
See all releases |
Code changes from version 1.3.4 to 1.3.5
- classes/{Slideshow.php → SlideshowPlugin.php} +10 -10
- classes/{SlideshowFeedback.php → SlideshowPluginFeedback.php} +4 -4
- classes/{SlideshowPostType.php → SlideshowPluginPostType.php} +14 -14
- classes/{SlideshowShortcode.php → SlideshowPluginShortcode.php} +4 -4
- classes/{SlideshowUpload.php → SlideshowPluginUpload.php} +5 -5
- classes/{SlideshowWidget.php → SlideshowPluginWidget.php} +8 -8
- js/{Slideshow → SlideshowPlugin}/slideshow.js +0 -0
- js/{SlideshowFeedback → SlideshowPluginFeedback}/feedback.js +0 -0
- js/{SlideshowPostType → SlideshowPluginPostType}/style-settings.js +0 -0
- js/{SlideshowUpload → SlideshowPluginUpload}/upload-button.js +0 -0
- readme.txt +5 -2
- slideshow.php +12 -23
- style/{Slideshow → SlideshowPlugin}/style-dark.css +0 -0
- style/{Slideshow → SlideshowPlugin}/style-transparent.css +0 -0
- views/{Slideshow → SlideshowPlugin}/slideshow.php +0 -0
- views/{SlideshowPostType → SlideshowPluginPostType}/information.php +0 -0
- views/{SlideshowPostType → SlideshowPluginPostType}/settings.php +0 -0
- views/{SlideshowPostType → SlideshowPluginPostType}/slides.php +0 -0
- views/{SlideshowPostType → SlideshowPluginPostType}/style-settings.php +0 -0
- views/{SlideshowUpload → SlideshowPluginUpload}/upload-button.php +0 -0
- views/{SlideshowWidget → SlideshowPluginWidget}/form.php +0 -0
- views/{SlideshowWidget → SlideshowPluginWidget}/widget.php +0 -0
classes/{Slideshow.php → SlideshowPlugin.php}
RENAMED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Class
|
4 |
* Responsible for outputting the slideshow's HTML, CSS and Javascript.
|
5 |
*
|
6 |
* @author: Stefan Boonstra
|
7 |
-
* @version:
|
8 |
*/
|
9 |
-
class
|
10 |
|
11 |
/**
|
12 |
* Function deploy prints out the prepared html
|
@@ -33,7 +33,7 @@ class Slideshow {
|
|
33 |
$post = get_posts(array(
|
34 |
'numberposts' => 1,
|
35 |
'orderby' => 'rand',
|
36 |
-
'post_type' =>
|
37 |
));
|
38 |
|
39 |
if(is_array($post))
|
@@ -43,14 +43,14 @@ class Slideshow {
|
|
43 |
|
44 |
// Exit function on error
|
45 |
if(empty($post))
|
46 |
-
return;
|
47 |
|
48 |
// Get settings
|
49 |
-
$settings =
|
50 |
|
51 |
// Load images into array
|
52 |
$images = array();
|
53 |
-
$imageObjects =
|
54 |
foreach($imageObjects as $key => $imageObject){
|
55 |
$images[$key] = array(
|
56 |
'img' => $imageObject->guid,
|
@@ -67,19 +67,19 @@ class Slideshow {
|
|
67 |
else // Custom style, print it.
|
68 |
wp_enqueue_style(
|
69 |
'slideshow_style',
|
70 |
-
|
71 |
);
|
72 |
|
73 |
// Include output file that stores output in $output.
|
74 |
$output = '';
|
75 |
ob_start();
|
76 |
-
include(
|
77 |
$output .= ob_get_clean();
|
78 |
|
79 |
// Enqueue slideshow script
|
80 |
wp_enqueue_script(
|
81 |
'slideshow_script',
|
82 |
-
|
83 |
array('jquery'),
|
84 |
false,
|
85 |
true
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Class SlideslowPlugin is called whenever a slideshow do_action tag is come across.
|
4 |
* Responsible for outputting the slideshow's HTML, CSS and Javascript.
|
5 |
*
|
6 |
* @author: Stefan Boonstra
|
7 |
+
* @version: 03-07-12
|
8 |
*/
|
9 |
+
class SlideshowPlugin {
|
10 |
|
11 |
/**
|
12 |
* Function deploy prints out the prepared html
|
33 |
$post = get_posts(array(
|
34 |
'numberposts' => 1,
|
35 |
'orderby' => 'rand',
|
36 |
+
'post_type' => SlideshowPluginPostType::$postType
|
37 |
));
|
38 |
|
39 |
if(is_array($post))
|
43 |
|
44 |
// Exit function on error
|
45 |
if(empty($post))
|
46 |
+
return '';
|
47 |
|
48 |
// Get settings
|
49 |
+
$settings = SlideshowPluginPostType::getSettings($post->ID);
|
50 |
|
51 |
// Load images into array
|
52 |
$images = array();
|
53 |
+
$imageObjects = SlideshowPluginPostType::getAttachments($post->ID);
|
54 |
foreach($imageObjects as $key => $imageObject){
|
55 |
$images[$key] = array(
|
56 |
'img' => $imageObject->guid,
|
67 |
else // Custom style, print it.
|
68 |
wp_enqueue_style(
|
69 |
'slideshow_style',
|
70 |
+
SlideshowPluginMain::getPluginUrl() . '/style/' . __CLASS__ . '/' . $settings['style']
|
71 |
);
|
72 |
|
73 |
// Include output file that stores output in $output.
|
74 |
$output = '';
|
75 |
ob_start();
|
76 |
+
include(SlideshowPluginMain::getPluginPath() . '/views/' . __CLASS__ . '/slideshow.php');
|
77 |
$output .= ob_get_clean();
|
78 |
|
79 |
// Enqueue slideshow script
|
80 |
wp_enqueue_script(
|
81 |
'slideshow_script',
|
82 |
+
SlideshowPluginMain::getPluginUrl() . '/js/' . __CLASS__ . '/slideshow.js',
|
83 |
array('jquery'),
|
84 |
false,
|
85 |
true
|
classes/{SlideshowFeedback.php → SlideshowPluginFeedback.php}
RENAMED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Class
|
4 |
*
|
5 |
* @author: Stefan Boonstra
|
6 |
-
* @version:
|
7 |
*/
|
8 |
-
class
|
9 |
|
10 |
/** Variables */
|
11 |
static $feedbackDateKey = 'slideshow-feedback-date';
|
@@ -41,7 +41,7 @@ class SlideshowFeedback {
|
|
41 |
'method' => self::$method,
|
42 |
'access' => self::$access,
|
43 |
'host' => $_SERVER['HTTP_HOST'],
|
44 |
-
'version' =>
|
45 |
);
|
46 |
|
47 |
self::send(self::$address, $variables);
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Class SlideshowPluginFeedback collects plugin feedback which helps resolving plugin-related issues faster.
|
4 |
*
|
5 |
* @author: Stefan Boonstra
|
6 |
+
* @version: 03-07-12
|
7 |
*/
|
8 |
+
class SlideshowPluginFeedback {
|
9 |
|
10 |
/** Variables */
|
11 |
static $feedbackDateKey = 'slideshow-feedback-date';
|
41 |
'method' => self::$method,
|
42 |
'access' => self::$access,
|
43 |
'host' => $_SERVER['HTTP_HOST'],
|
44 |
+
'version' => SlideshowPluginMain::$version
|
45 |
);
|
46 |
|
47 |
self::send(self::$address, $variables);
|
classes/{SlideshowPostType.php → SlideshowPluginPostType.php}
RENAMED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
* slideshows and their individual settings
|
5 |
*
|
6 |
* @author: Stefan Boonstra
|
7 |
-
* @version:
|
8 |
*/
|
9 |
-
class
|
10 |
|
11 |
/** Variables */
|
12 |
private static $adminIcon = 'images/adminIcon.png';
|
@@ -66,7 +66,7 @@ class SlideshowPostType {
|
|
66 |
'has_archive' => true,
|
67 |
'hierarchical' => false,
|
68 |
'menu_position' => null,
|
69 |
-
'menu_icon' =>
|
70 |
'supports' => array('title'),
|
71 |
'register_meta_box_cb' => array(__CLASS__, 'registerMetaBoxes')
|
72 |
)
|
@@ -121,9 +121,9 @@ class SlideshowPostType {
|
|
121 |
global $post;
|
122 |
|
123 |
$snippet = htmlentities(sprintf('<?php do_action(\'slideshow_deploy\', \'%s\'); ?>', $post->ID));
|
124 |
-
$shortCode = htmlentities(sprintf('[' .
|
125 |
|
126 |
-
include(
|
127 |
}
|
128 |
|
129 |
/**
|
@@ -133,16 +133,16 @@ class SlideshowPostType {
|
|
133 |
global $post;
|
134 |
|
135 |
// Media upload button
|
136 |
-
$uploadButton =
|
137 |
|
138 |
// Get slideshow attachments
|
139 |
$attachments = self::getAttachments($post->ID);
|
140 |
|
141 |
// Set url from which a substitute icon can be fetched
|
142 |
-
$noPreviewIcon =
|
143 |
|
144 |
// Include slides preview file
|
145 |
-
include(
|
146 |
}
|
147 |
|
148 |
/**
|
@@ -158,7 +158,7 @@ class SlideshowPostType {
|
|
158 |
// Get styles from style folder
|
159 |
$styles = array();
|
160 |
$cssExtension = '.css';
|
161 |
-
if($handle = opendir(
|
162 |
while(($file = readdir($handle)) !== false)
|
163 |
if(strlen($file) >= strlen($cssExtension) && substr($file, strlen($file) - strlen($cssExtension)) === $cssExtension)
|
164 |
// Converts the css file's name (style-mystyle.css) and converts it to a user readable name by
|
@@ -180,21 +180,21 @@ class SlideshowPostType {
|
|
180 |
// Fill custom style with default css if empty
|
181 |
if(empty($settings['custom-style'])){
|
182 |
ob_start();
|
183 |
-
include(
|
184 |
$settings['custom-style'] = ob_get_clean();
|
185 |
}
|
186 |
|
187 |
// Enqueue associating script
|
188 |
wp_enqueue_script(
|
189 |
'style-settings',
|
190 |
-
|
191 |
array('jquery'),
|
192 |
false,
|
193 |
true
|
194 |
);
|
195 |
|
196 |
// Include style settings file
|
197 |
-
include(
|
198 |
}
|
199 |
|
200 |
/**
|
@@ -208,7 +208,7 @@ class SlideshowPostType {
|
|
208 |
$settings = self::getSettings($post->ID);
|
209 |
|
210 |
// Include
|
211 |
-
include(
|
212 |
}
|
213 |
|
214 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* SlideshowPluginPostType creates a post type specifically designed for
|
4 |
* slideshows and their individual settings
|
5 |
*
|
6 |
* @author: Stefan Boonstra
|
7 |
+
* @version: 03-07-12
|
8 |
*/
|
9 |
+
class SlideshowPluginPostType {
|
10 |
|
11 |
/** Variables */
|
12 |
private static $adminIcon = 'images/adminIcon.png';
|
66 |
'has_archive' => true,
|
67 |
'hierarchical' => false,
|
68 |
'menu_position' => null,
|
69 |
+
'menu_icon' => SlideshowPluginMain::getPluginUrl() . '/' . self::$adminIcon,
|
70 |
'supports' => array('title'),
|
71 |
'register_meta_box_cb' => array(__CLASS__, 'registerMetaBoxes')
|
72 |
)
|
121 |
global $post;
|
122 |
|
123 |
$snippet = htmlentities(sprintf('<?php do_action(\'slideshow_deploy\', \'%s\'); ?>', $post->ID));
|
124 |
+
$shortCode = htmlentities(sprintf('[' . SlideshowPluginShortcode::$shortCode . ' id=%s]', $post->ID));
|
125 |
|
126 |
+
include(SlideshowPluginMain::getPluginPath() . '/views/' . __CLASS__ . '/information.php');
|
127 |
}
|
128 |
|
129 |
/**
|
133 |
global $post;
|
134 |
|
135 |
// Media upload button
|
136 |
+
$uploadButton = SlideshowPluginUpload::getUploadButton();
|
137 |
|
138 |
// Get slideshow attachments
|
139 |
$attachments = self::getAttachments($post->ID);
|
140 |
|
141 |
// Set url from which a substitute icon can be fetched
|
142 |
+
$noPreviewIcon = SlideshowPluginMain::getPluginUrl() . '/images/no-img.png';
|
143 |
|
144 |
// Include slides preview file
|
145 |
+
include(SlideshowPluginMain::getPluginPath() . '/views/' . __CLASS__ . '/slides.php');
|
146 |
}
|
147 |
|
148 |
/**
|
158 |
// Get styles from style folder
|
159 |
$styles = array();
|
160 |
$cssExtension = '.css';
|
161 |
+
if($handle = opendir(SlideshowPluginMain::getPluginPath() . '/style/SlideshowPlugin/'))
|
162 |
while(($file = readdir($handle)) !== false)
|
163 |
if(strlen($file) >= strlen($cssExtension) && substr($file, strlen($file) - strlen($cssExtension)) === $cssExtension)
|
164 |
// Converts the css file's name (style-mystyle.css) and converts it to a user readable name by
|
180 |
// Fill custom style with default css if empty
|
181 |
if(empty($settings['custom-style'])){
|
182 |
ob_start();
|
183 |
+
include(SlideshowPluginMain::getPluginPath() . '/style/SlideshowPlugin/style-dark.css');
|
184 |
$settings['custom-style'] = ob_get_clean();
|
185 |
}
|
186 |
|
187 |
// Enqueue associating script
|
188 |
wp_enqueue_script(
|
189 |
'style-settings',
|
190 |
+
SlideshowPluginMain::getPluginUrl() . '/js/' . __CLASS__ . '/style-settings.js',
|
191 |
array('jquery'),
|
192 |
false,
|
193 |
true
|
194 |
);
|
195 |
|
196 |
// Include style settings file
|
197 |
+
include(SlideshowPluginMain::getPluginPath() . '/views/' . __CLASS__ . '/style-settings.php');
|
198 |
}
|
199 |
|
200 |
/**
|
208 |
$settings = self::getSettings($post->ID);
|
209 |
|
210 |
// Include
|
211 |
+
include(SlideshowPluginMain::getPluginPath() . '/views/' . __CLASS__ . '/settings.php');
|
212 |
}
|
213 |
|
214 |
/**
|
classes/{SlideshowShortcode.php → SlideshowPluginShortcode.php}
RENAMED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Class
|
4 |
*
|
5 |
* @author: Stefan Boonstra
|
6 |
-
* @version:
|
7 |
*/
|
8 |
-
class
|
9 |
|
10 |
/** Variables */
|
11 |
static $shortCode = 'slideshow_deploy';
|
@@ -22,6 +22,6 @@ class SlideshowShortcode {
|
|
22 |
if(isset($atts['id']))
|
23 |
$postId = $atts['id'];
|
24 |
|
25 |
-
return
|
26 |
}
|
27 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Class SlideshowPluginShortcode is called on use of shortcode anywhere on the website.
|
4 |
*
|
5 |
* @author: Stefan Boonstra
|
6 |
+
* @version: 03-07-12
|
7 |
*/
|
8 |
+
class SlideshowPluginShortcode {
|
9 |
|
10 |
/** Variables */
|
11 |
static $shortCode = 'slideshow_deploy';
|
22 |
if(isset($atts['id']))
|
23 |
$postId = $atts['id'];
|
24 |
|
25 |
+
return SlideshowPlugin::prepare($postId);
|
26 |
}
|
27 |
}
|
classes/{SlideshowUpload.php → SlideshowPluginUpload.php}
RENAMED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Class
|
4 |
* anywhere on a website.
|
5 |
*
|
6 |
* @author: Stefan Boonstra
|
7 |
-
* @version:
|
8 |
*/
|
9 |
-
class
|
10 |
|
11 |
/**
|
12 |
* Returns the html for showing the upload button.
|
@@ -21,7 +21,7 @@ class SlideshowUpload {
|
|
21 |
|
22 |
// Return button html
|
23 |
ob_start();
|
24 |
-
include(
|
25 |
return ob_get_clean();
|
26 |
}
|
27 |
|
@@ -39,7 +39,7 @@ class SlideshowUpload {
|
|
39 |
// Enqueue slideshow upload button script
|
40 |
wp_enqueue_script(
|
41 |
'slideshow-upload-button',
|
42 |
-
|
43 |
array(
|
44 |
'jquery',
|
45 |
'media-upload',
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Class SlideshowPluginUpload provides the code for an upload button that can be used
|
4 |
* anywhere on a website.
|
5 |
*
|
6 |
* @author: Stefan Boonstra
|
7 |
+
* @version: 03-07-12
|
8 |
*/
|
9 |
+
class SlideshowPluginUpload {
|
10 |
|
11 |
/**
|
12 |
* Returns the html for showing the upload button.
|
21 |
|
22 |
// Return button html
|
23 |
ob_start();
|
24 |
+
include(SlideshowPluginMain::getPluginPath() . '/views/' . __CLASS__ . '/upload-button.php');
|
25 |
return ob_get_clean();
|
26 |
}
|
27 |
|
39 |
// Enqueue slideshow upload button script
|
40 |
wp_enqueue_script(
|
41 |
'slideshow-upload-button',
|
42 |
+
SlideshowPluginMain::getPluginUrl() . '/js/' . __CLASS__ . '/upload-button.js',
|
43 |
array(
|
44 |
'jquery',
|
45 |
'media-upload',
|
classes/{SlideshowWidget.php → SlideshowPluginWidget.php}
RENAMED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Class
|
4 |
*
|
5 |
* @author: Stefan Boonstra
|
6 |
-
* @version:
|
7 |
*/
|
8 |
-
class
|
9 |
|
10 |
/** Variables */
|
11 |
static $widgetName = 'Slideshow Widget';
|
@@ -13,7 +13,7 @@ class SlideshowWidget extends WP_Widget {
|
|
13 |
/**
|
14 |
* Initializes the widget
|
15 |
*/
|
16 |
-
function
|
17 |
// Settings
|
18 |
$options = array(
|
19 |
'classname' => 'SlideshowWidget',
|
@@ -46,10 +46,10 @@ class SlideshowWidget extends WP_Widget {
|
|
46 |
$title = $instance['title'];
|
47 |
|
48 |
// Prepare slideshow for output to website.
|
49 |
-
$output =
|
50 |
|
51 |
// Include widget html
|
52 |
-
include(
|
53 |
}
|
54 |
|
55 |
/**
|
@@ -70,11 +70,11 @@ class SlideshowWidget extends WP_Widget {
|
|
70 |
// Get slideshows
|
71 |
$slideshows = get_posts(array(
|
72 |
'numberposts' => null,
|
73 |
-
'post_type' =>
|
74 |
));
|
75 |
|
76 |
// Include form
|
77 |
-
include(
|
78 |
}
|
79 |
|
80 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Class SlideshowPluginWidget allows showing one of your slideshows in your widget area.
|
4 |
*
|
5 |
* @author: Stefan Boonstra
|
6 |
+
* @version: 03-07-12
|
7 |
*/
|
8 |
+
class SlideshowPluginWidget extends WP_Widget {
|
9 |
|
10 |
/** Variables */
|
11 |
static $widgetName = 'Slideshow Widget';
|
13 |
/**
|
14 |
* Initializes the widget
|
15 |
*/
|
16 |
+
function SlideshowPluginWidget(){
|
17 |
// Settings
|
18 |
$options = array(
|
19 |
'classname' => 'SlideshowWidget',
|
46 |
$title = $instance['title'];
|
47 |
|
48 |
// Prepare slideshow for output to website.
|
49 |
+
$output = SlideshowPlugin::prepare($slideshowId);
|
50 |
|
51 |
// Include widget html
|
52 |
+
include(SlideshowPluginMain::getPluginPath() . '/views/' . __CLASS__ . '/widget.php');
|
53 |
}
|
54 |
|
55 |
/**
|
70 |
// Get slideshows
|
71 |
$slideshows = get_posts(array(
|
72 |
'numberposts' => null,
|
73 |
+
'post_type' => SlideshowPluginPostType::$postType
|
74 |
));
|
75 |
|
76 |
// Include form
|
77 |
+
include(SlideshowPluginMain::getPluginPath() . '/views/' . __CLASS__ . '/form.php');
|
78 |
}
|
79 |
|
80 |
/**
|
js/{Slideshow → SlideshowPlugin}/slideshow.js
RENAMED
File without changes
|
js/{SlideshowFeedback → SlideshowPluginFeedback}/feedback.js
RENAMED
File without changes
|
js/{SlideshowPostType → SlideshowPluginPostType}/style-settings.js
RENAMED
File without changes
|
js/{SlideshowUpload → SlideshowPluginUpload}/upload-button.js
RENAMED
File without changes
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
Contributors: stefanboonstra
|
4 |
Tags: slideshow, slider, slide, images, image, photo, gallery, galleries
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 3.4
|
7 |
-
Stable tag: 1.3.
|
8 |
License: GPLv2
|
9 |
|
10 |
Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
|
@@ -61,6 +61,9 @@ You can also use the widget to show any of your slideshows in your sidebar.
|
|
61 |
|
62 |
== Changelog ==
|
63 |
|
|
|
|
|
|
|
64 |
= 1.3.4 =
|
65 |
* Fixed: Custom width of the slideshow will no longer cause buttons to fall off-screeen.
|
66 |
|
3 |
Contributors: stefanboonstra
|
4 |
Tags: slideshow, slider, slide, images, image, photo, gallery, galleries
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 3.4.1
|
7 |
+
Stable tag: 1.3.5
|
8 |
License: GPLv2
|
9 |
|
10 |
Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
|
61 |
|
62 |
== Changelog ==
|
63 |
|
64 |
+
= 1.3.5 =
|
65 |
+
* Fixed: Namespace complications found with the Slideshow widget, renamed all classes.
|
66 |
+
|
67 |
= 1.3.4 =
|
68 |
* Fixed: Custom width of the slideshow will no longer cause buttons to fall off-screeen.
|
69 |
|
slideshow.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Slideshow
|
4 |
Plugin URI: http://stefanboonstra.com
|
5 |
Description: This plugin offers a slideshow that is easily deployable in your website. Images can be assigned through the media page. Options are customizable for every single slideshow on your website.
|
6 |
-
Version: 1.3.
|
7 |
Requires at least: 3.0
|
8 |
Author: StefanBoonstra
|
9 |
Author URI: http://stefanboonstra.com
|
@@ -11,28 +11,17 @@
|
|
11 |
*/
|
12 |
|
13 |
/**
|
14 |
-
* Class
|
15 |
* methods for the other classes to use like the auto-includer and the
|
16 |
* base path/url returning method.
|
17 |
*
|
18 |
* @author Stefan Boonstra
|
19 |
-
* @version
|
20 |
*/
|
21 |
-
class
|
22 |
-
// == 1.4.0 ==
|
23 |
-
// TODO Add user defined link to image (And then tell this guy: http://wordpress.org/support/topic/plugin-slideshow-how-do-i-add-images?replies=4)
|
24 |
-
// TODO Add pause button to slideshow
|
25 |
-
// TODO Add 'switch off endless loop' button
|
26 |
-
// TODO Add functionality to put slides in a different order
|
27 |
-
// TODO Add textual slides
|
28 |
-
// TODO Keep descriptionbox from becoming too dang big.
|
29 |
-
// TODO Fix css so that the theme's css doesn't screw it up
|
30 |
-
|
31 |
-
// == 2.0.0 ==
|
32 |
-
// TODO Revision of the entire script, giving the user the option to align multiple images next to eachother.
|
33 |
|
34 |
/** Variables */
|
35 |
-
static $version = '1.3.
|
36 |
|
37 |
/**
|
38 |
* Bootstraps the application by assigning the right functions to
|
@@ -45,20 +34,20 @@ class SlideshowMain {
|
|
45 |
add_action('init', array(__CLASS__, 'localize'));
|
46 |
|
47 |
// Deploy slide show on do_action('slideshow_deploy'); hook.
|
48 |
-
add_action('slideshow_deploy', array('
|
49 |
|
50 |
// Add shortcode
|
51 |
-
add_shortcode(
|
52 |
|
53 |
// Register widget
|
54 |
-
add_action('widgets_init', array('
|
55 |
|
56 |
// Register slideshow post type
|
57 |
-
|
58 |
|
59 |
// Plugin feedback
|
60 |
-
add_action('admin_head', array('
|
61 |
-
register_deactivation_hook(__FILE__, array('
|
62 |
}
|
63 |
|
64 |
/**
|
@@ -112,4 +101,4 @@ class SlideshowMain {
|
|
112 |
/**
|
113 |
* Activate plugin
|
114 |
*/
|
115 |
-
|
3 |
Plugin Name: Slideshow
|
4 |
Plugin URI: http://stefanboonstra.com
|
5 |
Description: This plugin offers a slideshow that is easily deployable in your website. Images can be assigned through the media page. Options are customizable for every single slideshow on your website.
|
6 |
+
Version: 1.3.5
|
7 |
Requires at least: 3.0
|
8 |
Author: StefanBoonstra
|
9 |
Author URI: http://stefanboonstra.com
|
11 |
*/
|
12 |
|
13 |
/**
|
14 |
+
* Class SlideshowPluginMain fires up the application on plugin load and provides some
|
15 |
* methods for the other classes to use like the auto-includer and the
|
16 |
* base path/url returning method.
|
17 |
*
|
18 |
* @author Stefan Boonstra
|
19 |
+
* @version 03-07-12
|
20 |
*/
|
21 |
+
class SlideshowPluginMain {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
/** Variables */
|
24 |
+
static $version = '1.3.5';
|
25 |
|
26 |
/**
|
27 |
* Bootstraps the application by assigning the right functions to
|
34 |
add_action('init', array(__CLASS__, 'localize'));
|
35 |
|
36 |
// Deploy slide show on do_action('slideshow_deploy'); hook.
|
37 |
+
add_action('slideshow_deploy', array('SlideshowPlugin', 'deploy'));
|
38 |
|
39 |
// Add shortcode
|
40 |
+
add_shortcode(SlideshowPluginShortcode::$shortCode, array('SlideshowPluginShortcode', 'slideshowDeploy'));
|
41 |
|
42 |
// Register widget
|
43 |
+
add_action('widgets_init', array('SlideshowPluginWidget', 'registerWidget'));
|
44 |
|
45 |
// Register slideshow post type
|
46 |
+
SlideshowPluginPostType::initialize();
|
47 |
|
48 |
// Plugin feedback
|
49 |
+
add_action('admin_head', array('SlideshowPluginFeedback', 'adminInitialize'));
|
50 |
+
register_deactivation_hook(__FILE__, array('SlideshowPluginFeedback', 'deactivation'));
|
51 |
}
|
52 |
|
53 |
/**
|
101 |
/**
|
102 |
* Activate plugin
|
103 |
*/
|
104 |
+
SlideShowPluginMain::bootStrap();
|
style/{Slideshow → SlideshowPlugin}/style-dark.css
RENAMED
File without changes
|
style/{Slideshow → SlideshowPlugin}/style-transparent.css
RENAMED
File without changes
|
views/{Slideshow → SlideshowPlugin}/slideshow.php
RENAMED
File without changes
|
views/{SlideshowPostType → SlideshowPluginPostType}/information.php
RENAMED
File without changes
|
views/{SlideshowPostType → SlideshowPluginPostType}/settings.php
RENAMED
File without changes
|
views/{SlideshowPostType → SlideshowPluginPostType}/slides.php
RENAMED
File without changes
|
views/{SlideshowPostType → SlideshowPluginPostType}/style-settings.php
RENAMED
File without changes
|
views/{SlideshowUpload → SlideshowPluginUpload}/upload-button.php
RENAMED
File without changes
|
views/{SlideshowWidget → SlideshowPluginWidget}/form.php
RENAMED
File without changes
|
views/{SlideshowWidget → SlideshowPluginWidget}/widget.php
RENAMED
File without changes
|