Version Description
- Couple of small bug fixes: Undefined index error for 'popup_shortcode' vairables and hide "SA PRO' advert for non-admin users.
=
Download this release
Release Info
Developer | simonpedge |
Plugin | Slide Anything – Responsive Content / HTML Slider and Carousel |
Version | 2.3.11 |
Comparing to | |
See all releases |
Code changes from version 2.3.9 to 2.3.11
- css/slide-anything-admin.css +24 -10
- php/single-page.php +22 -0
- php/slide-anything-admin.php +107 -53
- readme.txt +14 -2
- slide-anything.php +2 -1
css/slide-anything-admin.css
CHANGED
@@ -726,37 +726,51 @@ input.sa_slide_popup_imagetitle:-ms-input-placeholder { color:#c0c0c0 !important
|
|
726 |
left:0px;
|
727 |
width:100%;
|
728 |
height:100%;
|
729 |
-
background-color:rgba(0,0,0,0.
|
730 |
z-index:100041;
|
731 |
}
|
732 |
#sa_preview_popup #sa_preview_wrapper {
|
733 |
position:absolute;
|
734 |
box-sizing:border-box;
|
735 |
width:96%;
|
736 |
-
|
|
|
737 |
left:2%;
|
738 |
-
padding:20px 30px;
|
739 |
background-color:#ffffff;
|
740 |
}
|
741 |
#sa_preview_popup #sa_preview_wrapper #sa_preview_close {
|
742 |
position:absolute;
|
743 |
top:0px;
|
744 |
right:0px;
|
745 |
-
|
746 |
-
width:30px;
|
747 |
text-align:center;
|
748 |
-
font-weight:
|
749 |
-
font-size:
|
750 |
-
line-height:
|
751 |
-
color
|
|
|
752 |
cursor:pointer;
|
|
|
753 |
transition:background .3s ease-in-out;
|
754 |
-webkit-transition:background .3s ease-in-out;
|
755 |
-moz-transition:background .3s ease-in-out;
|
756 |
-o-transition:background .3s ease-in-out;
|
757 |
}
|
758 |
#sa_preview_popup #sa_preview_wrapper #sa_preview_close:hover {
|
759 |
-
background-color:#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
760 |
}
|
761 |
|
762 |
/* ### METABOX 'Items Displayed' ### */
|
726 |
left:0px;
|
727 |
width:100%;
|
728 |
height:100%;
|
729 |
+
background-color:rgba(0,0,0,0.9);
|
730 |
z-index:100041;
|
731 |
}
|
732 |
#sa_preview_popup #sa_preview_wrapper {
|
733 |
position:absolute;
|
734 |
box-sizing:border-box;
|
735 |
width:96%;
|
736 |
+
height:96%;
|
737 |
+
top:2%;
|
738 |
left:2%;
|
|
|
739 |
background-color:#ffffff;
|
740 |
}
|
741 |
#sa_preview_popup #sa_preview_wrapper #sa_preview_close {
|
742 |
position:absolute;
|
743 |
top:0px;
|
744 |
right:0px;
|
745 |
+
width:40px;
|
|
|
746 |
text-align:center;
|
747 |
+
font-weight:normal;
|
748 |
+
font-size:22px;
|
749 |
+
line-height:40px;
|
750 |
+
background-color:rgba(0,0,0,0.5);
|
751 |
+
color:#ffffff;
|
752 |
cursor:pointer;
|
753 |
+
z-index:2;
|
754 |
transition:background .3s ease-in-out;
|
755 |
-webkit-transition:background .3s ease-in-out;
|
756 |
-moz-transition:background .3s ease-in-out;
|
757 |
-o-transition:background .3s ease-in-out;
|
758 |
}
|
759 |
#sa_preview_popup #sa_preview_wrapper #sa_preview_close:hover {
|
760 |
+
background-color:#000000;
|
761 |
+
}
|
762 |
+
#sa_preview_popup #sa_preview_wrapper #sa_preview_content {
|
763 |
+
position:absolute;
|
764 |
+
top:0px;
|
765 |
+
left:0px;
|
766 |
+
width:100%;
|
767 |
+
height:100%;
|
768 |
+
box-sizing:content-box;
|
769 |
+
z-index:1;
|
770 |
+
}
|
771 |
+
#sa_preview_popup #sa_preview_wrapper #sa_preview_content iframe {
|
772 |
+
width:100%;
|
773 |
+
height:100%;
|
774 |
}
|
775 |
|
776 |
/* ### METABOX 'Items Displayed' ### */
|
php/single-page.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template Name: Slide Anything Preview Page
|
4 |
+
* This template will only display the page content (and no header, footer or sidebar)
|
5 |
+
*/
|
6 |
+
?>
|
7 |
+
<!DOCTYPE html>
|
8 |
+
<html <?php language_attributes(); ?>>
|
9 |
+
<head>
|
10 |
+
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
11 |
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
12 |
+
<?php wp_head(); ?>
|
13 |
+
</head>
|
14 |
+
<body class="cleanpage">
|
15 |
+
<?php
|
16 |
+
while (have_posts()) : the_post();
|
17 |
+
the_content();
|
18 |
+
endwhile;
|
19 |
+
?>
|
20 |
+
<?php wp_footer(); ?>
|
21 |
+
</body>
|
22 |
+
</html>
|
php/slide-anything-admin.php
CHANGED
@@ -133,44 +133,46 @@ function version_20_upgrade_notice() {
|
|
133 |
$sa_pro_version = validate_slide_anything_pro_registration();
|
134 |
|
135 |
if (!$sa_pro_version) {
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
|
|
|
|
174 |
}
|
175 |
}
|
176 |
}
|
@@ -1371,20 +1373,59 @@ function cpt_slider_shortcode_content($post) {
|
|
1371 |
$shortcode = '[slide-anything id="'.$post->ID.'"]';
|
1372 |
echo "<div id='sa_slider_shortcode'>".esc_html($shortcode)."</div>\n";
|
1373 |
echo "<div id='sa_shortcode_copy' class='button button-secondary'>Copy to Clipboard</div>\n";
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1388 |
}
|
1389 |
}
|
1390 |
|
@@ -2202,7 +2243,11 @@ function cpt_slider_save_postdata() {
|
|
2202 |
$slide_popup_video_type_val = sanitize_text_field($_POST[$slide_popup_video_type]); // SANATIZE
|
2203 |
$slide_popup_background_val = sanitize_text_field($_POST[$slide_popup_background]); // SANATIZE
|
2204 |
$slide_popup_html_val = balanceTags($_POST[$slide_popup_html], true); // FIX MISSING CLOSING TAGS
|
2205 |
-
|
|
|
|
|
|
|
|
|
2206 |
$slide_popup_bgcol_val = sanitize_text_field($_POST[$slide_popup_bgcol]); // SANATIZE
|
2207 |
$slide_popup_width_val = abs(intval($_POST[$slide_popup_width])); // SANATIZE
|
2208 |
}
|
@@ -2899,4 +2944,13 @@ function sa_reorder_slides_page() {
|
|
2899 |
|
2900 |
echo "</div>\n"; #sa_reorder_slides
|
2901 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2902 |
?>
|
133 |
$sa_pro_version = validate_slide_anything_pro_registration();
|
134 |
|
135 |
if (!$sa_pro_version) {
|
136 |
+
if (current_user_can('administrator')) {
|
137 |
+
/* Check that the user hasn't already clicked to ignore the message */
|
138 |
+
if (!get_user_meta($user_id, 'sa_ignore_notice')) {
|
139 |
+
echo "<div class='notice notice-info' style='padding-top:10px;'>";
|
140 |
+
|
141 |
+
echo "<div style='float:left; width:170px; margin-right:15px;'><a href='https://edgewebpages.com/' target='_blank'>";
|
142 |
+
echo "<img style='width:100%;' src='".get_site_url()."/wp-content/plugins/slide-anything/images/slide_anything_pro_product_image.png' /></a></div>";
|
143 |
+
echo "<h3 style='margin:0px !important; padding:10px 0px !important;'>SLIDE ANYTHING PRO</h3>";
|
144 |
+
echo "<p style='margin:0px 0px 10px !important;'><strong>SLIDE ANYTHING PRO</strong> adds POPUPS into the mix!!";
|
145 |
+
echo "<br/><strong>SLIDE ANYTHING PRO</strong> also adds Hero Sliders & Thumbnail Pagination!!";
|
146 |
+
echo "<br/><strong>SLIDE ANYTHING PRO</strong> allows you to create Showcase Carousels!!</p>";
|
147 |
+
|
148 |
+
echo "<p style='margin:0px 0px 10px !important;'>With <a href='https://edgewebpages.com/' target='_blank'>SLIDE ANYTHING PRO</a> ";
|
149 |
+
echo "each slide can now open a MODAL POPUP, which can be an IMAGE popup, a VIDEO EMBED popup (YouTube/Vimeo), a popup ";
|
150 |
+
echo "containing HTML CODE or a popup displaying a WordPress SHORTCODE. This can be a very useful addition to ";
|
151 |
+
echo "Slide Anything, if you are wanting to create Image or Video galleries for your websites.</p>";
|
152 |
+
|
153 |
+
echo "<p style='margin:0px 0px 10px !important;'>With <a href='https://edgewebpages.com/' target='_blank'>SLIDE ANYTHING PRO</a> ";
|
154 |
+
echo "you can now create a HERO SLIDER, which is a slider that always is 100% of the width/height of the device it's ";
|
155 |
+
echo "being viewed on. You can now also add THUMBNAIL PAGINATION to your sliders. Thumbnail Pagination are small ";
|
156 |
+
echo "clickable thumbnail images, with each thumbnail representing a single slide which can be clicked in order to ";
|
157 |
+
echo "navigate to.</p>";
|
158 |
+
|
159 |
+
echo "<p style='margin:0px 0px 10px !important;'>With <a href='https://edgewebpages.com/' target='_blank'>SLIDE ANYTHING PRO</a> ";
|
160 |
+
echo "you can also create a SHOWCASE CAROUSEL, which has a container width that exceeds the screen/window width. ";
|
161 |
+
echo "The leftmost/rightmost visible slides therefore become partially visible.</p>";
|
162 |
+
|
163 |
+
echo "<p style='margin:0px !important;'>For more information, click on the DEMO links below:</p>";
|
164 |
+
echo "<p style='margin:0px !important;'>";
|
165 |
+
echo "<a href='https://edgewebpages.com/' target='_blank'>MODAL POPUPS DEMO</a> | ";
|
166 |
+
echo "<a href='https://edgewebpages.com/hero-slider-with-thumbnails/' target='_blank'>HERO SLIDER WITH THUMBNAILS</a> | ";
|
167 |
+
echo "<a href='https://edgewebpages.com/showcase-carousel-demo/' target='_blank'>SHOWCASE CAROUSEL</a></p>";
|
168 |
+
|
169 |
+
echo "<div style='clear:both; float:none; width:100%; height:10px;'></div>";
|
170 |
+
echo "<a style='display:inline-block; float:right; padding:7px 10px; background:crimson; color:white; text-decoration:none; ";
|
171 |
+
echo "border-radius:5px; font-size:16px;' href='".get_site_url()."/wp-admin/edit.php?post_type=sa_slider&sa_nag_ignore=0'>Hide this notice</a>";
|
172 |
+
echo "<div style='clear:both; float:none; width:100%; height:10px;'></div>";
|
173 |
+
|
174 |
+
echo "</div>";
|
175 |
+
}
|
176 |
}
|
177 |
}
|
178 |
}
|
1373 |
$shortcode = '[slide-anything id="'.$post->ID.'"]';
|
1374 |
echo "<div id='sa_slider_shortcode'>".esc_html($shortcode)."</div>\n";
|
1375 |
echo "<div id='sa_shortcode_copy' class='button button-secondary'>Copy to Clipboard</div>\n";
|
1376 |
+
|
1377 |
+
if ($post_status == 'publish') {
|
1378 |
+
// CHECK IF THE PREVIEW PAGE ALREADY EXISTS
|
1379 |
+
$preview_page_created = 1;
|
1380 |
+
$preview_page = get_page_by_title('Slide Anything Popup Preview');
|
1381 |
+
$preview_id = $preview_page->ID;
|
1382 |
+
if ($preview_id != '') {
|
1383 |
+
// PREVIEW PAGE EXISTS - UPDATE PAGE CONTENT TO CONTAIN THIS SA SHORTCODE
|
1384 |
+
wp_untrash_post($preview_id); // remove preview page from trash (if applicable)
|
1385 |
+
$page_content = "[slide-anything id='".$post->ID."']";
|
1386 |
+
$page_data = array(
|
1387 |
+
'ID' => $preview_id,
|
1388 |
+
'post_content' => $page_content
|
1389 |
+
);
|
1390 |
+
$page_id = wp_update_post($page_data);
|
1391 |
+
if (is_wp_error($page_id)) {
|
1392 |
+
$preview_page_created = 0;
|
1393 |
+
}
|
1394 |
+
} else {
|
1395 |
+
// PREVIEW PAGE DOES NOT EXIST - CREATE PREVIEW PAGE WITH SA SHORTCODE CONTENT
|
1396 |
+
$page_content = "[slide-anything id='".$post->ID."']";
|
1397 |
+
$curr_user_id = get_current_user_id();
|
1398 |
+
$page_data = array(
|
1399 |
+
'post_title' => 'Slide Anything Popup Preview',
|
1400 |
+
'post_content' => $page_content,
|
1401 |
+
'post_status' => 'publish',
|
1402 |
+
'post_type' => 'page',
|
1403 |
+
'post_author' => $curr_user_id,
|
1404 |
+
'menu_order' => 9999
|
1405 |
+
);
|
1406 |
+
$page_id = wp_insert_post($page_data);
|
1407 |
+
if (is_wp_error($page_id)) {
|
1408 |
+
$preview_page_created = 0;
|
1409 |
+
}
|
1410 |
+
}
|
1411 |
+
if ($preview_page_created == 1) {
|
1412 |
+
// DISPLAY SLIDER PREVIEW BUTTON
|
1413 |
+
if ($post_status == 'publish') {
|
1414 |
+
echo "<div id='sa_preview_slider' class='button button-secondary' ";
|
1415 |
+
echo "onClick='document.getElementById(\"sa_preview_popup\").style.display = \"block\";'>Preview Slider</div>\n";
|
1416 |
+
}
|
1417 |
+
// DISPLAY SLIDER PREVIEW POPUP
|
1418 |
+
$preview_page_url = get_page_link($page_id);
|
1419 |
+
echo "<div id='sa_preview_popup' style='display:none;'>\n";
|
1420 |
+
echo "<div id='sa_preview_wrapper'>\n";
|
1421 |
+
echo "<div id='sa_preview_close' title='Close Slider Preview' ";
|
1422 |
+
echo "onClick='document.getElementById(\"sa_preview_popup\").style.display = \"none\";'>X</div>\n";
|
1423 |
+
echo "<div id='sa_preview_content'>";
|
1424 |
+
echo "<iframe src='".$preview_page_url."'></iframe>\n";
|
1425 |
+
echo "</div>\n"; // #sa_preview_content
|
1426 |
+
echo "</div>\n"; // #sa_preview_wrapper
|
1427 |
+
echo "</div>\n";
|
1428 |
+
}
|
1429 |
}
|
1430 |
}
|
1431 |
|
2243 |
$slide_popup_video_type_val = sanitize_text_field($_POST[$slide_popup_video_type]); // SANATIZE
|
2244 |
$slide_popup_background_val = sanitize_text_field($_POST[$slide_popup_background]); // SANATIZE
|
2245 |
$slide_popup_html_val = balanceTags($_POST[$slide_popup_html], true); // FIX MISSING CLOSING TAGS
|
2246 |
+
if (isset($_POST[$slide_popup_shortcode])) {
|
2247 |
+
$slide_popup_shortcode_val = sanitize_text_field($_POST[$slide_popup_shortcode]); // SANATIZE
|
2248 |
+
} else {
|
2249 |
+
$slide_popup_shortcode_val = '';
|
2250 |
+
}
|
2251 |
$slide_popup_bgcol_val = sanitize_text_field($_POST[$slide_popup_bgcol]); // SANATIZE
|
2252 |
$slide_popup_width_val = abs(intval($_POST[$slide_popup_width])); // SANATIZE
|
2253 |
}
|
2944 |
|
2945 |
echo "</div>\n"; #sa_reorder_slides
|
2946 |
}
|
2947 |
+
|
2948 |
+
|
2949 |
+
// ### FUNCTION CALLED BY 'template_include' FILTER TO USE A CUSTOM PAGE TERMPLATE FOR SA PREVIEW PAGE ###
|
2950 |
+
function sa_preview_page_template($template) {
|
2951 |
+
if (is_page('Slide Anything Popup Preview')) {
|
2952 |
+
$template = dirname( __FILE__ ).'/single-page.php';
|
2953 |
+
}
|
2954 |
+
return $template;
|
2955 |
+
}
|
2956 |
?>
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: simonpedge
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RP7JLGK6VT252
|
4 |
Tags: slider, carousel, content slider, responsive slider, html slider, owl carousel
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 5.3
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -323,6 +323,12 @@ Adding a SLIDE ANYTHING slider using the WordPress 5.0 'Block Editor' is pretty
|
|
323 |
= 2.3.9 =
|
324 |
* CSS Style changes for some of the WordPress Dashboard input elements (in response to to the WordPress 5.3 update which changed some default Dashboard styling)
|
325 |
|
|
|
|
|
|
|
|
|
|
|
|
|
326 |
== Upgrade Notice ==
|
327 |
|
328 |
= 1.0 =
|
@@ -547,4 +553,10 @@ Adding a SLIDE ANYTHING slider using the WordPress 5.0 'Block Editor' is pretty
|
|
547 |
* Added the 'Use UL and LI Containers' checkbox which when checked, 'UL' is used as the DOM element for 'owl-stage' and 'LI' is used as the DOM elements for 'owl-item'
|
548 |
|
549 |
= 2.3.9 =
|
550 |
-
* CSS Style changes for some of the WordPress Dashboard input elements (in response to to the WordPress 5.3 update which changed some default Dashboard styling)
|
|
|
|
|
|
|
|
|
|
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RP7JLGK6VT252
|
4 |
Tags: slider, carousel, content slider, responsive slider, html slider, owl carousel
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 5.3.2
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
323 |
= 2.3.9 =
|
324 |
* CSS Style changes for some of the WordPress Dashboard input elements (in response to to the WordPress 5.3 update which changed some default Dashboard styling)
|
325 |
|
326 |
+
= 2.3.10 =
|
327 |
+
* Revamped the 'Preview Slider' feature, so that the preview popup container loads the front-end theme's javascript and css style files
|
328 |
+
|
329 |
+
= 2.3.11 =
|
330 |
+
* Couple of small bug fixes: Undefined index error for 'popup_shortcode' vairables and hide "SA PRO' advert for non-admin users.
|
331 |
+
|
332 |
== Upgrade Notice ==
|
333 |
|
334 |
= 1.0 =
|
553 |
* Added the 'Use UL and LI Containers' checkbox which when checked, 'UL' is used as the DOM element for 'owl-stage' and 'LI' is used as the DOM elements for 'owl-item'
|
554 |
|
555 |
= 2.3.9 =
|
556 |
+
* CSS Style changes for some of the WordPress Dashboard input elements (in response to to the WordPress 5.3 update which changed some default Dashboard styling)
|
557 |
+
|
558 |
+
= 2.3.10 =
|
559 |
+
* Revamped the 'Preview Slider' feature, so that the preview popup container loads the front-end theme's javascript and css style files
|
560 |
+
|
561 |
+
= 2.3.11 =
|
562 |
+
* Couple of small bug fixes: Undefined index error for 'popup_shortcode' vairables and hide "SA PRO' advert for non-admin users.
|
slide-anything.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: https://wordpress.org/plugins/slide-anything/
|
5 |
* Description: Slide Anything allows you to create a carousel/slider where the content for each slide can be anything you want - images, text, HTML, and even shortcodes. This plugin uses the Owl Carousel jQuery plugin, and lets you create beautiful, touch enabled, responsive carousels and sliders.
|
6 |
* Author: Simon Edge
|
7 |
-
* Version: 2.3.
|
8 |
* License: GPLv2 or later
|
9 |
*/
|
10 |
|
@@ -30,6 +30,7 @@ add_filter('manage_sa_slider_posts_custom_column', 'cpt_slider_custom_column_con
|
|
30 |
add_action('admin_head', 'add_tinymce_button');
|
31 |
add_action('admin_footer', 'get_tinymce_shortcode_array', 9999999);
|
32 |
add_action('admin_menu', 'extra_sa_menu_pages');
|
|
|
33 |
|
34 |
// SLIDE ANYTHING 2.0 UPGRADE NOTICE
|
35 |
add_action('admin_notices', 'version_20_upgrade_notice');
|
4 |
* Plugin URI: https://wordpress.org/plugins/slide-anything/
|
5 |
* Description: Slide Anything allows you to create a carousel/slider where the content for each slide can be anything you want - images, text, HTML, and even shortcodes. This plugin uses the Owl Carousel jQuery plugin, and lets you create beautiful, touch enabled, responsive carousels and sliders.
|
6 |
* Author: Simon Edge
|
7 |
+
* Version: 2.3.11
|
8 |
* License: GPLv2 or later
|
9 |
*/
|
10 |
|
30 |
add_action('admin_head', 'add_tinymce_button');
|
31 |
add_action('admin_footer', 'get_tinymce_shortcode_array', 9999999);
|
32 |
add_action('admin_menu', 'extra_sa_menu_pages');
|
33 |
+
add_filter('template_include', 'sa_preview_page_template');
|
34 |
|
35 |
// SLIDE ANYTHING 2.0 UPGRADE NOTICE
|
36 |
add_action('admin_notices', 'version_20_upgrade_notice');
|