Version Description
- Fixed: Images that have a, to WordPress, unknown size weren't able to show on all websites.
- Fixed: Images in the image inserter popup were being skipped over when loading more results because of a faulty query.
- All stylesheets are now loaded at the page's bottom to validate in HTML checkers and be cached by the visitor's browser.
- Improved the handling of description boxes. Description boxes will no longer be 'jumpy' nor will they pop up on fly-over.
- Errors in jQuery's 'ready' method no longer stop the slideshow from showing. However, JavaScript errors should always be resolved.
- Text slides can now have transparent backgrounds by leaving the 'Background color' field empty.
Download this release
Release Info
Developer | stefanboonstra |
Plugin | Slideshow |
Version | 2.2.8 |
Comparing to | |
See all releases |
Code changes from version 2.2.7 to 2.2.8
- classes/SlideshowPlugin.php +34 -28
- classes/SlideshowPluginAjax.php +5 -3
- classes/SlideshowPluginGeneralSettings.php +16 -5
- classes/SlideshowPluginInstaller.php +55 -2
- classes/SlideshowPluginPostType.php +0 -20
- classes/SlideshowPluginSlideInserter.php +3 -15
- classes/SlideshowPluginSlideshowStylesheet.php +49 -0
- js/SlideshowPlugin/slideshow.min.js +1 -1
- js/SlideshowPluginSlideInserter/slide-inserter.js +4 -4
- readme.txt +10 -2
- slideshow.php +3 -3
- style/SlideshowPlugin/functional.css +1 -1
- style/SlideshowPlugin/style-dark.css +3 -3
- style/SlideshowPlugin/style-light.css +3 -3
- views/SlideshowPlugin/slideshow.php +2 -8
- views/SlideshowPluginGeneralSettings/custom-styles.php +2 -2
- views/SlideshowPluginPostType/support-plugin.php +0 -9
- views/SlideshowPluginSlideshowSlide/backend_text.php +2 -1
- views/SlideshowPluginSlideshowSlide/frontend_attachment.php +5 -7
- views/SlideshowPluginSlideshowSlide/frontend_text.php +18 -10
classes/SlideshowPlugin.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
*
|
6 |
* @since 1.0.0
|
7 |
* @author: Stefan Boonstra
|
8 |
-
* @version:
|
9 |
*/
|
10 |
class SlideshowPlugin {
|
11 |
|
@@ -34,6 +34,7 @@ class SlideshowPlugin {
|
|
34 |
* @return String $output
|
35 |
*/
|
36 |
static function prepare($postId = null){
|
|
|
37 |
// Get post by its ID, if the ID is not a negative value
|
38 |
if(is_numeric($postId) && $postId >= 0)
|
39 |
$post = get_post($postId);
|
@@ -85,39 +86,44 @@ class SlideshowPlugin {
|
|
85 |
// The slideshow's session ID, allows JavaScript and CSS to distinguish between multiple slideshows
|
86 |
$sessionID = self::$sessionCounter++;
|
87 |
|
88 |
-
//
|
89 |
-
|
90 |
-
if(!isset($style)){
|
91 |
|
92 |
-
//
|
93 |
-
$
|
94 |
-
|
95 |
-
|
|
|
|
|
96 |
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
$
|
|
|
|
|
|
|
101 |
}
|
|
|
|
|
|
|
102 |
}
|
103 |
|
104 |
-
//
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
$style = str_replace('.slideshow_container', '.slideshow_container_' . $sessionID, $style);
|
112 |
-
}
|
113 |
|
114 |
-
//
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
|
122 |
// Include output file to store output in $output.
|
123 |
$output = '';
|
5 |
*
|
6 |
* @since 1.0.0
|
7 |
* @author: Stefan Boonstra
|
8 |
+
* @version: 03-03-2013
|
9 |
*/
|
10 |
class SlideshowPlugin {
|
11 |
|
34 |
* @return String $output
|
35 |
*/
|
36 |
static function prepare($postId = null){
|
37 |
+
|
38 |
// Get post by its ID, if the ID is not a negative value
|
39 |
if(is_numeric($postId) && $postId >= 0)
|
40 |
$post = get_post($postId);
|
86 |
// The slideshow's session ID, allows JavaScript and CSS to distinguish between multiple slideshows
|
87 |
$sessionID = self::$sessionCounter++;
|
88 |
|
89 |
+
// Try to get a custom stylesheet
|
90 |
+
if(isset($styleSettings['style'])){
|
|
|
91 |
|
92 |
+
// Try to get the custom style's version
|
93 |
+
$customStyle = get_option($styleSettings['style'], false);
|
94 |
+
$customStyleVersion = false;
|
95 |
+
if($customStyle){
|
96 |
+
$customStyleVersion = get_option($styleSettings['style'] . '_version', false);
|
97 |
+
}
|
98 |
|
99 |
+
// Style name and version
|
100 |
+
if($customStyle && $customStyleVersion){
|
101 |
+
$styleName = $styleSettings['style'];
|
102 |
+
$styleVersion = $customStyleVersion;
|
103 |
+
}else{
|
104 |
+
$styleName = str_replace('.css', '', $styleSettings['style']);
|
105 |
+
$styleVersion = SlideshowPluginMain::$version;
|
106 |
}
|
107 |
+
}else{
|
108 |
+
$styleName = 'style-light';
|
109 |
+
$styleVersion = SlideshowPluginMain::$version;
|
110 |
}
|
111 |
|
112 |
+
// Register function stylesheet
|
113 |
+
wp_enqueue_style(
|
114 |
+
'slideshow-jquery-image-gallery-stylesheet_functional',
|
115 |
+
SlideshowPluginMain::getPluginUrl() . '/style/' . __CLASS__ . '/functional.css',
|
116 |
+
array(),
|
117 |
+
SlideshowPluginMain::$version
|
118 |
+
);
|
|
|
|
|
119 |
|
120 |
+
// Enqueue stylesheet
|
121 |
+
wp_enqueue_style(
|
122 |
+
'slideshow-jquery-image-gallery-stylesheet_' . $styleName,
|
123 |
+
admin_url('admin-ajax.php') . '?action=slideshow_jquery_image_gallery_load_stylesheet&style=' . $styleName,
|
124 |
+
array('slideshow-jquery-image-gallery-stylesheet_functional'),
|
125 |
+
$styleVersion
|
126 |
+
);
|
127 |
|
128 |
// Include output file to store output in $output.
|
129 |
$output = '';
|
classes/SlideshowPluginAjax.php
CHANGED
@@ -1,12 +1,11 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Class SlideshowAjax is used to register ajax functions
|
4 |
-
*
|
5 |
-
* exceedingly large.
|
6 |
*
|
7 |
* @since 2.0.0
|
8 |
* @author: Stefan Boonstra
|
9 |
-
* @version:
|
10 |
*/
|
11 |
class SlideshowPluginAjax {
|
12 |
|
@@ -18,5 +17,8 @@ class SlideshowPluginAjax {
|
|
18 |
*/
|
19 |
static function init() {
|
20 |
add_action('wp_ajax_slideshow_slide_inserter_search_query', array('SlideshowPluginSlideInserter', 'printSearchResults'));
|
|
|
|
|
|
|
21 |
}
|
22 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
* Class SlideshowAjax is used to register ajax functions
|
4 |
+
* as soon as possible, so they leave a light footprint.
|
|
|
5 |
*
|
6 |
* @since 2.0.0
|
7 |
* @author: Stefan Boonstra
|
8 |
+
* @version: 03-03-13
|
9 |
*/
|
10 |
class SlideshowPluginAjax {
|
11 |
|
17 |
*/
|
18 |
static function init() {
|
19 |
add_action('wp_ajax_slideshow_slide_inserter_search_query', array('SlideshowPluginSlideInserter', 'printSearchResults'));
|
20 |
+
|
21 |
+
add_action('wp_ajax_slideshow_jquery_image_gallery_load_stylesheet', array('SlideshowPluginSlideshowStylesheet', 'loadStylesheet'));
|
22 |
+
add_action('wp_ajax_nopriv_slideshow_jquery_image_gallery_load_stylesheet', array('SlideshowPluginSlideshowStylesheet', 'loadStylesheet'));
|
23 |
}
|
24 |
}
|
classes/SlideshowPluginGeneralSettings.php
CHANGED
@@ -270,12 +270,23 @@ class SlideshowPluginGeneralSettings {
|
|
270 |
// Put custom style key and name into the $newCustomStyle array
|
271 |
$newCustomStyles[$customStyleKey] = isset($customStyleValue['title']) ? $customStyleValue['title'] : __('Untitled', 'slideshow-plugin');
|
272 |
|
|
|
|
|
|
|
273 |
// Create or update new custom style
|
274 |
-
$
|
275 |
-
if(
|
276 |
-
|
277 |
-
|
278 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
279 |
}
|
280 |
}
|
281 |
|
270 |
// Put custom style key and name into the $newCustomStyle array
|
271 |
$newCustomStyles[$customStyleKey] = isset($customStyleValue['title']) ? $customStyleValue['title'] : __('Untitled', 'slideshow-plugin');
|
272 |
|
273 |
+
// Get style
|
274 |
+
$newStyle = isset($customStyleValue['style']) ? $customStyleValue['style'] : '';
|
275 |
+
|
276 |
// Create or update new custom style
|
277 |
+
$oldStyle = get_option($customStyleKey, false);
|
278 |
+
if($oldStyle){
|
279 |
+
|
280 |
+
// Check if style has changed
|
281 |
+
if($oldStyle !== $newStyle){
|
282 |
+
update_option($customStyleKey, $newStyle);
|
283 |
+
update_option($customStyleKey . '_version', time());
|
284 |
+
}
|
285 |
+
}else{
|
286 |
+
// The custom style itself shouldn't be auto-loaded, it's never used within WordPress
|
287 |
+
add_option($customStyleKey, $newStyle, '', 'no');
|
288 |
+
add_option($customStyleKey . '_version', time());
|
289 |
+
}
|
290 |
}
|
291 |
}
|
292 |
|
classes/SlideshowPluginInstaller.php
CHANGED
@@ -61,19 +61,72 @@ class SlideshowPluginInstaller {
|
|
61 |
|
62 |
// Update to version 2.2.0
|
63 |
if(self::firstVersionGreaterThanSecond('2.2.0', $currentVersion) || $currentVersion == null)
|
64 |
-
self::
|
|
|
|
|
|
|
|
|
65 |
|
66 |
// Set new version
|
67 |
update_option(self::$versionKey, SlideshowPluginMain::$version);
|
68 |
}
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
/**
|
71 |
* Version 2.2.0 comes with redesigned stylesheets, which makes the old ones obsolete. Set the style settings for
|
72 |
* each slideshow to 'Light', if it's a custom style.
|
73 |
*
|
74 |
* @since 2.2.0
|
75 |
*/
|
76 |
-
function
|
77 |
|
78 |
// Check if this has already been done
|
79 |
if(get_option('slideshow-jquery-image-gallery-updated-from-v2-1-23-to-v2-2-0') !== false)
|
61 |
|
62 |
// Update to version 2.2.0
|
63 |
if(self::firstVersionGreaterThanSecond('2.2.0', $currentVersion) || $currentVersion == null)
|
64 |
+
self::updateV2_1_23_to_V_2_2_0();
|
65 |
+
|
66 |
+
// Update to version 2.2.0
|
67 |
+
if(self::firstVersionGreaterThanSecond('2.2.8', $currentVersion) || $currentVersion == null)
|
68 |
+
self::updateV2_2_0_to_V_2_2_8();
|
69 |
|
70 |
// Set new version
|
71 |
update_option(self::$versionKey, SlideshowPluginMain::$version);
|
72 |
}
|
73 |
|
74 |
+
/**
|
75 |
+
* Version 2.2.0 to 2.2.8
|
76 |
+
*
|
77 |
+
* In order to output valid HTML, the anchor elements have been moved inside the header and paragraph elements,
|
78 |
+
* rather than wrapping around them. This requires an 'a' to be added to the description classes for the header
|
79 |
+
* and paragraph, which is done here.
|
80 |
+
*
|
81 |
+
* @since 2.2.8
|
82 |
+
*/
|
83 |
+
private static function updateV2_2_0_to_V_2_2_8(){
|
84 |
+
|
85 |
+
// Check if this has already been done
|
86 |
+
if(get_option('slideshow-jquery-image-gallery-updated-from-v2-2-0-to-v2-2-8') !== false)
|
87 |
+
return;
|
88 |
+
|
89 |
+
$customStylesOptionsKey = 'slideshow-jquery-image-gallery-custom-styles';
|
90 |
+
|
91 |
+
// Get all custom stylesheet keys
|
92 |
+
$customStyles = get_option($customStylesOptionsKey, array());
|
93 |
+
if(is_array($customStyles)){
|
94 |
+
foreach($customStyles as $customStyleKey => $customStyleValue){
|
95 |
+
|
96 |
+
// Get custom style from custom style key
|
97 |
+
$customStyle = get_option($customStyleKey, null);
|
98 |
+
if(!isset($customStyle))
|
99 |
+
continue;
|
100 |
+
|
101 |
+
$h2Class = '.slideshow_container .slideshow_description h2';
|
102 |
+
$pClass = '.slideshow_container .slideshow_description p';
|
103 |
+
|
104 |
+
// Don't add to custom styles that already have this rule
|
105 |
+
if(stripos($customStyle, $h2Class . ' a') !== false || stripos($customStyle, $pClass . ' a') !== false)
|
106 |
+
continue;
|
107 |
+
|
108 |
+
// Add anchor classes
|
109 |
+
$h2Position = stripos($customStyle, $h2Class) + strlen($h2Class);
|
110 |
+
$customStyle = substr($customStyle, 0, $h2Position) . ' a ' . substr($customStyle, $h2Position);
|
111 |
+
|
112 |
+
$pPosition = stripos($customStyle, $pClass) + strlen($pClass);
|
113 |
+
$customStyle = substr($customStyle, 0, $pPosition) . ' a ' . substr($customStyle, $pPosition);
|
114 |
+
|
115 |
+
// Save
|
116 |
+
update_option($customStyleKey, $customStyle);
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
update_option('slideshow-jquery-image-gallery-updated-from-v2-2-0-to-v2-2-8', 'updated');
|
121 |
+
}
|
122 |
+
|
123 |
/**
|
124 |
* Version 2.2.0 comes with redesigned stylesheets, which makes the old ones obsolete. Set the style settings for
|
125 |
* each slideshow to 'Light', if it's a custom style.
|
126 |
*
|
127 |
* @since 2.2.0
|
128 |
*/
|
129 |
+
private static function updateV2_1_23_to_V_2_2_0(){
|
130 |
|
131 |
// Check if this has already been done
|
132 |
if(get_option('slideshow-jquery-image-gallery-updated-from-v2-1-23-to-v2-2-0') !== false)
|
classes/SlideshowPluginPostType.php
CHANGED
@@ -20,7 +20,6 @@ class SlideshowPluginPostType {
|
|
20 |
*/
|
21 |
static function init(){
|
22 |
add_action('init', array(__CLASS__, 'registerSlideshowPostType'));
|
23 |
-
add_action('wp_print_styles', array(__CLASS__, 'enqueueStyles'));
|
24 |
add_action('admin_print_styles', array(__CLASS__, 'enqueueAdminStyles'));
|
25 |
add_action('admin_enqueue_scripts', array(__CLASS__, 'enqueueAdminScripts'));
|
26 |
add_action('save_post', array('SlideshowPluginSlideshowSettingsHandler', 'save'));
|
@@ -80,25 +79,6 @@ class SlideshowPluginPostType {
|
|
80 |
);
|
81 |
}
|
82 |
|
83 |
-
/**
|
84 |
-
* Enqueues the styles that have to be placed in the header
|
85 |
-
*
|
86 |
-
* TODO The functional stylesheet needs to move to the bottom of the page again, once the stylesheets of the plugin
|
87 |
-
* TODO can be loaded beneath the functional stylesheet.
|
88 |
-
*
|
89 |
-
* @since 2.2.1
|
90 |
-
*/
|
91 |
-
static function enqueueStyles(){
|
92 |
-
|
93 |
-
// Functional stylesheet
|
94 |
-
wp_enqueue_style(
|
95 |
-
'slideshow_functional_style',
|
96 |
-
SlideshowPluginMain::getPluginUrl() . '/style/SlideshowPlugin/functional.css',
|
97 |
-
array(),
|
98 |
-
SlideshowPluginMain::$version
|
99 |
-
);
|
100 |
-
}
|
101 |
-
|
102 |
/**
|
103 |
* Enqueues the admin stylesheets when one a slideshow edit page.
|
104 |
*
|
20 |
*/
|
21 |
static function init(){
|
22 |
add_action('init', array(__CLASS__, 'registerSlideshowPostType'));
|
|
|
23 |
add_action('admin_print_styles', array(__CLASS__, 'enqueueAdminStyles'));
|
24 |
add_action('admin_enqueue_scripts', array(__CLASS__, 'enqueueAdminScripts'));
|
25 |
add_action('save_post', array('SlideshowPluginSlideshowSettingsHandler', 'save'));
|
79 |
);
|
80 |
}
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
/**
|
83 |
* Enqueues the admin stylesheets when one a slideshow edit page.
|
84 |
*
|
classes/SlideshowPluginSlideInserter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Class SlideshowPluginSlideInserter
|
4 |
*
|
5 |
* TODO This class will probably need to be renamed to SlideshowPluginSlideHandler to explain more functionality
|
6 |
-
* TODO than just inserting slides.
|
7 |
* @since 2.0.0
|
8 |
* @author Stefan Boonstra
|
9 |
* @version 01-02-2013
|
@@ -97,8 +97,7 @@ class SlideshowPluginSlideInserter {
|
|
97 |
'offset' => $offset,
|
98 |
'posts_per_page' => $numberPosts + 1,
|
99 |
'orderby' => 'date',
|
100 |
-
'order' => 'DESC'
|
101 |
-
'post__not_in' => $attachmentIDs
|
102 |
));
|
103 |
$attachments = $query->get_posts();
|
104 |
remove_filter('posts_where', array(__CLASS__, 'printSearchResultsWhereFilter'));
|
@@ -133,17 +132,6 @@ class SlideshowPluginSlideInserter {
|
|
133 |
|
134 |
foreach($fileNameQueryAttachments as $fileNameQueryAttachment)
|
135 |
$attachments[] = $fileNameQueryAttachment;
|
136 |
-
|
137 |
-
// for($i = 0; $i < count($fileNameQueryAttachments); $i++){
|
138 |
-
//
|
139 |
-
// $inAttachmentsArray = false;
|
140 |
-
// foreach($attachments as $attachmentValue)
|
141 |
-
// if($attachmentValue->ID == $fileNameQueryAttachments[$i]->ID)
|
142 |
-
// $inAttachmentsArray = true;
|
143 |
-
//
|
144 |
-
// if(!$inAttachmentsArray)
|
145 |
-
// $attachments[] = $fileNameQueryAttachments[$i];
|
146 |
-
// }
|
147 |
}
|
148 |
}
|
149 |
|
@@ -195,7 +183,7 @@ class SlideshowPluginSlideInserter {
|
|
195 |
if($loadMoreResults){
|
196 |
echo '<tr>
|
197 |
<td colspan="3" style="text-align: center;">
|
198 |
-
<button class="button-secondary load-more-results ' . ($offset + $numberPosts) . '"
|
199 |
' . __('Load more results', 'slideshow-plugin') . '
|
200 |
</button>
|
201 |
</td>
|
3 |
* Class SlideshowPluginSlideInserter
|
4 |
*
|
5 |
* TODO This class will probably need to be renamed to SlideshowPluginSlideHandler to explain more functionality
|
6 |
+
* TODO than just inserting slides.
|
7 |
* @since 2.0.0
|
8 |
* @author Stefan Boonstra
|
9 |
* @version 01-02-2013
|
97 |
'offset' => $offset,
|
98 |
'posts_per_page' => $numberPosts + 1,
|
99 |
'orderby' => 'date',
|
100 |
+
'order' => 'DESC'
|
|
|
101 |
));
|
102 |
$attachments = $query->get_posts();
|
103 |
remove_filter('posts_where', array(__CLASS__, 'printSearchResultsWhereFilter'));
|
132 |
|
133 |
foreach($fileNameQueryAttachments as $fileNameQueryAttachment)
|
134 |
$attachments[] = $fileNameQueryAttachment;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
}
|
136 |
}
|
137 |
|
183 |
if($loadMoreResults){
|
184 |
echo '<tr>
|
185 |
<td colspan="3" style="text-align: center;">
|
186 |
+
<button class="button-secondary load-more-results" data-offset="' . ($offset + $numberPosts) . '">
|
187 |
' . __('Load more results', 'slideshow-plugin') . '
|
188 |
</button>
|
189 |
</td>
|
classes/SlideshowPluginSlideshowStylesheet.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* SlideshowPluginSlideshowStylesheet loads the requested stylesheet into the page and returns it as CSS.
|
4 |
+
*
|
5 |
+
* @since 2.2.8
|
6 |
+
* @author Stefan Boonstra
|
7 |
+
* @version 03-03-2013
|
8 |
+
*/
|
9 |
+
class SlideshowPluginSlideshowStylesheet {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Loads the requested stylesheet, outputs it to the page and returns it as a text/css content type.
|
13 |
+
*
|
14 |
+
* @since 2.2.8
|
15 |
+
*/
|
16 |
+
public static function loadStylesheet(){
|
17 |
+
|
18 |
+
$styleName = filter_input(INPUT_GET, 'style', FILTER_SANITIZE_SPECIAL_CHARS);
|
19 |
+
|
20 |
+
// Get custom stylesheet, of the default stylesheet if the custom stylesheet does not exist
|
21 |
+
$stylesheet = get_option($styleName, '');
|
22 |
+
if(strlen($stylesheet) <= 0){
|
23 |
+
|
24 |
+
$stylesheetFile = SlideshowPluginMain::getPluginPath() . DIRECTORY_SEPARATOR . 'style' . DIRECTORY_SEPARATOR . 'SlideshowPlugin' . DIRECTORY_SEPARATOR . $styleName . '.css';
|
25 |
+
if(!file_exists($stylesheetFile)){
|
26 |
+
$stylesheetFile = SlideshowPluginMain::getPluginPath() . DIRECTORY_SEPARATOR . 'style' . DIRECTORY_SEPARATOR . 'SlideshowPlugin' . DIRECTORY_SEPARATOR . 'style-light.css';
|
27 |
+
}
|
28 |
+
|
29 |
+
// Get contents of stylesheet
|
30 |
+
ob_start();
|
31 |
+
include($stylesheetFile);
|
32 |
+
$stylesheet .= ob_get_clean();
|
33 |
+
}
|
34 |
+
|
35 |
+
// Replace the '%plugin-url%' tag with the actual URL and add a unique identifier to separate stylesheets
|
36 |
+
$stylesheet = str_replace('%plugin-url%', SlideshowPluginMain::getPluginUrl(), $stylesheet);
|
37 |
+
$stylesheet = str_replace('.slideshow_container', '.slideshow_container_' . $styleName, $stylesheet);
|
38 |
+
|
39 |
+
// Set header to CSS. Cache for a year (as WordPress does)
|
40 |
+
header('Content-Type: text/css; charset=UTF-8');
|
41 |
+
header('Expires: ' . gmdate("D, d M Y H:i:s", time() + 31556926) . ' GMT');
|
42 |
+
header('Pragma: cache');
|
43 |
+
header("Cache-Control: public, max-age=31556926");
|
44 |
+
|
45 |
+
echo $stylesheet;
|
46 |
+
|
47 |
+
die;
|
48 |
+
}
|
49 |
+
}
|
js/SlideshowPlugin/slideshow.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery.fn.slideshow_jquery_image_gallery_script=function(){var $=jQuery;var $container=$(this),$content=$container.find('.slideshow_content'),$views=$container.find('.slideshow_view'),$slides=$container.find('.slideshow_slide'),$controlPanel=$container.find('.slideshow_controlPanel'),$togglePlayButton=$controlPanel.find('.slideshow_togglePlay'),$nextButton=$container.find('.slideshow_next'),$previousButton=$container.find('.slideshow_previous'),$pagination=$container.find('.slideshow_pagination');var $ID=getID();var $settings=window['SlideshowPluginSettings_'+$ID];$.each($settings,function(setting,value){if(value=='true')$settings[setting]=true;else if(value=='false')$settings[setting]=false});var $parentElement=$container.parent(),$viewData=[],$navigationActive=true,$currentViewId=getNextViewId(),$currentWidth=0,$visibleViews=[$currentViewId],$videoPlayers=[],$interval='',$mouseEnterTimer='',$invisibilityTimer='';init();function init(){recalculate(false);$.each($views,function(viewId,view){recalculateView(view);if(viewId!=$visibleViews[0])$(view).css('top',$container.outerHeight(true));$viewData[viewId]=[];$.each($(view).find('.slideshow_slide'),function(slideId,slide){$viewData[viewId][slideId]={'imageDimension':''}})});$content.show();$(window).load(function(){recalculateVisibleViews()});if($settings['enableResponsiveness']){$(window).resize(function(){recalculate()})}if(parseFloat($settings['intervalSpeed'])<parseFloat($settings['slideSpeed'])+0.1)$settings['intervalSpeed']=parseFloat($settings['slideSpeed'])+0.1;activateDescriptions();activateControlPanel();activateNavigationButtons();activatePagination();activatePauseOnHover();start()}function start(){if(!$settings['play'])return;$interval=setInterval(function(){animateTo(getNextViewId(),1)},$settings['intervalSpeed']*1000)}function stop(){clearInterval($interval);$interval=false}function animateTo(viewId,direction){if(videoIsPlaying()||viewId<0||viewId>=$views.length||viewId==$currentViewId)return;$navigationActive=false;if(direction==0||direction==undefined){if(viewId<$currentViewId)direction=-1;else direction=1}$visibleViews=[$currentViewId,viewId];var animation=$settings['animation'];var animations=['slide','slideRight','slideUp','slideDown','fade','directFade'];if(animation=='random')animation=animations[Math.floor(Math.random()*animations.length)];var animationOpposites={'slide':'slideRight','slideRight':'slide','slideUp':'slideDown','slideDown':'slideUp','fade':'fade','directFade':'directFade'};if(direction<0)animation=animationOpposites[animation];var currentView=$($views[$currentViewId]);var nextView=$($views[viewId]);currentView.stop(true,true);nextView.stop(true,true);recalculateVisibleViews();$currentViewId=viewId;$container.trigger('onSlideshowAnimate');switch(animation){case'slide':recalculateVisibleViews();nextView.css({top:0,left:$content.width()});currentView.animate({left:-currentView.outerWidth(true)},$settings['slideSpeed']*1000);nextView.animate({left:0},$settings['slideSpeed']*1000);setTimeout(function(){currentView.stop(true,true).css('top',$container.outerHeight(true))},$settings['slideSpeed']*1000);break;case'slideRight':nextView.css({top:0,left:-$content.width()});currentView.animate({left:currentView.outerWidth(true)},$settings['slideSpeed']*1000);nextView.animate({left:0},$settings['slideSpeed']*1000);setTimeout(function(){currentView.stop(true,true).css('top',$container.outerHeight(true))},$settings['slideSpeed']*1000);break;case'slideUp':nextView.css({top:$content.height(),left:0});currentView.animate({top:-currentView.outerHeight(true)},$settings['slideSpeed']*1000);nextView.animate({top:0},$settings['slideSpeed']*1000);setTimeout(function(){currentView.stop(true,true).css('top',$container.outerHeight(true))},$settings['slideSpeed']*1000);break;case'slideDown':nextView.css({top:-$content.height(),left:0});currentView.animate({top:currentView.outerHeight(true)},$settings['slideSpeed']*1000);nextView.animate({top:0},$settings['slideSpeed']*1000);setTimeout(function(){currentView.stop(true,true).css('top',$container.outerHeight(true))},$settings['slideSpeed']*1000);break;case'fade':nextView.css({top:0,left:0,display:'none'});currentView.fadeOut(($settings['slideSpeed']*1000)/2);setTimeout(function(){nextView.fadeIn(($settings['slideSpeed']*1000)/2);currentView.stop(true,true).css({top:$container.outerHeight(true),display:'block'})},($settings['slideSpeed']*1000)/2);break;case'directFade':nextView.css({top:0,left:0,'z-index':0,display:'none'});currentView.css({'z-index':1});nextView.fadeIn($settings['slideSpeed']*1000);currentView.fadeOut($settings['slideSpeed']*1000);setTimeout(function(){nextView.stop(true,true).css({'z-index':'auto'});currentView.stop(true,true).css({top:$container.outerHeight(true),display:'block','z-index':'auto'})},$settings['slideSpeed']*1000);break}setTimeout(function(){$visibleViews=[viewId]},$settings['slideSpeed']*1000);setTimeout(function(){$navigationActive=true},$settings['slideSpeed']*1000)}function recalculate(recalculateViews){if(!$container.is(':visible')){$invisibilityTimer=setInterval(function(){if($container.is(':visible')){recalculate();clearInterval($invisibilityTimer);$invisibilityTimer=''}},500);return}var parentElement=$parentElement;for(var i=0;parentElement.width()<=0;i++){parentElement=parentElement.parent();if(i>50)break}if($currentWidth==parentElement.width())return;$currentWidth=parentElement.width();var width=parentElement.width()-($container.outerWidth(true)-$container.width());if($settings['maxWidth']>0&&$settings['maxWidth']<width)width=$settings['maxWidth'];$container.css('width',Math.floor(width));$content.css('width',Math.floor(width)-($content.outerWidth(true)-$content.width()));if($settings['preserveSlideshowDimensions']){var height=(width*$settings['dimensionHeight'])/$settings['dimensionWidth'];$container.css('height',Math.floor(height));$content.css('height',Math.floor(height)-($content.outerHeight(true)-$content.height()))}else{$container.css('height',Math.floor($settings['height']));$content.css('height',Math.floor($settings['height']))}$views.each(function(viewId,view){if($.inArray(viewId,$visibleViews)<0)$(view).css('top',$container.outerHeight(true))});if(recalculateViews||recalculateViews==undefined){recalculateVisibleViews()}}function recalculateVisibleViews(){$.each($visibleViews,function(key,viewId){recalculateView(viewId)})}function recalculateView(viewId){view=$($views[viewId]);if($content.width()==view.outerWidth(true))return;var slides=view.find('.slideshow_slide');if(slides.length<=0)return;var viewWidth=$content.width()-(view.outerWidth(true)-view.width());var viewHeight=$content.height()-(view.outerHeight(true)-view.height());var slideWidth=Math.floor(viewWidth/slides.length);var slideHeight=viewHeight;var spareWidth=viewWidth%slides.length;var totalWidth=0;$(slides[0]).css('margin-left',0);$(slides[slides.length-1]).css('margin-right',0);$.each(slides,function(slideId,slide){slide=$(slide);var outerWidth=slide.outerWidth(true)-slide.width();var outerHeight=slide.outerHeight(true)-slide.height();if(slideId==(slides.length-1))slide.width((slideWidth-outerWidth)+spareWidth);else slide.width(slideWidth-outerWidth);slide.height(slideHeight-outerHeight);if(slide.hasClass('slideshow_slide_text')){var anchor=slide.find('a');if(anchor.length<=0)return;var anchorWidth=slide.width()-(anchor.outerWidth(true)-anchor.width());var anchorHeight=slide.height()-(anchor.outerHeight(true)-anchor.height());anchor.css({'width':anchorWidth,'height':anchorHeight})}else if(slide.hasClass('slideshow_slide_image')){var image=slide.find('img');if(image.length<=0)return;var maxImageWidth=slide.width()-(image.outerWidth(true)-image.width());var maxImageHeight=slide.height()-(image.outerHeight(true)-image.height());if($settings['stretchImages']){image.css({width:maxImageWidth,height:maxImageHeight});image.attr({width:maxImageWidth,height:maxImageHeight})}else if(image.width()>0&&image.height()>0){var imageDimension=$viewData[viewId][slideId]['imageDimension'];if(imageDimension=='')imageDimension=$viewData[viewId][slideId]['imageDimension']=image.outerWidth(true)/image.outerHeight(true);var slideDimension=slide.width()/slide.height();if(imageDimension>slideDimension){image.css({'margin':'0px','width':maxImageWidth,'height':Math.floor(maxImageWidth/imageDimension)});image.attr({width:maxImageWidth,height:Math.floor(maxImageWidth/imageDimension)})}else if(imageDimension<slideDimension){image.css({'margin-left':'auto','margin-right':'auto','display':'block','width':Math.floor(maxImageHeight*imageDimension),'height':maxImageHeight});image.attr({width:Math.floor(maxImageHeight*imageDimension),height:maxImageHeight})}}}else if(slide.hasClass('slideshow_slide_video')){var videoElement=slide.find('iframe');if(videoElement.length>0){videoElement.attr({width:slide.width(),height:slide.height()})}else{var youtubePlayerReadyTimer='';youtubePlayerReadyTimer=setInterval(function(){if(!window.slideshow_jquery_image_gallery_youtube_api_ready)return;var element=slide.find('div');element.attr('id','slideshow_slide_video_'+Math.floor(Math.random()*1000000)+'_'+element.text());var player=new YT.Player(element.attr('id'),{width:$(slide).width(),height:$(slide).height(),videoId:element.text(),playerVars:{wmode:'opaque'},events:{'onReady':function(){},'onStateChange':function(event){$videoPlayers[element.attr('id')].state=event.data}}});playerElement=$('#'+element.attr('id'));playerElement.show();playerElement.attr('src',playerElement.attr('src')+'&wmode=opaque');$videoPlayers[element.attr('id')]={'player':player,'state':-1};clearInterval(youtubePlayerReadyTimer)},500)}}totalWidth+=slide.outerWidth(true)});view.css({'width':viewWidth,'height':viewHeight})}function videoIsPlaying(){var videoIsPlaying=false;for(var playerID in $videoPlayers){if(!$videoPlayers.hasOwnProperty(playerID))continue;var state=$videoPlayers[playerID].state;if(state==1||state==3){videoIsPlaying=true;break}}return videoIsPlaying}function pauseAllVideos(){for(var playerID in $videoPlayers){if(!$videoPlayers.hasOwnProperty(playerID))continue;var player=$videoPlayers[playerID].player;if(player!=null&&typeof player.pauseVideo==='function'){$videoPlayers[playerID].state=2;player.pauseVideo()}}}function activateDescriptions(){if(!$settings['showDescription'])return;$.each($slides.find('.slideshow_description'),function(key,description){$(description).show();if($settings['hideDescription'])$(description).css({'position':'absolute','bottom':-$(description).outerHeight(true)})});if(!$settings['hideDescription'])return;$container.bind('onSlideshowAnimate',function(){if($visibleViews[1]==undefined)return;$.each($($views[$visibleViews[1]]).find('.slideshow_description'),function(key,description){$(description).css('bottom',-$(description).outerHeight(true))})});$slides.mouseenter(function(){$(this).find('.slideshow_description').stop(true,true).animate({'bottom':0},parseInt($settings['descriptionSpeed']*1000))});$slides.mouseleave(function(){$(this).find('.slideshow_description').stop(true,true).animate({'bottom':-$(this).outerHeight(true)},parseInt($settings['descriptionSpeed']*1000))})}function activateNavigationButtons(){if(!$settings['controllable'])return;$nextButton.click(function(){if(!$navigationActive)return;pauseAllVideos();stop();animateTo(getNextViewId(),1);start()});$previousButton.click(function(){if(!$navigationActive)return;pauseAllVideos();stop();animateTo(getPreviousViewId(),-1);start()});if($settings['hideNavigationButtons']){$container.mouseenter(function(){$nextButton.stop(true,true).fadeIn(100)});$container.mouseleave(function(){$nextButton.stop(true,true).fadeOut(500)});$container.mouseenter(function(){$previousButton.stop(true,true).fadeIn(100)});$container.mouseleave(function(){$previousButton.stop(true,true).fadeOut(500)})}else{$nextButton.show();$previousButton.show()}}function activateControlPanel(){if(!$settings['controlPanel'])return;if($settings['play'])$togglePlayButton.attr('class','slideshow_pause');else $togglePlayButton.attr('class','slideshow_play');$togglePlayButton.click(function(){if($settings['play']){$settings['play']=false;$(this).attr('class','slideshow_play');stop()}else{$settings['play']=true;$(this).attr('class','slideshow_pause');start()}});if($settings['hideControlPanel']){$container.mouseenter(function(){$controlPanel.stop(true,true).fadeIn(100)});$container.mouseleave(function(){$controlPanel.stop(true,true).fadeOut(500)})}else{$controlPanel.show()}}function activatePagination(){if(!$settings['showPagination'])return;var ul=$pagination.find('ul');ul.html('');$views.each(function(key,view){var currentView='';if(key==$currentViewId)currentView='slideshow_currentView';ul.append('<li class="slideshow_transparent '+currentView+'">'+'<span style="display: none;">'+key+'</span>'+'</li>')});$pagination.find('li').click(function(){if(!$navigationActive)return;var viewId=$(this).find('span').text();if(viewId==''||viewId==undefined)return;pauseAllVideos();stop();animateTo(parseInt(viewId),0);start()});$container.bind('onSlideshowAnimate',function(){var bullets=$pagination.find('li');bullets.each(function(key,bullet){$(bullet).removeClass('slideshow_currentView')});$(bullets[$currentViewId]).addClass('slideshow_currentView')});if($settings['hidePagination']){$container.mouseenter(function(){$pagination.stop(true,true).fadeIn(100)});$container.mouseleave(function(){$pagination.stop(true,true).fadeOut(500)})}else{$pagination.show()}}function activatePauseOnHover(){if(!$settings['pauseOnHover'])return;$container.mouseenter(function(){clearTimeout($mouseEnterTimer);$mouseEnterTimer=setTimeout(function(){stop()},500)});$container.mouseleave(function(){clearTimeout($mouseEnterTimer);if($interval===false)start()})}function getNextViewId(){if($settings['random']){var oldViewId=viewId;viewId=Math.floor(Math.random()*$views.length);if(viewId!=oldViewId)return viewId}var viewId=$currentViewId;if(viewId==undefined)return 0;if(viewId>=$views.length-1){if($settings['loop'])return viewId=0;else return $currentViewId}return viewId+=1}function getPreviousViewId(){var viewId=$currentViewId;if(viewId==undefined)viewId=0;if($settings['random']){var oldViewId=viewId;viewId=Math.floor(Math.random()*$views.length);if(viewId!=oldViewId)return viewId}if(viewId<=0){if($settings['loop'])return viewId=$views.length-1;else return $currentViewId}return viewId-=1}function getID(){var splitClasses=$container.attr('class').split('_');return splitClasses[splitClasses.length-1]}};jQuery(document).ready(function(){jQuery.each(jQuery('.slideshow_container'),function(key,slideshow){jQuery(slideshow).slideshow_jquery_image_gallery_script()});var tag=document.createElement('script');tag.src="//www.youtube.com/iframe_api";var firstScriptTag=document.getElementsByTagName('script')[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag)});window.slideshow_jquery_image_gallery_youtube_api_ready=false;function onYouTubeIframeAPIReady(){window.slideshow_jquery_image_gallery_youtube_api_ready=true}
|
1 |
+
jQuery.fn.slideshow_jquery_image_gallery_script=function(){var $=jQuery;var $container=$(this),$content=$container.find('.slideshow_content'),$views=$container.find('.slideshow_view'),$slides=$container.find('.slideshow_slide'),$controlPanel=$container.find('.slideshow_controlPanel'),$togglePlayButton=$controlPanel.find('.slideshow_togglePlay'),$nextButton=$container.find('.slideshow_next'),$previousButton=$container.find('.slideshow_previous'),$pagination=$container.find('.slideshow_pagination');var $ID=$container.data('sessionId');var $settings=window['SlideshowPluginSettings_'+$ID];$.each($settings,function(setting,value){if(value=='true')$settings[setting]=true;else if(value=='false')$settings[setting]=false});var $parentElement=$container.parent(),$viewData=[],$navigationActive=true,$currentViewId=getNextViewId(),$currentWidth=0,$visibleViews=[$currentViewId],$videoPlayers=[],$interval='',$mouseEnterTimer='',$invisibilityTimer='',$descriptionTimer='';init();function init(){window.slideshow_jquery_image_gallery_registered_slideshows.push($ID);recalculate(false);$.each($views,function(viewId,view){recalculateView(view);if(viewId!=$visibleViews[0])$(view).css('top',$container.outerHeight(true));$viewData[viewId]=[];$.each($(view).find('.slideshow_slide'),function(slideId,slide){$viewData[viewId][slideId]={'imageDimension':''}})});$content.show();$(window).load(function(){recalculateVisibleViews()});if($settings['enableResponsiveness']){$(window).resize(function(){recalculate()})}if(parseFloat($settings['intervalSpeed'])<parseFloat($settings['slideSpeed'])+0.1)$settings['intervalSpeed']=parseFloat($settings['slideSpeed'])+0.1;activateDescriptions();activateControlPanel();activateNavigationButtons();activatePagination();activatePauseOnHover();start()}function start(){if(!$settings['play'])return;$interval=setInterval(function(){animateTo(getNextViewId(),1)},$settings['intervalSpeed']*1000)}function stop(){clearInterval($interval);$interval=false}function animateTo(viewId,direction){if(videoIsPlaying()||viewId<0||viewId>=$views.length||viewId==$currentViewId)return;$navigationActive=false;if(direction==0||direction==undefined){if(viewId<$currentViewId)direction=-1;else direction=1}$visibleViews=[$currentViewId,viewId];var animation=$settings['animation'];var animations=['slide','slideRight','slideUp','slideDown','fade','directFade'];if(animation=='random')animation=animations[Math.floor(Math.random()*animations.length)];var animationOpposites={'slide':'slideRight','slideRight':'slide','slideUp':'slideDown','slideDown':'slideUp','fade':'fade','directFade':'directFade'};if(direction<0)animation=animationOpposites[animation];var currentView=$($views[$currentViewId]);var nextView=$($views[viewId]);currentView.stop(true,true);nextView.stop(true,true);recalculateVisibleViews();$currentViewId=viewId;$container.trigger('slideshowAnimate');switch(animation){case'slide':recalculateVisibleViews();nextView.css({top:0,left:$content.width()});currentView.animate({left:-currentView.outerWidth(true)},$settings['slideSpeed']*1000);nextView.animate({left:0},$settings['slideSpeed']*1000);setTimeout(function(){currentView.stop(true,true).css('top',$container.outerHeight(true))},$settings['slideSpeed']*1000);break;case'slideRight':nextView.css({top:0,left:-$content.width()});currentView.animate({left:currentView.outerWidth(true)},$settings['slideSpeed']*1000);nextView.animate({left:0},$settings['slideSpeed']*1000);setTimeout(function(){currentView.stop(true,true).css('top',$container.outerHeight(true))},$settings['slideSpeed']*1000);break;case'slideUp':nextView.css({top:$content.height(),left:0});currentView.animate({top:-currentView.outerHeight(true)},$settings['slideSpeed']*1000);nextView.animate({top:0},$settings['slideSpeed']*1000);setTimeout(function(){currentView.stop(true,true).css('top',$container.outerHeight(true))},$settings['slideSpeed']*1000);break;case'slideDown':nextView.css({top:-$content.height(),left:0});currentView.animate({top:currentView.outerHeight(true)},$settings['slideSpeed']*1000);nextView.animate({top:0},$settings['slideSpeed']*1000);setTimeout(function(){currentView.stop(true,true).css('top',$container.outerHeight(true))},$settings['slideSpeed']*1000);break;case'fade':nextView.css({top:0,left:0,display:'none'});currentView.fadeOut(($settings['slideSpeed']*1000)/2);setTimeout(function(){nextView.fadeIn(($settings['slideSpeed']*1000)/2);currentView.stop(true,true).css({top:$container.outerHeight(true),display:'block'})},($settings['slideSpeed']*1000)/2);break;case'directFade':nextView.css({top:0,left:0,'z-index':0,display:'none'});currentView.css({'z-index':1});nextView.fadeIn($settings['slideSpeed']*1000);currentView.fadeOut($settings['slideSpeed']*1000);setTimeout(function(){nextView.stop(true,true).css({'z-index':'auto'});currentView.stop(true,true).css({top:$container.outerHeight(true),display:'block','z-index':'auto'})},$settings['slideSpeed']*1000);break}setTimeout(function(){$visibleViews=[viewId]},$settings['slideSpeed']*1000);setTimeout(function(){$navigationActive=true},$settings['slideSpeed']*1000)}function recalculate(recalculateViews){if(!$container.is(':visible')){$invisibilityTimer=setInterval(function(){if($container.is(':visible')){recalculate();clearInterval($invisibilityTimer);$invisibilityTimer=''}},500);return}var parentElement=$parentElement;for(var i=0;parentElement.width()<=0;i++){parentElement=parentElement.parent();if(i>50)break}if($currentWidth==parentElement.width())return;$currentWidth=parentElement.width();var width=parentElement.width()-($container.outerWidth(true)-$container.width());if($settings['maxWidth']>0&&$settings['maxWidth']<width)width=$settings['maxWidth'];$container.css('width',Math.floor(width));$content.css('width',Math.floor(width)-($content.outerWidth(true)-$content.width()));if($settings['preserveSlideshowDimensions']){var height=(width*$settings['dimensionHeight'])/$settings['dimensionWidth'];$container.css('height',Math.floor(height));$content.css('height',Math.floor(height)-($content.outerHeight(true)-$content.height()))}else{$container.css('height',Math.floor($settings['height']));$content.css('height',Math.floor($settings['height']))}$views.each(function(viewId,view){if($.inArray(viewId,$visibleViews)<0)$(view).css('top',$container.outerHeight(true))});$container.trigger('slideshowResize');if(recalculateViews||recalculateViews==undefined){recalculateVisibleViews()}}function recalculateVisibleViews(){$.each($visibleViews,function(key,viewId){recalculateView(viewId)})}function recalculateView(viewId){view=$($views[viewId]);if($content.width()==view.outerWidth(true))return;var slides=view.find('.slideshow_slide');if(slides.length<=0)return;var viewWidth=$content.width()-(view.outerWidth(true)-view.width());var viewHeight=$content.height()-(view.outerHeight(true)-view.height());var slideWidth=Math.floor(viewWidth/slides.length);var slideHeight=viewHeight;var spareWidth=viewWidth%slides.length;var totalWidth=0;$(slides[0]).css('margin-left',0);$(slides[slides.length-1]).css('margin-right',0);$.each(slides,function(slideId,slide){slide=$(slide);var outerWidth=slide.outerWidth(true)-slide.width();var outerHeight=slide.outerHeight(true)-slide.height();if(slideId==(slides.length-1))slide.width((slideWidth-outerWidth)+spareWidth);else slide.width(slideWidth-outerWidth);slide.height(slideHeight-outerHeight);if(slide.hasClass('slideshow_slide_text')){var anchor=slide.find('.slideshow_background_anchor');if(anchor.length<=0)return;var anchorWidth=slide.width()-(anchor.outerWidth(true)-anchor.width());var anchorHeight=slide.height()-(anchor.outerHeight(true)-anchor.height());anchor.css({'width':anchorWidth,'height':anchorHeight})}else if(slide.hasClass('slideshow_slide_image')){var image=slide.find('img');if(image.length<=0)return;var maxImageWidth=slide.width()-(image.outerWidth(true)-image.width());var maxImageHeight=slide.height()-(image.outerHeight(true)-image.height());if($settings['stretchImages']){image.css({width:maxImageWidth,height:maxImageHeight});image.attr({width:maxImageWidth,height:maxImageHeight})}else if(image.width()>0&&image.height()>0){var imageDimension=$viewData[viewId][slideId]['imageDimension'];if(imageDimension=='')imageDimension=$viewData[viewId][slideId]['imageDimension']=image.outerWidth(true)/image.outerHeight(true);var slideDimension=slide.width()/slide.height();if(imageDimension>slideDimension){image.css({'margin':'0px','width':maxImageWidth,'height':Math.floor(maxImageWidth/imageDimension)});image.attr({width:maxImageWidth,height:Math.floor(maxImageWidth/imageDimension)})}else if(imageDimension<slideDimension){image.css({'margin-left':'auto','margin-right':'auto','display':'block','width':Math.floor(maxImageHeight*imageDimension),'height':maxImageHeight});image.attr({width:Math.floor(maxImageHeight*imageDimension),height:maxImageHeight})}}}else if(slide.hasClass('slideshow_slide_video')){var videoElement=slide.find('iframe');if(videoElement.length>0){videoElement.attr({width:slide.width(),height:slide.height()})}else{var youtubePlayerReadyTimer='';youtubePlayerReadyTimer=setInterval(function(){if(!window.slideshow_jquery_image_gallery_youtube_api_ready)return;var element=slide.find('div');element.attr('id','slideshow_slide_video_'+Math.floor(Math.random()*1000000)+'_'+element.text());var player=new YT.Player(element.attr('id'),{width:$(slide).width(),height:$(slide).height(),videoId:element.text(),playerVars:{wmode:'opaque'},events:{'onReady':function(){},'onStateChange':function(event){$videoPlayers[element.attr('id')].state=event.data}}});playerElement=$('#'+element.attr('id'));playerElement.show();playerElement.attr('src',playerElement.attr('src')+'&wmode=opaque');$videoPlayers[element.attr('id')]={'player':player,'state':-1};clearInterval(youtubePlayerReadyTimer)},500)}}totalWidth+=slide.outerWidth(true)});view.css({'width':viewWidth,'height':viewHeight})}function videoIsPlaying(){var videoIsPlaying=false;for(var playerID in $videoPlayers){if(!$videoPlayers.hasOwnProperty(playerID))continue;var state=$videoPlayers[playerID].state;if(state==1||state==3){videoIsPlaying=true;break}}return videoIsPlaying}function pauseAllVideos(){for(var playerID in $videoPlayers){if(!$videoPlayers.hasOwnProperty(playerID))continue;var player=$videoPlayers[playerID].player;if(player!=null&&typeof player.pauseVideo==='function'){$videoPlayers[playerID].state=2;player.pauseVideo()}}}function activateDescriptions(){if(!$settings['showDescription'])return;$.each($slides.find('.slideshow_description'),function(key,description){description=$(description);description.show();if($settings['hideDescription'])description.css({'position':'absolute','top':$container.outerHeight(true)})});if(!$settings['hideDescription'])return;$container.bind('slideshowResize',function(){$.each($container.find('.slideshow_description'),function(key,description){$(description).css('top',$container.outerHeight(true))})});$container.bind('slideshowAnimate',function(){if($visibleViews[1]==undefined)return;$.each($($views[$visibleViews[1]]).find('.slideshow_description'),function(key,description){$(description).css('top',$container.outerHeight(true))})});$slides.mouseenter(function(){var description=$(this).find('.slideshow_description');$descriptionTimer=setTimeout(function(){$descriptionTimer='';description.stop(true,false).animate({'top':($container.outerHeight(true)-description.outerHeight(true))},parseInt($settings['descriptionSpeed']*1000))},100)});$slides.mouseleave(function(){if($descriptionTimer!==''){clearInterval($descriptionTimer);$descriptionTimer=''}$(this).find('.slideshow_description').stop(true,false).animate({'top':$container.outerHeight(true)},parseInt($settings['descriptionSpeed']*1000))})}function activateNavigationButtons(){if(!$settings['controllable'])return;$nextButton.click(function(){if(!$navigationActive)return;pauseAllVideos();stop();animateTo(getNextViewId(),1);start()});$previousButton.click(function(){if(!$navigationActive)return;pauseAllVideos();stop();animateTo(getPreviousViewId(),-1);start()});if($settings['hideNavigationButtons']){$container.mouseenter(function(){$nextButton.stop(true,true).fadeIn(100)});$container.mouseleave(function(){$nextButton.stop(true,true).fadeOut(500)});$container.mouseenter(function(){$previousButton.stop(true,true).fadeIn(100)});$container.mouseleave(function(){$previousButton.stop(true,true).fadeOut(500)})}else{$nextButton.show();$previousButton.show()}}function activateControlPanel(){if(!$settings['controlPanel'])return;if($settings['play'])$togglePlayButton.attr('class','slideshow_pause');else $togglePlayButton.attr('class','slideshow_play');$togglePlayButton.click(function(){if($settings['play']){$settings['play']=false;$(this).attr('class','slideshow_play');stop()}else{$settings['play']=true;$(this).attr('class','slideshow_pause');start()}});if($settings['hideControlPanel']){$container.mouseenter(function(){$controlPanel.stop(true,true).fadeIn(100)});$container.mouseleave(function(){$controlPanel.stop(true,true).fadeOut(500)})}else{$controlPanel.show()}}function activatePagination(){if(!$settings['showPagination'])return;$pagination.find('.slideshow_pagination_center').html('<ul></ul>');var ul=$pagination.find('ul');ul.html('');$views.each(function(key,view){var currentView='';if(key==$currentViewId)currentView='slideshow_currentView';ul.append('<li class="slideshow_transparent '+currentView+'">'+'<span style="display: none;">'+key+'</span>'+'</li>')});$pagination.find('li').click(function(){if(!$navigationActive)return;var viewId=$(this).find('span').text();if(viewId==''||viewId==undefined)return;pauseAllVideos();stop();animateTo(parseInt(viewId),0);start()});$container.bind('slideshowAnimate',function(){var bullets=$pagination.find('li');bullets.each(function(key,bullet){$(bullet).removeClass('slideshow_currentView')});$(bullets[$currentViewId]).addClass('slideshow_currentView')});if($settings['hidePagination']){$container.mouseenter(function(){$pagination.stop(true,true).fadeIn(100)});$container.mouseleave(function(){$pagination.stop(true,true).fadeOut(500)})}else{$pagination.show()}}function activatePauseOnHover(){if(!$settings['pauseOnHover'])return;$container.mouseenter(function(){clearTimeout($mouseEnterTimer);$mouseEnterTimer=setTimeout(function(){stop()},500)});$container.mouseleave(function(){clearTimeout($mouseEnterTimer);if($interval===false)start()})}function getNextViewId(){if($settings['random']){var oldViewId=viewId;viewId=Math.floor(Math.random()*$views.length);if(viewId!=oldViewId)return viewId}var viewId=$currentViewId;if(viewId==undefined)return 0;if(viewId>=$views.length-1){if($settings['loop'])return viewId=0;else return $currentViewId}return viewId+=1}function getPreviousViewId(){var viewId=$currentViewId;if(viewId==undefined)viewId=0;if($settings['random']){var oldViewId=viewId;viewId=Math.floor(Math.random()*$views.length);if(viewId!=oldViewId)return viewId}if(viewId<=0){if($settings['loop'])return viewId=$views.length-1;else return $currentViewId}return viewId-=1}};window.slideshow_jquery_image_gallery_registered_slideshows=[];jQuery(document).ready(function(){jQuery.each(jQuery('.slideshow_container'),function(key,slideshow){jQuery(slideshow).slideshow_jquery_image_gallery_script()});slideshow_jquery_image_gallery_load_youtube_api()});jQuery(window).load(function(){jQuery.each(jQuery('.slideshow_container'),function(key,slideshow){if(jQuery.inArray(jQuery(slideshow).data('sessionId'),window.slideshow_jquery_image_gallery_registered_slideshows)<0)jQuery(slideshow).slideshow_jquery_image_gallery_script()});slideshow_jquery_image_gallery_load_youtube_api()});function slideshow_jquery_image_gallery_load_youtube_api(){var tag=document.createElement('script');tag.src="//www.youtube.com/iframe_api";var firstScriptTag=document.getElementsByTagName('script')[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag)}window.slideshow_jquery_image_gallery_youtube_api_ready=false;function onYouTubeIframeAPIReady(){window.slideshow_jquery_image_gallery_youtube_api_ready=true}
|
js/SlideshowPluginSlideInserter/slide-inserter.js
CHANGED
@@ -185,13 +185,13 @@ jQuery(document).ready(function(){
|
|
185 |
if(loadMoreResultsButton){
|
186 |
loadMoreResultsButton.click(function(){
|
187 |
// Get offset
|
188 |
-
var previousOffset = jQuery(this).
|
|
|
|
|
|
|
189 |
|
190 |
// Load ajax results
|
191 |
slideshowSlideInserterGetSearchResults(previousOffset);
|
192 |
-
|
193 |
-
// Remove button row
|
194 |
-
jQuery(this).closest('tr').remove();
|
195 |
});
|
196 |
}
|
197 |
}
|
185 |
if(loadMoreResultsButton){
|
186 |
loadMoreResultsButton.click(function(){
|
187 |
// Get offset
|
188 |
+
var previousOffset = jQuery(this).data('offset');
|
189 |
+
|
190 |
+
// Remove button row
|
191 |
+
jQuery(this).closest('tr').hide();
|
192 |
|
193 |
// Load ajax results
|
194 |
slideshowSlideInserterGetSearchResults(previousOffset);
|
|
|
|
|
|
|
195 |
});
|
196 |
}
|
197 |
}
|
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.5.1
|
8 |
-
Stable tag: 2.2.
|
9 |
License: GPLv2
|
10 |
|
11 |
Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
|
@@ -45,7 +45,7 @@ different images, settings and styles for each one of them.
|
|
45 |
- Spanish (62% Translated by [Violeta Rosales](https://twitter.com/violetisha))
|
46 |
|
47 |
Feel free to send me your own translation of the plugin to my e-mail address: wordpress@stefanboonstra.com. Many
|
48 |
-
thanks in advance!
|
49 |
|
50 |
= Project board =
|
51 |
|
@@ -165,6 +165,14 @@ personal taste.
|
|
165 |
|
166 |
== Changelog ==
|
167 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
= 2.2.7 =
|
169 |
* Fixed: Slideshow control buttons were placed behind the slideshow.
|
170 |
* Fixed: Image slides doubly inserted after having clicked on 'Load more results'
|
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.5.1
|
8 |
+
Stable tag: 2.2.8
|
9 |
License: GPLv2
|
10 |
|
11 |
Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
|
45 |
- Spanish (62% Translated by [Violeta Rosales](https://twitter.com/violetisha))
|
46 |
|
47 |
Feel free to send me your own translation of the plugin to my e-mail address: wordpress@stefanboonstra.com. Many
|
48 |
+
thanks in advance! (Please use the support forum for asking questions, it'll help others as well)
|
49 |
|
50 |
= Project board =
|
51 |
|
165 |
|
166 |
== Changelog ==
|
167 |
|
168 |
+
= 2.2.8 =
|
169 |
+
* Fixed: Images that have a, to WordPress, unknown size weren't able to show on all websites.
|
170 |
+
* Fixed: Images in the image inserter popup were being skipped over when loading more results because of a faulty query.
|
171 |
+
* All stylesheets are now loaded at the page's bottom to validate in HTML checkers and be cached by the visitor's browser.
|
172 |
+
* Improved the handling of description boxes. Description boxes will no longer be 'jumpy' nor will they pop up on fly-over.
|
173 |
+
* Errors in jQuery's 'ready' method no longer stop the slideshow from showing. However, JavaScript errors should always be resolved.
|
174 |
+
* Text slides can now have transparent backgrounds by leaving the 'Background color' field empty.
|
175 |
+
|
176 |
= 2.2.7 =
|
177 |
* Fixed: Slideshow control buttons were placed behind the slideshow.
|
178 |
* Fixed: Image slides doubly inserted after having clicked on 'Load more results'
|
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: The slideshow plugin is easily deployable on your website. Add any image that has already been uploaded to add to your slideshow, add text slides, or even add a video. Options and styles are customizable for every single slideshow on your website.
|
6 |
-
Version: 2.2.
|
7 |
Requires at least: 3.3
|
8 |
Author: StefanBoonstra
|
9 |
Author URI: http://stefanboonstra.com/
|
@@ -17,12 +17,12 @@
|
|
17 |
*
|
18 |
* @since 1.0.0
|
19 |
* @author Stefan Boonstra
|
20 |
-
* @version
|
21 |
*/
|
22 |
class SlideshowPluginMain {
|
23 |
|
24 |
/** Variables */
|
25 |
-
static $version = '2.2.
|
26 |
|
27 |
/**
|
28 |
* 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: The slideshow plugin is easily deployable on your website. Add any image that has already been uploaded to add to your slideshow, add text slides, or even add a video. Options and styles are customizable for every single slideshow on your website.
|
6 |
+
Version: 2.2.8
|
7 |
Requires at least: 3.3
|
8 |
Author: StefanBoonstra
|
9 |
Author URI: http://stefanboonstra.com/
|
17 |
*
|
18 |
* @since 1.0.0
|
19 |
* @author Stefan Boonstra
|
20 |
+
* @version 03-03-2013
|
21 |
*/
|
22 |
class SlideshowPluginMain {
|
23 |
|
24 |
/** Variables */
|
25 |
+
static $version = '2.2.8';
|
26 |
|
27 |
/**
|
28 |
* Bootstraps the application by assigning the right functions to
|
style/SlideshowPlugin/functional.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.slideshow_container{margin:0;position:relative}.slideshow_container div{clear:none!important;max-width:none;padding:0}.slideshow_container img{border:0;margin:0;padding:0;max-width:none}.slideshow_container p{margin:0;padding:10px}.slideshow_container a{margin:0;display:block}.slideshow_container ul{margin:0;padding:0}.slideshow_container ul li{margin:0;padding:0}.slideshow_container h1,.slideshow_container h2,.slideshow_container h3,.slideshow_container h4,.slideshow_container h5,.slideshow_container h6{margin:0;padding:10px}.slideshow_container .slideshow_content{position:relative;overflow:hidden}.slideshow_container .slideshow_view{position:absolute;width:0;height:0;overflow:hidden}.slideshow_container .slideshow_slide{position:relative;float:left!important;overflow:hidden}.slideshow_container .slideshow_description{display:none;position:absolute
|
1 |
+
.slideshow_container{margin:0;position:relative}.slideshow_container div{clear:none!important;max-width:none;padding:0}.slideshow_container img{border:0;margin:0;padding:0;max-width:none}.slideshow_container p{margin:0;padding:10px}.slideshow_container a{margin:0;display:block!important}.slideshow_container ul{margin:0;padding:0}.slideshow_container ul li{margin:0;padding:0}.slideshow_container h1,.slideshow_container h2,.slideshow_container h3,.slideshow_container h4,.slideshow_container h5,.slideshow_container h6{margin:0;padding:10px}.slideshow_container .slideshow_content{position:relative;overflow:hidden}.slideshow_container .slideshow_view{position:absolute;width:0;height:0;overflow:hidden}.slideshow_container .slideshow_slide{position:relative;float:left!important;overflow:hidden}.slideshow_container .slideshow_slide_text .slideshow_background_anchor{position:absolute;top:0}.slideshow_container .slideshow_description{display:none;position:absolute}.slideshow_container .transparent{zoom:1}.slideshow_container .transparent:hover{zoom:1}.slideshow_container .slideshow_controlPanel{position:absolute;top:5px;left:50%;display:none;z-index:2}.slideshow_container .slideshow_controlPanel ul{list-style:none;margin:0;padding:0}.slideshow_container .slideshow_controlPanel ul li{float:left}.slideshow_container .slideshow_controlPanel ul li:hover{cursor:pointer}.slideshow_container .slideshow_button{padding:0;position:absolute;top:50%;cursor:pointer;display:none;z-index:2}.slideshow_container .slideshow_previous{left:5px}.slideshow_container .slideshow_next{right:5px}.slideshow_container .slideshow_pagination{height:0;position:absolute;width:100%;display:none;z-index:2}.slideshow_container .slideshow_pagination_center{display:table;margin:0 auto}.slideshow_container .slideshow_pagination ul{list-style:none;margin:0;padding:0}.slideshow_container .slideshow_pagination ul li{display:inline;float:left}.slideshow_container .slideshow_pagination ul li:hover{cursor:pointer}.slideshow_plugin_manufacturer{position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}
|
style/SlideshowPlugin/style-dark.css
CHANGED
@@ -6,11 +6,11 @@
|
|
6 |
.slideshow_container .slideshow_slide_text h2 { text-align: center; font-size: 1.3em; }
|
7 |
.slideshow_container .slideshow_slide_text p { text-align: center; }
|
8 |
.slideshow_container .slideshow_slide_image { }
|
9 |
-
.slideshow_container .
|
10 |
|
11 |
.slideshow_container .slideshow_description { background: #000; width: 100%; }
|
12 |
-
.slideshow_container .slideshow_description h2 { color: #fff; font-size: 1.3em; text-align: center; }
|
13 |
-
.slideshow_container .slideshow_description p { color: #fff; text-align: center; }
|
14 |
|
15 |
.slideshow_container .slideshow_transparent { filter: alpha(opacity = 50); opacity: 0.5; }
|
16 |
.slideshow_container .slideshow_transparent:hover { filter: alpha(opacity = 80); opacity: 0.8; }
|
6 |
.slideshow_container .slideshow_slide_text h2 { text-align: center; font-size: 1.3em; }
|
7 |
.slideshow_container .slideshow_slide_text p { text-align: center; }
|
8 |
.slideshow_container .slideshow_slide_image { }
|
9 |
+
.slideshow_container .slideshow_slide_video { }
|
10 |
|
11 |
.slideshow_container .slideshow_description { background: #000; width: 100%; }
|
12 |
+
.slideshow_container .slideshow_description h2 a { color: #fff; font-size: 1.3em; text-align: center; }
|
13 |
+
.slideshow_container .slideshow_description p a { color: #fff; text-align: center; }
|
14 |
|
15 |
.slideshow_container .slideshow_transparent { filter: alpha(opacity = 50); opacity: 0.5; }
|
16 |
.slideshow_container .slideshow_transparent:hover { filter: alpha(opacity = 80); opacity: 0.8; }
|
style/SlideshowPlugin/style-light.css
CHANGED
@@ -6,11 +6,11 @@
|
|
6 |
.slideshow_container .slideshow_slide_text h2 { text-align: center; font-size: 1.3em; }
|
7 |
.slideshow_container .slideshow_slide_text p { text-align: center; }
|
8 |
.slideshow_container .slideshow_slide_image { }
|
9 |
-
.slideshow_container .
|
10 |
|
11 |
.slideshow_container .slideshow_description { background: #000; width: 100%; }
|
12 |
-
.slideshow_container .slideshow_description h2 { color: #fff; font-size: 1.3em; text-align: center; }
|
13 |
-
.slideshow_container .slideshow_description p { color: #fff; text-align: center; }
|
14 |
|
15 |
.slideshow_container .slideshow_transparent { filter: alpha(opacity = 50); opacity: 0.5; }
|
16 |
.slideshow_container .slideshow_transparent:hover { filter: alpha(opacity = 80); opacity: 0.8; }
|
6 |
.slideshow_container .slideshow_slide_text h2 { text-align: center; font-size: 1.3em; }
|
7 |
.slideshow_container .slideshow_slide_text p { text-align: center; }
|
8 |
.slideshow_container .slideshow_slide_image { }
|
9 |
+
.slideshow_container .slideshow_slide_video { }
|
10 |
|
11 |
.slideshow_container .slideshow_description { background: #000; width: 100%; }
|
12 |
+
.slideshow_container .slideshow_description h2 a { color: #fff; font-size: 1.3em; text-align: center; }
|
13 |
+
.slideshow_container .slideshow_description p a { color: #fff; text-align: center; }
|
14 |
|
15 |
.slideshow_container .slideshow_transparent { filter: alpha(opacity = 50); opacity: 0.5; }
|
16 |
.slideshow_container .slideshow_transparent:hover { filter: alpha(opacity = 80); opacity: 0.8; }
|
views/SlideshowPlugin/slideshow.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
<div class="slideshow_container slideshow_container_<?php echo $
|
2 |
|
3 |
<div class="slideshow_controlPanel slideshow_transparent"><ul><li class="slideshow_togglePlay"></li></ul></div>
|
4 |
|
5 |
<div class="slideshow_button slideshow_previous slideshow_transparent"></div>
|
6 |
<div class="slideshow_button slideshow_next slideshow_transparent"></div>
|
7 |
|
8 |
-
<div class="slideshow_pagination"><div class="slideshow_pagination_center"
|
9 |
|
10 |
<div class="slideshow_content" style="display: none;">
|
11 |
|
@@ -28,10 +28,4 @@
|
|
28 |
<?php endforeach; ?>
|
29 |
-->
|
30 |
<?php endif; ?>
|
31 |
-
|
32 |
-
<?php if(!empty($style)): ?>
|
33 |
-
<style type="text/css">
|
34 |
-
<?php echo htmlspecialchars($style); ?>
|
35 |
-
</style>
|
36 |
-
<?php endif; ?>
|
37 |
</div>
|
1 |
+
<div class="slideshow_container slideshow_container_<?php echo $styleName; ?>" style="width: 2000px; <?php echo (isset($settings['preserveSlideshowDimensions']) && $settings['preserveSlideshowDimensions'] == 'false' && isset($settings['height']) && $settings['height'] > 0) ? 'height: ' . $settings['height'] . 'px;' : ''; ?> <?php echo (isset($settings['maxWidth']) && $settings['maxWidth'] > 0) ? 'max-width: ' . $settings['maxWidth'] . 'px;' : ''; ?>" data-session-id="<?php echo $sessionID; ?>">
|
2 |
|
3 |
<div class="slideshow_controlPanel slideshow_transparent"><ul><li class="slideshow_togglePlay"></li></ul></div>
|
4 |
|
5 |
<div class="slideshow_button slideshow_previous slideshow_transparent"></div>
|
6 |
<div class="slideshow_button slideshow_next slideshow_transparent"></div>
|
7 |
|
8 |
+
<div class="slideshow_pagination"><div class="slideshow_pagination_center"></div></div>
|
9 |
|
10 |
<div class="slideshow_content" style="display: none;">
|
11 |
|
28 |
<?php endforeach; ?>
|
29 |
-->
|
30 |
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
</div>
|
views/SlideshowPluginGeneralSettings/custom-styles.php
CHANGED
@@ -129,7 +129,7 @@ if(is_array($customStyleKeys)){
|
|
129 |
type="text"
|
130 |
name="<?php echo SlideshowPluginGeneralSettings::$customStyles; ?>[<?php echo htmlspecialchars($customStyleKey); ?>][title]"
|
131 |
value="<?php echo (isset($customStyleKeys[$customStyleKey]) && !empty($customStyleKeys[$customStyleKey])) ? $customStyleKeys[$customStyleKey] : __('Untitled', 'slideshow-plugin'); ?>"
|
132 |
-
|
133 |
</p>
|
134 |
|
135 |
<p>
|
@@ -138,7 +138,7 @@ if(is_array($customStyleKeys)){
|
|
138 |
name="<?php echo SlideshowPluginGeneralSettings::$customStyles; ?>[<?php echo htmlspecialchars($customStyleKey); ?>][style]"
|
139 |
rows="25"
|
140 |
cols=""
|
141 |
-
|
142 |
</p>
|
143 |
|
144 |
</div>
|
129 |
type="text"
|
130 |
name="<?php echo SlideshowPluginGeneralSettings::$customStyles; ?>[<?php echo htmlspecialchars($customStyleKey); ?>][title]"
|
131 |
value="<?php echo (isset($customStyleKeys[$customStyleKey]) && !empty($customStyleKeys[$customStyleKey])) ? $customStyleKeys[$customStyleKey] : __('Untitled', 'slideshow-plugin'); ?>"
|
132 |
+
/>
|
133 |
</p>
|
134 |
|
135 |
<p>
|
138 |
name="<?php echo SlideshowPluginGeneralSettings::$customStyles; ?>[<?php echo htmlspecialchars($customStyleKey); ?>][style]"
|
139 |
rows="25"
|
140 |
cols=""
|
141 |
+
><?php echo isset($customStyleValue) ? htmlspecialchars($customStyleValue) : ''; ?></textarea>
|
142 |
</p>
|
143 |
|
144 |
</div>
|
views/SlideshowPluginPostType/support-plugin.php
CHANGED
@@ -26,15 +26,6 @@
|
|
26 |
/>
|
27 |
</p>
|
28 |
|
29 |
-
<p>
|
30 |
-
<input
|
31 |
-
type="button"
|
32 |
-
class="button-secondary"
|
33 |
-
value="<?php _e('Questions / Suggestions', 'slideshow-plugin'); ?>"
|
34 |
-
onclick="window.open('http://wordpress.org/support/plugin/slideshow-jquery-image-gallery/')"
|
35 |
-
/>
|
36 |
-
</p>
|
37 |
-
|
38 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
39 |
<input type="hidden" name="cmd" value="_s-xclick" />
|
40 |
<input type="hidden" name="hosted_button_id" value="VWHWA99RBJZW8" />
|
26 |
/>
|
27 |
</p>
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
30 |
<input type="hidden" name="cmd" value="_s-xclick" />
|
31 |
<input type="hidden" name="hosted_button_id" value="VWHWA99RBJZW8" />
|
views/SlideshowPluginSlideshowSlide/backend_text.php
CHANGED
@@ -33,10 +33,11 @@ if(isset($properties['urlTarget']))
|
|
33 |
<textarea name="<?php echo $name; ?>[description]" rows="7" cols="" style="width: 100%;"><?php echo $description; ?></textarea><br />
|
34 |
|
35 |
<i><?php _e('Text color', 'slideshow-plugin'); ?></i><br />
|
36 |
-
<input type="text" name="<?php echo $name; ?>[textColor]" value="<?php echo
|
37 |
|
38 |
<i><?php _e('Background color', 'slideshow-plugin'); ?></i><br />
|
39 |
<input type="text" name="<?php echo $name; ?>[color]" value="<?php echo $color; ?>" class="color {required:false}" />
|
|
|
40 |
|
41 |
</p>
|
42 |
|
33 |
<textarea name="<?php echo $name; ?>[description]" rows="7" cols="" style="width: 100%;"><?php echo $description; ?></textarea><br />
|
34 |
|
35 |
<i><?php _e('Text color', 'slideshow-plugin'); ?></i><br />
|
36 |
+
<input type="text" name="<?php echo $name; ?>[textColor]" value="<?php echo $textColor; ?>" class="color {required:false}" /><br />
|
37 |
|
38 |
<i><?php _e('Background color', 'slideshow-plugin'); ?></i><br />
|
39 |
<input type="text" name="<?php echo $name; ?>[color]" value="<?php echo $color; ?>" class="color {required:false}" />
|
40 |
+
<i><?php _e('(Leave empty for a transparent background)', 'slideshow-plugin'); ?></i>
|
41 |
|
42 |
</p>
|
43 |
|
views/SlideshowPluginSlideshowSlide/frontend_attachment.php
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
|
3 |
$title = $description = $url = $urlTarget = $postId = '';
|
4 |
if(isset($properties['title']))
|
5 |
-
$title = SlideshowPluginSecurity::htmlspecialchars_allow_exceptions($properties['title']);
|
6 |
if(isset($properties['description']))
|
7 |
-
$description = SlideshowPluginSecurity::htmlspecialchars_allow_exceptions($properties['description']);
|
8 |
if(isset($properties['url']))
|
9 |
$url = htmlspecialchars($properties['url']);
|
10 |
if(isset($properties['urlTarget']))
|
@@ -54,13 +54,11 @@ if(is_numeric($postId)):
|
|
54 |
|
55 |
<div class="slideshow_slide slideshow_slide_image">
|
56 |
<a <?php echo $anchorTagAttributes; ?>>
|
57 |
-
<img src="<?php echo htmlspecialchars($imageSrc); ?>" alt="<?php echo $alt; ?>"
|
58 |
</a>
|
59 |
<div class="slideshow_description slideshow_transparent">
|
60 |
-
|
61 |
-
|
62 |
-
<?php echo !empty($description) ? '<p>' . $description . '</p>' : ''; ?>
|
63 |
-
</a>
|
64 |
</div>
|
65 |
</div>
|
66 |
|
2 |
|
3 |
$title = $description = $url = $urlTarget = $postId = '';
|
4 |
if(isset($properties['title']))
|
5 |
+
$title = trim(SlideshowPluginSecurity::htmlspecialchars_allow_exceptions($properties['title']));
|
6 |
if(isset($properties['description']))
|
7 |
+
$description = trim(SlideshowPluginSecurity::htmlspecialchars_allow_exceptions($properties['description']));
|
8 |
if(isset($properties['url']))
|
9 |
$url = htmlspecialchars($properties['url']);
|
10 |
if(isset($properties['urlTarget']))
|
54 |
|
55 |
<div class="slideshow_slide slideshow_slide_image">
|
56 |
<a <?php echo $anchorTagAttributes; ?>>
|
57 |
+
<img src="<?php echo htmlspecialchars($imageSrc); ?>" alt="<?php echo $alt; ?>" <?php echo ($imageWidth > 0) ? 'width="' . $imageWidth . '"' : ''; ?> <?php echo ($imageHeight > 0) ? 'height="' . $imageHeight . '"' : ''; ?> />
|
58 |
</a>
|
59 |
<div class="slideshow_description slideshow_transparent">
|
60 |
+
<?php echo !empty($title) ? '<h2><a ' . $anchorTagAttributes . '>' . $title . '</a></h2>' : ''; ?>
|
61 |
+
<?php echo !empty($description) ? '<p><a ' . $anchorTagAttributes . '>' . $description . '</a></p>' : ''; ?>
|
|
|
|
|
62 |
</div>
|
63 |
</div>
|
64 |
|
views/SlideshowPluginSlideshowSlide/frontend_text.php
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
|
3 |
$title = $description = $textColor = $color = $url = $urlTarget = '';
|
4 |
if(isset($properties['title']))
|
5 |
-
$title = SlideshowPluginSecurity::htmlspecialchars_allow_exceptions($properties['title']);
|
6 |
if(isset($properties['description']))
|
7 |
-
$description = SlideshowPluginSecurity::htmlspecialchars_allow_exceptions($properties['description']);
|
8 |
if(isset($properties['textColor']))
|
9 |
$textColor = htmlspecialchars($properties['textColor']);
|
10 |
if(isset($properties['color']))
|
@@ -14,18 +14,26 @@ if(isset($properties['url']))
|
|
14 |
if(isset($properties['urlTarget']))
|
15 |
$urlTarget = htmlspecialchars($properties['urlTarget']);
|
16 |
|
17 |
-
|
18 |
|
19 |
-
|
20 |
-
<a <?php echo !empty($url) ? 'href="' . $url . '"' : ''; ?> <?php echo !empty($urlTarget) ? 'target="' . $urlTarget . '"' : ''; ?>>
|
21 |
|
22 |
-
|
|
|
|
|
|
|
23 |
<?php echo $title; ?>
|
24 |
-
</
|
|
|
|
|
25 |
|
26 |
-
|
|
|
|
|
27 |
<?php echo $description; ?>
|
28 |
-
</
|
|
|
|
|
29 |
|
30 |
-
|
31 |
</div>
|
2 |
|
3 |
$title = $description = $textColor = $color = $url = $urlTarget = '';
|
4 |
if(isset($properties['title']))
|
5 |
+
$title = trim(SlideshowPluginSecurity::htmlspecialchars_allow_exceptions($properties['title']));
|
6 |
if(isset($properties['description']))
|
7 |
+
$description = trim(SlideshowPluginSecurity::htmlspecialchars_allow_exceptions($properties['description']));
|
8 |
if(isset($properties['textColor']))
|
9 |
$textColor = htmlspecialchars($properties['textColor']);
|
10 |
if(isset($properties['color']))
|
14 |
if(isset($properties['urlTarget']))
|
15 |
$urlTarget = htmlspecialchars($properties['urlTarget']);
|
16 |
|
17 |
+
$anchorTagAttributes = (!empty($url) ? 'href="' . $url . '"' : '') . ' ' . (!empty($urlTarget) ? 'target="' . $urlTarget . '"' : '');
|
18 |
|
19 |
+
?>
|
|
|
20 |
|
21 |
+
<div class="slideshow_slide slideshow_slide_text" style="<?php echo !empty($color) ? 'background-color: #' . $color . ';' : '' ?>">
|
22 |
+
<?php if(!empty($title)): ?>
|
23 |
+
<h2>
|
24 |
+
<a <?php echo $anchorTagAttributes; ?> style="<?php echo !empty($textColor) ? 'color: #' . $textColor . ';' : ''; ?>">
|
25 |
<?php echo $title; ?>
|
26 |
+
</a>
|
27 |
+
</h2>
|
28 |
+
<?php endif; ?>
|
29 |
|
30 |
+
<?php if(!empty($description)): ?>
|
31 |
+
<p>
|
32 |
+
<a <?php echo $anchorTagAttributes; ?> style="<?php echo !empty($textColor) ? 'color: #' . $textColor . ';' : ''; ?>">
|
33 |
<?php echo $description; ?>
|
34 |
+
</a>
|
35 |
+
</p>
|
36 |
+
<?php endif; ?>
|
37 |
|
38 |
+
<a <?php echo $anchorTagAttributes ?> class="slideshow_background_anchor"></a>
|
39 |
</div>
|