Version Description
2017/Nov/23 =
FIX: Fixes FlexSlider bug when resizing slider.
FIX: Updates layout on post feed slides.
Download this release
Release Info
Developer | DavidAnderson |
Plugin | MetaSlider |
Version | 3.6.6 |
Comparing to | |
See all releases |
Code changes from version 3.6.5 to 3.6.6
- admin/Notices.php +18 -14
- admin/assets/css/admin.css +4 -0
- assets/sliders/flexslider/jquery.flexslider.js +1 -1
- assets/sliders/flexslider/jquery.flexslider.min.js +1 -1
- languages/ml-slider.pot +188 -188
- ml-slider.php +1994 -1994
- readme.txt +7 -2
admin/Notices.php
CHANGED
@@ -31,6 +31,11 @@ class MetaSlider_Notices extends Updraft_Notices_1_0 {
|
|
31 |
// To avoid showing the user ads off the start, lets wait
|
32 |
$this->notices_content = ($this->ad_delay_has_finished()) ? $this->ads : array();
|
33 |
$this->plugin = $plugin;
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
add_action('admin_enqueue_scripts', array($this, 'add_notice_assets'));
|
36 |
add_action('wp_ajax_notice_handler', array($this, 'ajax_notice_handler'));
|
@@ -175,72 +180,71 @@ class MetaSlider_Notices extends Updraft_Notices_1_0 {
|
|
175 |
}
|
176 |
|
177 |
/**
|
178 |
-
* Seasonal Notices. Note that if dismissed, they will stay dismissed for
|
179 |
-
*
|
180 |
-
* there's no need to edit the key/dismiss_time
|
181 |
* @return string
|
182 |
*/
|
183 |
protected function seasonal_notices() {
|
184 |
return array(
|
185 |
-
'
|
186 |
'title' => __('Black Friday - 50% off the MetaSlider Add-on Pack until November 30th', 'ml-slider'),
|
187 |
'text' => __('To benefit, use this discount code:', 'ml-slider').' ',
|
188 |
'image' => 'seasonal/black_friday.png',
|
189 |
'button_link' => apply_filters('metaslider_hoplink', 'https://www.metaslider.com/upgrade') . '?utm_source=metaslider-plugin-page&utm_medium=banner',
|
190 |
'button_meta' => 'ml-slider',
|
191 |
-
'dismiss_time' => '
|
192 |
'discount_code' => 'blackfriday2017sale',
|
193 |
'valid_from' => '2017-11-20 00:00:00',
|
194 |
'valid_to' => '2017-11-30 23:59:59',
|
195 |
'hide_time' => __('until next year', 'ml-slider'),
|
196 |
'supported_positions' => array('header', 'dashboard'),
|
197 |
),
|
198 |
-
'
|
199 |
'title' => __('Christmas sale - 50% off the MetaSlider Add-on Pack until December 25th', 'ml-slider'),
|
200 |
'text' => __('To benefit, use this discount code:', 'ml-slider').' ',
|
201 |
'image' => 'seasonal/christmas.png',
|
202 |
'button_link' => apply_filters('metaslider_hoplink', 'https://www.metaslider.com/upgrade') . '?utm_source=metaslider-plugin-page&utm_medium=banner',
|
203 |
'button_meta' => 'ml-slider',
|
204 |
-
'dismiss_time' => '
|
205 |
'discount_code' => 'christmas2017sale',
|
206 |
'valid_from' => '2017-12-01 00:00:00',
|
207 |
'valid_to' => '2017-12-25 23:59:59',
|
208 |
'hide_time' => __('until next year', 'ml-slider'),
|
209 |
'supported_positions' => array('header', 'dashboard'),
|
210 |
),
|
211 |
-
'
|
212 |
'title' => __('Happy New Year - 50% off the MetaSlider Add-on Pack until January 1st', 'ml-slider'),
|
213 |
'text' => __('To benefit, use this discount code:', 'ml-slider').' ',
|
214 |
'image' => 'seasonal/new_year.png',
|
215 |
'button_link' => apply_filters('metaslider_hoplink', 'https://www.metaslider.com/upgrade') . '?utm_source=metaslider-plugin-page&utm_medium=banner',
|
216 |
'button_meta' => 'ml-slider',
|
217 |
-
'dismiss_time' => '
|
218 |
'discount_code' => 'newyear2018sale',
|
219 |
'valid_from' => '2017-12-26 00:00:00',
|
220 |
'valid_to' => '2018-01-14 23:59:59',
|
221 |
'hide_time' => __('until next year', 'ml-slider'),
|
222 |
'supported_positions' => array('header', 'dashboard'),
|
223 |
),
|
224 |
-
'
|
225 |
'title' => __('Spring sale - 50% off the MetaSlider Add-on Pack until April 31st', 'ml-slider'),
|
226 |
'text' => __('To benefit, use this discount code:', 'ml-slider').' ',
|
227 |
'image' => 'seasonal/spring.png',
|
228 |
'button_link' => apply_filters('metaslider_hoplink', 'https://www.metaslider.com/upgrade') . '?utm_source=metaslider-plugin-page&utm_medium=banner',
|
229 |
'button_meta' => 'ml-slider',
|
230 |
-
'dismiss_time' => '
|
231 |
'discount_code' => 'spring2018sale',
|
232 |
'valid_from' => '2018-04-01 00:00:00',
|
233 |
'valid_to' => '2018-04-30 23:59:59',
|
234 |
'hide_time' => __('until next year', 'ml-slider'),
|
235 |
'supported_positions' => array('header', 'dashboard'),
|
236 |
),
|
237 |
-
'
|
238 |
'title' => __('Summer sale - 50% off the MetaSlider Add-on Pack until July 31st', 'ml-slider'),
|
239 |
'text' => __('To benefit, use this discount code:', 'ml-slider').' ',
|
240 |
'image' => 'seasonal/summer.png',
|
241 |
'button_link' => apply_filters('metaslider_hoplink', 'https://www.metaslider.com/upgrade') . '?utm_source=metaslider-plugin-page&utm_medium=banner',
|
242 |
'button_meta' => 'ml-slider',
|
243 |
-
'dismiss_time' => '
|
244 |
'discount_code' => 'summer2018sale',
|
245 |
'valid_from' => '2018-07-01 00:00:00',
|
246 |
'valid_to' => '2018-07-31 23:59:59',
|
@@ -388,7 +392,7 @@ class MetaSlider_Notices extends Updraft_Notices_1_0 {
|
|
388 |
* @return array
|
389 |
*/
|
390 |
protected function skip_seasonal_notices($notice_data) {
|
391 |
-
return
|
392 |
}
|
393 |
|
394 |
/**
|
31 |
// To avoid showing the user ads off the start, lets wait
|
32 |
$this->notices_content = ($this->ad_delay_has_finished()) ? $this->ads : array();
|
33 |
$this->plugin = $plugin;
|
34 |
+
|
35 |
+
// If $notices_content is empty, we still want to offer seasonal ads
|
36 |
+
if (empty($this->notices_content) && !$this->is_metasliderpro_installed()) {
|
37 |
+
$this->notices_content = $this->valid_seasonal_notices();
|
38 |
+
}
|
39 |
|
40 |
add_action('admin_enqueue_scripts', array($this, 'add_notice_assets'));
|
41 |
add_action('wp_ajax_notice_handler', array($this, 'ajax_notice_handler'));
|
180 |
}
|
181 |
|
182 |
/**
|
183 |
+
* Seasonal Notices. Note that if dismissed, they will stay dismissed for 9999 weeks
|
184 |
+
* Each year the key and dismiss time should be updated
|
|
|
185 |
* @return string
|
186 |
*/
|
187 |
protected function seasonal_notices() {
|
188 |
return array(
|
189 |
+
'blackfriday2017' => array(
|
190 |
'title' => __('Black Friday - 50% off the MetaSlider Add-on Pack until November 30th', 'ml-slider'),
|
191 |
'text' => __('To benefit, use this discount code:', 'ml-slider').' ',
|
192 |
'image' => 'seasonal/black_friday.png',
|
193 |
'button_link' => apply_filters('metaslider_hoplink', 'https://www.metaslider.com/upgrade') . '?utm_source=metaslider-plugin-page&utm_medium=banner',
|
194 |
'button_meta' => 'ml-slider',
|
195 |
+
'dismiss_time' => 'blackfriday2017',
|
196 |
'discount_code' => 'blackfriday2017sale',
|
197 |
'valid_from' => '2017-11-20 00:00:00',
|
198 |
'valid_to' => '2017-11-30 23:59:59',
|
199 |
'hide_time' => __('until next year', 'ml-slider'),
|
200 |
'supported_positions' => array('header', 'dashboard'),
|
201 |
),
|
202 |
+
'christmas2017' => array(
|
203 |
'title' => __('Christmas sale - 50% off the MetaSlider Add-on Pack until December 25th', 'ml-slider'),
|
204 |
'text' => __('To benefit, use this discount code:', 'ml-slider').' ',
|
205 |
'image' => 'seasonal/christmas.png',
|
206 |
'button_link' => apply_filters('metaslider_hoplink', 'https://www.metaslider.com/upgrade') . '?utm_source=metaslider-plugin-page&utm_medium=banner',
|
207 |
'button_meta' => 'ml-slider',
|
208 |
+
'dismiss_time' => 'christmas2017',
|
209 |
'discount_code' => 'christmas2017sale',
|
210 |
'valid_from' => '2017-12-01 00:00:00',
|
211 |
'valid_to' => '2017-12-25 23:59:59',
|
212 |
'hide_time' => __('until next year', 'ml-slider'),
|
213 |
'supported_positions' => array('header', 'dashboard'),
|
214 |
),
|
215 |
+
'newyear2018' => array(
|
216 |
'title' => __('Happy New Year - 50% off the MetaSlider Add-on Pack until January 1st', 'ml-slider'),
|
217 |
'text' => __('To benefit, use this discount code:', 'ml-slider').' ',
|
218 |
'image' => 'seasonal/new_year.png',
|
219 |
'button_link' => apply_filters('metaslider_hoplink', 'https://www.metaslider.com/upgrade') . '?utm_source=metaslider-plugin-page&utm_medium=banner',
|
220 |
'button_meta' => 'ml-slider',
|
221 |
+
'dismiss_time' => 'newyear2018',
|
222 |
'discount_code' => 'newyear2018sale',
|
223 |
'valid_from' => '2017-12-26 00:00:00',
|
224 |
'valid_to' => '2018-01-14 23:59:59',
|
225 |
'hide_time' => __('until next year', 'ml-slider'),
|
226 |
'supported_positions' => array('header', 'dashboard'),
|
227 |
),
|
228 |
+
'spring2018' => array(
|
229 |
'title' => __('Spring sale - 50% off the MetaSlider Add-on Pack until April 31st', 'ml-slider'),
|
230 |
'text' => __('To benefit, use this discount code:', 'ml-slider').' ',
|
231 |
'image' => 'seasonal/spring.png',
|
232 |
'button_link' => apply_filters('metaslider_hoplink', 'https://www.metaslider.com/upgrade') . '?utm_source=metaslider-plugin-page&utm_medium=banner',
|
233 |
'button_meta' => 'ml-slider',
|
234 |
+
'dismiss_time' => 'spring2018',
|
235 |
'discount_code' => 'spring2018sale',
|
236 |
'valid_from' => '2018-04-01 00:00:00',
|
237 |
'valid_to' => '2018-04-30 23:59:59',
|
238 |
'hide_time' => __('until next year', 'ml-slider'),
|
239 |
'supported_positions' => array('header', 'dashboard'),
|
240 |
),
|
241 |
+
'summer2018' => array(
|
242 |
'title' => __('Summer sale - 50% off the MetaSlider Add-on Pack until July 31st', 'ml-slider'),
|
243 |
'text' => __('To benefit, use this discount code:', 'ml-slider').' ',
|
244 |
'image' => 'seasonal/summer.png',
|
245 |
'button_link' => apply_filters('metaslider_hoplink', 'https://www.metaslider.com/upgrade') . '?utm_source=metaslider-plugin-page&utm_medium=banner',
|
246 |
'button_meta' => 'ml-slider',
|
247 |
+
'dismiss_time' => 'summer2018',
|
248 |
'discount_code' => 'summer2018sale',
|
249 |
'valid_from' => '2018-07-01 00:00:00',
|
250 |
'valid_to' => '2018-07-31 23:59:59',
|
392 |
* @return array
|
393 |
*/
|
394 |
protected function skip_seasonal_notices($notice_data) {
|
395 |
+
return !$this->check_notice_dismissed($notice_data['dismiss_time']);
|
396 |
}
|
397 |
|
398 |
/**
|
admin/assets/css/admin.css
CHANGED
@@ -859,6 +859,10 @@ textarea:-ms-input-placeholder {
|
|
859 |
margin-bottom: 22px;
|
860 |
padding-top: 31px;
|
861 |
}
|
|
|
|
|
|
|
|
|
862 |
.metaslider-ui .metaslider-slides-container .slide > td {
|
863 |
padding: 0;
|
864 |
transition: all .25s ease-in-out;
|
859 |
margin-bottom: 22px;
|
860 |
padding-top: 31px;
|
861 |
}
|
862 |
+
.metaslider-ui .metaslider-slides-container .slide.post_feed .scroll{
|
863 |
+
overflow: auto;
|
864 |
+
height: 100px;
|
865 |
+
}
|
866 |
.metaslider-ui .metaslider-slides-container .slide > td {
|
867 |
padding: 0;
|
868 |
transition: all .25s ease-in-out;
|
assets/sliders/flexslider/jquery.flexslider.js
CHANGED
@@ -145,7 +145,7 @@
|
|
145 |
if (touch && slider.vars.touch) { methods.touch(); }
|
146 |
|
147 |
// FADE&&SMOOTHHEIGHT || SLIDE:
|
148 |
-
if (!fade || (fade && slider.vars.smoothHeight)) { $(window).
|
149 |
|
150 |
slider.find("img").attr("draggable", "false");
|
151 |
|
145 |
if (touch && slider.vars.touch) { methods.touch(); }
|
146 |
|
147 |
// FADE&&SMOOTHHEIGHT || SLIDE:
|
148 |
+
if (!fade || (fade && slider.vars.smoothHeight)) { $(window).on("resize orientationchange focus", methods.resize); }
|
149 |
|
150 |
slider.find("img").attr("draggable", "false");
|
151 |
|
assets/sliders/flexslider/jquery.flexslider.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t=!0;e.flexslider=function(a,n){var i=e(a);i.vars=e.extend({},e.flexslider.defaults,n);var s,r=i.vars.namespace,o=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,l=("ontouchstart"in window||o||window.DocumentTouch&&document instanceof DocumentTouch)&&i.vars.touch,c="click touchend MSPointerUp keyup",d="",u="vertical"===i.vars.direction,v=i.vars.reverse,p=i.vars.itemWidth>0,m="fade"===i.vars.animation,f=""!==i.vars.asNavFor,g={};e.data(a,"flexslider",i),g={init:function(){i.animating=!1,i.currentSlide=parseInt(i.vars.startAt?i.vars.startAt:0,10),isNaN(i.currentSlide)&&(i.currentSlide=0),i.animatingTo=i.currentSlide,i.atEnd=0===i.currentSlide||i.currentSlide===i.last,i.containerSelector=i.vars.selector.substr(0,i.vars.selector.search(" ")),i.slides=e(i.vars.selector,i),i.container=e(i.containerSelector,i),i.count=i.slides.length,i.syncExists=e(i.vars.sync).length>0,"slide"===i.vars.animation&&(i.vars.animation="swing"),i.prop=u?"top":"marginLeft",i.args={},i.manualPause=!1,i.stopped=!1,i.started=!1,i.startTimeout=null,i.transitions=!i.vars.video&&!m&&i.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var a in t)if(void 0!==e.style[t[a]])return i.pfx=t[a].replace("Perspective","").toLowerCase(),i.prop="-"+i.pfx+"-transform",!0;return!1}(),i.ensureAnimationEnd="",""!==i.vars.controlsContainer&&(i.controlsContainer=e(i.vars.controlsContainer).length>0&&e(i.vars.controlsContainer)),""!==i.vars.manualControls&&(i.manualControls=e(i.vars.manualControls).length>0&&e(i.vars.manualControls)),""!==i.vars.customDirectionNav&&(i.customDirectionNav=2===e(i.vars.customDirectionNav).length&&e(i.vars.customDirectionNav)),i.vars.randomize&&(i.slides.sort(function(){return Math.round(Math.random())-.5}),i.container.empty().append(i.slides)),i.doMath(),i.setup("init"),i.vars.controlNav&&g.controlNav.setup(),i.vars.directionNav&&g.directionNav.setup(),i.vars.keyboard&&(1===e(i.containerSelector).length||i.vars.multipleKeyboard)&&e(document).bind("keyup",function(e){var t=e.keyCode;if(!i.animating&&(39===t||37===t)){var a=39===t?i.getTarget("next"):37===t&&i.getTarget("prev");i.flexAnimate(a,i.vars.pauseOnAction)}}),i.vars.mousewheel&&i.bind("mousewheel",function(e,t,a,n){e.preventDefault();var s=t<0?i.getTarget("next"):i.getTarget("prev");i.flexAnimate(s,i.vars.pauseOnAction)}),i.vars.pausePlay&&g.pausePlay.setup(),i.vars.slideshow&&i.vars.pauseInvisible&&g.pauseInvisible.init(),i.vars.slideshow&&(i.vars.pauseOnHover&&i.hover(function(){i.manualPlay||i.manualPause||i.pause()},function(){i.manualPause||i.manualPlay||i.stopped||i.play()}),i.vars.pauseInvisible&&g.pauseInvisible.isHidden()||(i.vars.initDelay>0?i.startTimeout=setTimeout(i.play,i.vars.initDelay):i.play())),f&&g.asNav.setup(),l&&i.vars.touch&&g.touch(),(!m||m&&i.vars.smoothHeight)&&e(window).bind("resize orientationchange focus",g.resize()),i.find("img").attr("draggable","false"),setTimeout(function(){i.vars.start(i)},200)},asNav:{setup:function(){i.asNav=!0,i.animatingTo=Math.floor(i.currentSlide/i.move),i.currentItem=i.currentSlide,i.slides.removeClass(r+"active-slide").eq(i.currentItem).addClass(r+"active-slide"),o?(a._slider=i,i.slides.each(function(){var t=this;t._gesture=new MSGesture,t._gesture.target=t,t.addEventListener("MSPointerDown",function(e){e.preventDefault(),e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1),t.addEventListener("MSGestureTap",function(t){t.preventDefault();var a=e(this),n=a.index();e(i.vars.asNavFor).data("flexslider").animating||a.hasClass("active")||(i.direction=i.currentItem<n?"next":"prev",i.flexAnimate(n,i.vars.pauseOnAction,!1,!0,!0))})})):i.slides.on(c,function(t){t.preventDefault();var a=e(this),n=a.index(),s=a.offset().left-e(i).scrollLeft();s<=0&&a.hasClass(r+"active-slide")?i.flexAnimate(i.getTarget("prev"),!0):e(i.vars.asNavFor).data("flexslider").animating||a.hasClass(r+"active-slide")||(i.direction=i.currentItem<n?"next":"prev",i.flexAnimate(n,i.vars.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){i.manualControls?g.controlNav.setupManual():g.controlNav.setupPaging()},setupPaging:function(){var t,a,n="thumbnails"===i.vars.controlNav?"control-thumbs":"control-paging",s=1;if(i.controlNavScaffold=e('<ol class="'+r+"control-nav "+r+n+'"></ol>'),i.pagingCount>1)for(var o=0;o<i.pagingCount;o++){a=i.slides.eq(o),void 0===a.attr("data-thumb-alt")&&a.attr("data-thumb-alt","");var l=""!==a.attr("data-thumb-alt")?l=' alt="'+a.attr("data-thumb-alt")+'"':"";if(t="thumbnails"===i.vars.controlNav?'<img src="'+a.attr("data-thumb")+'"'+l+"/>":'<a href="#">'+s+"</a>","thumbnails"===i.vars.controlNav&&!0===i.vars.thumbCaptions){var u=a.attr("data-thumbcaption");""!==u&&void 0!==u&&(t+='<span class="'+r+'caption">'+u+"</span>")}i.controlNavScaffold.append("<li>"+t+"</li>"),s++}i.controlsContainer?e(i.controlsContainer).append(i.controlNavScaffold):i.append(i.controlNavScaffold),g.controlNav.set(),g.controlNav.active(),i.controlNavScaffold.delegate("a, img",c,function(t){if(t.preventDefault(),""===d||d===t.type){var a=e(this),n=i.controlNav.index(a);a.hasClass(r+"active")||(i.direction=n>i.currentSlide?"next":"prev",i.flexAnimate(n,i.vars.pauseOnAction))}""===d&&(d=t.type),g.setToClearWatchedEvent()})},setupManual:function(){i.controlNav=i.manualControls,g.controlNav.active(),i.controlNav.bind(c,function(t){if(t.preventDefault(),""===d||d===t.type){var a=e(this),n=i.controlNav.index(a);a.hasClass(r+"active")||(n>i.currentSlide?i.direction="next":i.direction="prev",i.flexAnimate(n,i.vars.pauseOnAction))}""===d&&(d=t.type),g.setToClearWatchedEvent()})},set:function(){var t="thumbnails"===i.vars.controlNav?"img":"a";i.controlNav=e("."+r+"control-nav li "+t,i.controlsContainer?i.controlsContainer:i)},active:function(){i.controlNav.removeClass(r+"active").eq(i.animatingTo).addClass(r+"active")},update:function(t,a){i.pagingCount>1&&"add"===t?i.controlNavScaffold.append(e('<li><a href="#">'+i.count+"</a></li>")):1===i.pagingCount?i.controlNavScaffold.find("li").remove():i.controlNav.eq(a).closest("li").remove(),g.controlNav.set(),i.pagingCount>1&&i.pagingCount!==i.controlNav.length?i.update(a,t):g.controlNav.active()}},directionNav:{setup:function(){var t=e('<ul class="'+r+'direction-nav"><li class="'+r+'nav-prev"><a class="'+r+'prev" href="#">'+i.vars.prevText+'</a></li><li class="'+r+'nav-next"><a class="'+r+'next" href="#">'+i.vars.nextText+"</a></li></ul>");i.customDirectionNav?i.directionNav=i.customDirectionNav:i.controlsContainer?(e(i.controlsContainer).append(t),i.directionNav=e("."+r+"direction-nav li a",i.controlsContainer)):(i.append(t),i.directionNav=e("."+r+"direction-nav li a",i)),g.directionNav.update(),i.directionNav.bind(c,function(t){t.preventDefault();var a;""!==d&&d!==t.type||(a=e(this).hasClass(r+"next")?i.getTarget("next"):i.getTarget("prev"),i.flexAnimate(a,i.vars.pauseOnAction)),""===d&&(d=t.type),g.setToClearWatchedEvent()})},update:function(){var e=r+"disabled";1===i.pagingCount?i.directionNav.addClass(e).attr("tabindex","-1"):i.vars.animationLoop?i.directionNav.removeClass(e).removeAttr("tabindex"):0===i.animatingTo?i.directionNav.removeClass(e).filter("."+r+"prev").addClass(e).attr("tabindex","-1"):i.animatingTo===i.last?i.directionNav.removeClass(e).filter("."+r+"next").addClass(e).attr("tabindex","-1"):i.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var t=e('<div class="'+r+'pauseplay"><a href="#"></a></div>');i.controlsContainer?(i.controlsContainer.append(t),i.pausePlay=e("."+r+"pauseplay a",i.controlsContainer)):(i.append(t),i.pausePlay=e("."+r+"pauseplay a",i)),g.pausePlay.update(i.vars.slideshow?r+"pause":r+"play"),i.pausePlay.bind(c,function(t){t.preventDefault(),""!==d&&d!==t.type||(e(this).hasClass(r+"pause")?(i.manualPause=!0,i.manualPlay=!1,i.pause()):(i.manualPause=!1,i.manualPlay=!0,i.play())),""===d&&(d=t.type),g.setToClearWatchedEvent()})},update:function(e){"play"===e?i.pausePlay.removeClass(r+"pause").addClass(r+"play").html(i.vars.playText):i.pausePlay.removeClass(r+"play").addClass(r+"pause").html(i.vars.pauseText)}},touch:function(){function e(e){e.stopPropagation(),i.animating?e.preventDefault():(i.pause(),a._gesture.addPointer(e.pointerId),w=0,c=u?i.h:i.w,f=Number(new Date),l=p&&v&&i.animatingTo===i.last?0:p&&v?i.limit-(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo:p&&i.currentSlide===i.last?i.limit:p?(i.itemW+i.vars.itemMargin)*i.move*i.currentSlide:v?(i.last-i.currentSlide+i.cloneOffset)*c:(i.currentSlide+i.cloneOffset)*c)}function t(e){e.stopPropagation();var t=e.target._slider;if(t){var n=-e.translationX,i=-e.translationY;return w+=u?i:n,d=w,y=u?Math.abs(w)<Math.abs(-n):Math.abs(w)<Math.abs(-i),e.detail===e.MSGESTURE_FLAG_INERTIA?void setImmediate(function(){a._gesture.stop()}):void((!y||Number(new Date)-f>500)&&(e.preventDefault(),!m&&t.transitions&&(t.vars.animationLoop||(d=w/(0===t.currentSlide&&w<0||t.currentSlide===t.last&&w>0?Math.abs(w)/c+2:1)),t.setProps(l+d,"setTouch"))))}}function n(e){e.stopPropagation();var t=e.target._slider;if(t){if(t.animatingTo===t.currentSlide&&!y&&null!==d){var a=v?-d:d,n=a>0?t.getTarget("next"):t.getTarget("prev");t.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>c/2)?t.flexAnimate(n,t.vars.pauseOnAction):m||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}d&&y?t.vars.slideshow&&t.play():d?!t.vars.pauseOnAction&&t.play()||(t.vars.slideshow=!1):t.vars.slideshow&&!t.vars.pauseOnAction&&t.play()||(t.vars.slideshow=!1),s=null,r=null,d=null,l=null,w=0}}var s,r,l,c,d,f,g,h,S,y=!1,x=0,b=0,w=0;o?(a.style.msTouchAction="none",a._gesture=new MSGesture,a._gesture.target=a,a.addEventListener("MSPointerDown",e,!1),a._slider=i,a.addEventListener("MSGestureChange",t,!1),a.addEventListener("MSGestureEnd",n,!1)):(g=function(e){i.animating?e.preventDefault():(window.navigator.msPointerEnabled||1===e.touches.length)&&(i.pause(),c=u?i.h:i.w,f=Number(new Date),x=e.touches[0].pageX,b=e.touches[0].pageY,l=p&&v&&i.animatingTo===i.last?0:p&&v?i.limit-(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo:p&&i.currentSlide===i.last?i.limit:p?(i.itemW+i.vars.itemMargin)*i.move*i.currentSlide:v?(i.last-i.currentSlide+i.cloneOffset)*c:(i.currentSlide+i.cloneOffset)*c,s=u?b:x,r=u?x:b,a.addEventListener("touchmove",h,!1),a.addEventListener("touchend",S,!1))},h=function(e){x=e.touches[0].pageX,b=e.touches[0].pageY,d=u?s-b:s-x,y=u?Math.abs(d)<Math.abs(x-r):Math.abs(d)<Math.abs(b-r);var t=500;(!y||Number(new Date)-f>t)&&(e.preventDefault(),!m&&i.transitions&&(i.vars.animationLoop||(d/=0===i.currentSlide&&d<0||i.currentSlide===i.last&&d>0?Math.abs(d)/c+2:1),i.setProps(l+d,"setTouch")))},S=function(e){if(a.removeEventListener("touchmove",h,!1),i.animatingTo===i.currentSlide&&!y&&null!==d){var t=v?-d:d,n=t>0?i.getTarget("next"):i.getTarget("prev");i.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(t)>50||Math.abs(t)>c/2)?i.flexAnimate(n,i.vars.pauseOnAction):m||i.flexAnimate(i.currentSlide,i.vars.pauseOnAction,!0)}a.removeEventListener("touchend",S,!1),d&&y?i.vars.slideshow&&i.play():d?!i.vars.pauseOnAction&&i.play()||(i.vars.slideshow=!1):i.vars.slideshow&&!i.vars.pauseOnAction&&i.play()||(i.vars.slideshow=!1),s=null,r=null,d=null,l=null},a.addEventListener("touchstart",g,!1))},resize:function(){!i.animating&&i.is(":visible")&&(p||i.doMath(),m?g.smoothHeight():p?(i.slides.width(i.computedW),i.update(i.pagingCount),i.setProps()):u?(i.viewport.height(i.h),i.setProps(i.h,"setTotal")):(i.vars.smoothHeight&&g.smoothHeight(),i.newSlides.width(i.computedW),i.setProps(i.computedW,"setTotal")))},smoothHeight:function(e){if(!u||m){var t=m?i:i.viewport;e?t.animate({height:i.slides.eq(i.animatingTo).innerHeight()},e):t.innerHeight(i.slides.eq(i.animatingTo).innerHeight())}},sync:function(t){var a=e(i.vars.sync).data("flexslider"),n=i.animatingTo;switch(t){case"animate":a.flexAnimate(n,i.vars.pauseOnAction,!1,!0);break;case"play":a.playing||a.asNav||a.play();break;case"pause":a.pause()}},uniqueID:function(t){return t.filter("[id]").add(t.find("[id]")).each(function(){var t=e(this);t.attr("id",t.attr("id")+"_clone")}),t},pauseInvisible:{visProp:null,init:function(){var e=g.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){g.pauseInvisible.isHidden()?i.startTimeout?clearTimeout(i.startTimeout):i.pause():i.started?i.play():i.vars.initDelay>0?setTimeout(i.play,i.vars.initDelay):i.play()})}},isHidden:function(){var e=g.pauseInvisible.getHiddenProp();return!!e&&document[e]},getHiddenProp:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}},setToClearWatchedEvent:function(){clearTimeout(s),s=setTimeout(function(){d=""},3e3)}},i.flexAnimate=function(t,a,n,s,o){if(i.vars.animationLoop||t===i.currentSlide||(i.direction=t>i.currentSlide?"next":"prev"),f&&1===i.pagingCount&&(i.direction=i.currentItem<t?"next":"prev"),!i.animating&&(i.canAdvance(t,o)||n)&&i.is(":visible")){if(f&&s){var c=e(i.vars.asNavFor).data("flexslider");if(i.atEnd=0===t||t===i.count-1,c.flexAnimate(t,!0,!1,!0,o),i.direction=i.currentItem<t?"next":"prev",c.direction=i.direction,Math.ceil((t+1)/i.visible)-1===i.currentSlide||0===t)return i.currentItem=t,i.slides.removeClass(r+"active-slide").eq(t).addClass(r+"active-slide"),!1;i.currentItem=t,i.slides.removeClass(r+"active-slide").eq(t).addClass(r+"active-slide"),t=Math.floor(t/i.visible)}if(i.animating=!0,i.animatingTo=t,a&&i.pause(),i.vars.before(i),i.syncExists&&!o&&g.sync("animate"),i.vars.controlNav&&g.controlNav.active(),p||i.slides.removeClass(r+"active-slide").eq(t).addClass(r+"active-slide"),i.atEnd=0===t||t===i.last,i.vars.directionNav&&g.directionNav.update(),t===i.last&&(i.vars.end(i),i.vars.animationLoop||i.pause()),m)l?(i.slides.eq(i.currentSlide).css({opacity:0,zIndex:1}),i.slides.eq(t).css({opacity:1,zIndex:2}),i.wrapup(y)):(i.slides.eq(i.currentSlide).css({zIndex:1}).animate({opacity:0},i.vars.animationSpeed,i.vars.easing),i.slides.eq(t).css({zIndex:2}).animate({opacity:1},i.vars.animationSpeed,i.vars.easing,i.wrapup));else{var d,h,S,y=u?i.slides.filter(":first").height():i.computedW;p?(d=i.vars.itemMargin,S=(i.itemW+d)*i.move*i.animatingTo,h=S>i.limit&&1!==i.visible?i.limit:S):h=0===i.currentSlide&&t===i.count-1&&i.vars.animationLoop&&"next"!==i.direction?v?(i.count+i.cloneOffset)*y:0:i.currentSlide===i.last&&0===t&&i.vars.animationLoop&&"prev"!==i.direction?v?0:(i.count+1)*y:v?(i.count-1-t+i.cloneOffset)*y:(t+i.cloneOffset)*y,i.setProps(h,"",i.vars.animationSpeed),i.transitions?(i.vars.animationLoop&&i.atEnd||(i.animating=!1,i.currentSlide=i.animatingTo),i.container.unbind("webkitTransitionEnd transitionend"),i.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(i.ensureAnimationEnd),i.wrapup(y)}),clearTimeout(i.ensureAnimationEnd),i.ensureAnimationEnd=setTimeout(function(){i.wrapup(y)},i.vars.animationSpeed+100)):i.container.animate(i.args,i.vars.animationSpeed,i.vars.easing,function(){i.wrapup(y)})}i.vars.smoothHeight&&g.smoothHeight(i.vars.animationSpeed)}},i.wrapup=function(e){m||p||(0===i.currentSlide&&i.animatingTo===i.last&&i.vars.animationLoop?i.setProps(e,"jumpEnd"):i.currentSlide===i.last&&0===i.animatingTo&&i.vars.animationLoop&&i.setProps(e,"jumpStart")),i.animating=!1,i.currentSlide=i.animatingTo,i.vars.after(i)},i.animateSlides=function(){!i.animating&&t&&i.flexAnimate(i.getTarget("next"))},i.pause=function(){clearInterval(i.animatedSlides),i.animatedSlides=null,i.playing=!1,i.vars.pausePlay&&g.pausePlay.update("play"),i.syncExists&&g.sync("pause")},i.play=function(){i.playing&&clearInterval(i.animatedSlides),i.animatedSlides=i.animatedSlides||setInterval(i.animateSlides,i.vars.slideshowSpeed),i.started=i.playing=!0,i.vars.pausePlay&&g.pausePlay.update("pause"),i.syncExists&&g.sync("play")},i.stop=function(){i.pause(),i.stopped=!0},i.canAdvance=function(e,t){var a=f?i.pagingCount-1:i.last;return!!t||(!(!f||i.currentItem!==i.count-1||0!==e||"prev"!==i.direction)||(!f||0!==i.currentItem||e!==i.pagingCount-1||"next"===i.direction)&&(!(e===i.currentSlide&&!f)&&(!!i.vars.animationLoop||(!i.atEnd||0!==i.currentSlide||e!==a||"next"===i.direction)&&(!i.atEnd||i.currentSlide!==a||0!==e||"next"!==i.direction))))},i.getTarget=function(e){return i.direction=e,"next"===e?i.currentSlide===i.last?0:i.currentSlide+1:0===i.currentSlide?i.last:i.currentSlide-1},i.setProps=function(e,t,a){var n=function(){var a=e?e:(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo,n=function(){if(p)return"setTouch"===t?e:v&&i.animatingTo===i.last?0:v?i.limit-(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo:i.animatingTo===i.last?i.limit:a;switch(t){case"setTotal":return v?(i.count-1-i.currentSlide+i.cloneOffset)*e:(i.currentSlide+i.cloneOffset)*e;case"setTouch":return v?e:e;case"jumpEnd":return v?e:i.count*e;case"jumpStart":return v?i.count*e:e;default:return e}}();return n*-1+"px"}();i.transitions&&(n=u?"translate3d(0,"+n+",0)":"translate3d("+n+",0,0)",a=void 0!==a?a/1e3+"s":"0s",i.container.css("-"+i.pfx+"-transition-duration",a),i.container.css("transition-duration",a)),i.args[i.prop]=n,(i.transitions||void 0===a)&&i.container.css(i.args),i.container.css("transform",n)},i.setup=function(t){if(m)i.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===t&&(l?i.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+i.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(i.currentSlide).css({opacity:1,zIndex:2}):0==i.vars.fadeFirstSlide?i.slides.css({opacity:0,display:"block",zIndex:1}).eq(i.currentSlide).css({zIndex:2}).css({opacity:1}):i.slides.css({opacity:0,display:"block",zIndex:1}).eq(i.currentSlide).css({zIndex:2}).animate({opacity:1},i.vars.animationSpeed,i.vars.easing)),i.vars.smoothHeight&&g.smoothHeight();else{var a,n;"init"===t&&(i.viewport=e('<div class="'+r+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(i).append(i.container),i.cloneCount=0,i.cloneOffset=0,v&&(n=e.makeArray(i.slides).reverse(),i.slides=e(n),i.container.empty().append(i.slides))),i.vars.animationLoop&&!p&&(i.cloneCount=2,i.cloneOffset=1,"init"!==t&&i.container.find(".clone").remove(),i.container.append(g.uniqueID(i.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(g.uniqueID(i.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),i.newSlides=e(i.vars.selector,i),a=v?i.count-1-i.currentSlide+i.cloneOffset:i.currentSlide+i.cloneOffset,u&&!p?(i.container.height(200*(i.count+i.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){i.newSlides.css({display:"block"}),i.doMath(),i.viewport.height(i.h),i.setProps(a*i.h,"init")},"init"===t?100:0)):(i.container.width(200*(i.count+i.cloneCount)+"%"),i.setProps(a*i.computedW,"init"),setTimeout(function(){i.doMath(),i.newSlides.css({width:i.computedW,marginRight:i.computedM,"float":"left",display:"block"}),i.vars.smoothHeight&&g.smoothHeight()},"init"===t?100:0))}p||i.slides.removeClass(r+"active-slide").eq(i.currentSlide).addClass(r+"active-slide"),i.vars.init(i)},i.doMath=function(){var e=i.slides.first(),t=i.vars.itemMargin,a=i.vars.minItems,n=i.vars.maxItems;i.w=void 0===i.viewport?i.width():i.viewport.width(),i.h=e.height(),i.boxPadding=e.outerWidth()-e.width(),p?(i.itemT=i.vars.itemWidth+t,i.itemM=t,i.minW=a?a*i.itemT:i.w,i.maxW=n?n*i.itemT-t:i.w,i.itemW=i.minW>i.w?(i.w-t*(a-1))/a:i.maxW<i.w?(i.w-t*(n-1))/n:i.vars.itemWidth>i.w?i.w:i.vars.itemWidth,i.visible=Math.floor(i.w/i.itemW),i.move=i.vars.move>0&&i.vars.move<i.visible?i.vars.move:i.visible,i.pagingCount=Math.ceil((i.count-i.visible)/i.move+1),i.last=i.pagingCount-1,i.limit=1===i.pagingCount?0:i.vars.itemWidth>i.w?i.itemW*(i.count-1)+t*(i.count-1):(i.itemW+t)*i.count-i.w-t):(i.itemW=i.w,i.itemM=t,i.pagingCount=i.count,i.last=i.count-1),i.computedW=i.itemW-i.boxPadding,i.computedM=i.itemM},i.update=function(e,t){i.doMath(),p||(e<i.currentSlide?i.currentSlide+=1:e<=i.currentSlide&&0!==e&&(i.currentSlide-=1),i.animatingTo=i.currentSlide),i.vars.controlNav&&!i.manualControls&&("add"===t&&!p||i.pagingCount>i.controlNav.length?g.controlNav.update("add"):("remove"===t&&!p||i.pagingCount<i.controlNav.length)&&(p&&i.currentSlide>i.last&&(i.currentSlide-=1,i.animatingTo-=1),g.controlNav.update("remove",i.last))),i.vars.directionNav&&g.directionNav.update()},i.addSlide=function(t,a){var n=e(t);i.count+=1,i.last=i.count-1,u&&v?void 0!==a?i.slides.eq(i.count-a).after(n):i.container.prepend(n):void 0!==a?i.slides.eq(a).before(n):i.container.append(n),i.update(a,"add"),i.slides=e(i.vars.selector+":not(.clone)",i),i.setup(),i.vars.added(i)},i.removeSlide=function(t){var a=isNaN(t)?i.slides.index(e(t)):t;i.count-=1,i.last=i.count-1,isNaN(t)?e(t,i.slides).remove():u&&v?i.slides.eq(i.last).remove():i.slides.eq(t).remove(),i.doMath(),i.update(a,"remove"),i.slides=e(i.vars.selector+":not(.clone)",i),i.setup(),i.vars.removed(i)},g.init()},e(window).blur(function(e){t=!1}).focus(function(e){t=!0}),e.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}},e.fn.flexslider=function(t){if(void 0===t&&(t={}),"object"==typeof t)return this.each(function(){var a=e(this),n=t.selector?t.selector:".slides > li",i=a.find(n);1===i.length&&t.allowOneSlide===!1||0===i.length?(i.fadeIn(400),t.start&&t.start(a)):void 0===a.data("flexslider")&&new e.flexslider(this,t)});var a=e(this).data("flexslider");switch(t){case"play":a.play();break;case"pause":a.pause();break;case"stop":a.stop();break;case"next":a.flexAnimate(a.getTarget("next"),!0);break;case"prev":case"previous":a.flexAnimate(a.getTarget("prev"),!0);break;default:"number"==typeof t&&a.flexAnimate(t,!0)}}}(jQuery);
|
1 |
+
!function(e){var t=!0;e.flexslider=function(a,n){var i=e(a);i.vars=e.extend({},e.flexslider.defaults,n);var s,r=i.vars.namespace,o=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,l=("ontouchstart"in window||o||window.DocumentTouch&&document instanceof DocumentTouch)&&i.vars.touch,c="click touchend MSPointerUp keyup",d="",u="vertical"===i.vars.direction,v=i.vars.reverse,p=i.vars.itemWidth>0,m="fade"===i.vars.animation,f=""!==i.vars.asNavFor,g={};e.data(a,"flexslider",i),g={init:function(){i.animating=!1,i.currentSlide=parseInt(i.vars.startAt?i.vars.startAt:0,10),isNaN(i.currentSlide)&&(i.currentSlide=0),i.animatingTo=i.currentSlide,i.atEnd=0===i.currentSlide||i.currentSlide===i.last,i.containerSelector=i.vars.selector.substr(0,i.vars.selector.search(" ")),i.slides=e(i.vars.selector,i),i.container=e(i.containerSelector,i),i.count=i.slides.length,i.syncExists=e(i.vars.sync).length>0,"slide"===i.vars.animation&&(i.vars.animation="swing"),i.prop=u?"top":"marginLeft",i.args={},i.manualPause=!1,i.stopped=!1,i.started=!1,i.startTimeout=null,i.transitions=!i.vars.video&&!m&&i.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var a in t)if(void 0!==e.style[t[a]])return i.pfx=t[a].replace("Perspective","").toLowerCase(),i.prop="-"+i.pfx+"-transform",!0;return!1}(),i.ensureAnimationEnd="",""!==i.vars.controlsContainer&&(i.controlsContainer=e(i.vars.controlsContainer).length>0&&e(i.vars.controlsContainer)),""!==i.vars.manualControls&&(i.manualControls=e(i.vars.manualControls).length>0&&e(i.vars.manualControls)),""!==i.vars.customDirectionNav&&(i.customDirectionNav=2===e(i.vars.customDirectionNav).length&&e(i.vars.customDirectionNav)),i.vars.randomize&&(i.slides.sort(function(){return Math.round(Math.random())-.5}),i.container.empty().append(i.slides)),i.doMath(),i.setup("init"),i.vars.controlNav&&g.controlNav.setup(),i.vars.directionNav&&g.directionNav.setup(),i.vars.keyboard&&(1===e(i.containerSelector).length||i.vars.multipleKeyboard)&&e(document).bind("keyup",function(e){var t=e.keyCode;if(!i.animating&&(39===t||37===t)){var a=39===t?i.getTarget("next"):37===t&&i.getTarget("prev");i.flexAnimate(a,i.vars.pauseOnAction)}}),i.vars.mousewheel&&i.bind("mousewheel",function(e,t,a,n){e.preventDefault();var s=t<0?i.getTarget("next"):i.getTarget("prev");i.flexAnimate(s,i.vars.pauseOnAction)}),i.vars.pausePlay&&g.pausePlay.setup(),i.vars.slideshow&&i.vars.pauseInvisible&&g.pauseInvisible.init(),i.vars.slideshow&&(i.vars.pauseOnHover&&i.hover(function(){i.manualPlay||i.manualPause||i.pause()},function(){i.manualPause||i.manualPlay||i.stopped||i.play()}),i.vars.pauseInvisible&&g.pauseInvisible.isHidden()||(i.vars.initDelay>0?i.startTimeout=setTimeout(i.play,i.vars.initDelay):i.play())),f&&g.asNav.setup(),l&&i.vars.touch&&g.touch(),(!m||m&&i.vars.smoothHeight)&&e(window).on("resize orientationchange focus",g.resize),i.find("img").attr("draggable","false"),setTimeout(function(){i.vars.start(i)},200)},asNav:{setup:function(){i.asNav=!0,i.animatingTo=Math.floor(i.currentSlide/i.move),i.currentItem=i.currentSlide,i.slides.removeClass(r+"active-slide").eq(i.currentItem).addClass(r+"active-slide"),o?(a._slider=i,i.slides.each(function(){var t=this;t._gesture=new MSGesture,t._gesture.target=t,t.addEventListener("MSPointerDown",function(e){e.preventDefault(),e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1),t.addEventListener("MSGestureTap",function(t){t.preventDefault();var a=e(this),n=a.index();e(i.vars.asNavFor).data("flexslider").animating||a.hasClass("active")||(i.direction=i.currentItem<n?"next":"prev",i.flexAnimate(n,i.vars.pauseOnAction,!1,!0,!0))})})):i.slides.on(c,function(t){t.preventDefault();var a=e(this),n=a.index(),s=a.offset().left-e(i).scrollLeft();s<=0&&a.hasClass(r+"active-slide")?i.flexAnimate(i.getTarget("prev"),!0):e(i.vars.asNavFor).data("flexslider").animating||a.hasClass(r+"active-slide")||(i.direction=i.currentItem<n?"next":"prev",i.flexAnimate(n,i.vars.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){i.manualControls?g.controlNav.setupManual():g.controlNav.setupPaging()},setupPaging:function(){var t,a,n="thumbnails"===i.vars.controlNav?"control-thumbs":"control-paging",s=1;if(i.controlNavScaffold=e('<ol class="'+r+"control-nav "+r+n+'"></ol>'),i.pagingCount>1)for(var o=0;o<i.pagingCount;o++){a=i.slides.eq(o),void 0===a.attr("data-thumb-alt")&&a.attr("data-thumb-alt","");var l=""!==a.attr("data-thumb-alt")?l=' alt="'+a.attr("data-thumb-alt")+'"':"";if(t="thumbnails"===i.vars.controlNav?'<img src="'+a.attr("data-thumb")+'"'+l+"/>":'<a href="#">'+s+"</a>","thumbnails"===i.vars.controlNav&&!0===i.vars.thumbCaptions){var u=a.attr("data-thumbcaption");""!==u&&void 0!==u&&(t+='<span class="'+r+'caption">'+u+"</span>")}i.controlNavScaffold.append("<li>"+t+"</li>"),s++}i.controlsContainer?e(i.controlsContainer).append(i.controlNavScaffold):i.append(i.controlNavScaffold),g.controlNav.set(),g.controlNav.active(),i.controlNavScaffold.delegate("a, img",c,function(t){if(t.preventDefault(),""===d||d===t.type){var a=e(this),n=i.controlNav.index(a);a.hasClass(r+"active")||(i.direction=n>i.currentSlide?"next":"prev",i.flexAnimate(n,i.vars.pauseOnAction))}""===d&&(d=t.type),g.setToClearWatchedEvent()})},setupManual:function(){i.controlNav=i.manualControls,g.controlNav.active(),i.controlNav.bind(c,function(t){if(t.preventDefault(),""===d||d===t.type){var a=e(this),n=i.controlNav.index(a);a.hasClass(r+"active")||(n>i.currentSlide?i.direction="next":i.direction="prev",i.flexAnimate(n,i.vars.pauseOnAction))}""===d&&(d=t.type),g.setToClearWatchedEvent()})},set:function(){var t="thumbnails"===i.vars.controlNav?"img":"a";i.controlNav=e("."+r+"control-nav li "+t,i.controlsContainer?i.controlsContainer:i)},active:function(){i.controlNav.removeClass(r+"active").eq(i.animatingTo).addClass(r+"active")},update:function(t,a){i.pagingCount>1&&"add"===t?i.controlNavScaffold.append(e('<li><a href="#">'+i.count+"</a></li>")):1===i.pagingCount?i.controlNavScaffold.find("li").remove():i.controlNav.eq(a).closest("li").remove(),g.controlNav.set(),i.pagingCount>1&&i.pagingCount!==i.controlNav.length?i.update(a,t):g.controlNav.active()}},directionNav:{setup:function(){var t=e('<ul class="'+r+'direction-nav"><li class="'+r+'nav-prev"><a class="'+r+'prev" href="#">'+i.vars.prevText+'</a></li><li class="'+r+'nav-next"><a class="'+r+'next" href="#">'+i.vars.nextText+"</a></li></ul>");i.customDirectionNav?i.directionNav=i.customDirectionNav:i.controlsContainer?(e(i.controlsContainer).append(t),i.directionNav=e("."+r+"direction-nav li a",i.controlsContainer)):(i.append(t),i.directionNav=e("."+r+"direction-nav li a",i)),g.directionNav.update(),i.directionNav.bind(c,function(t){t.preventDefault();var a;""!==d&&d!==t.type||(a=e(this).hasClass(r+"next")?i.getTarget("next"):i.getTarget("prev"),i.flexAnimate(a,i.vars.pauseOnAction)),""===d&&(d=t.type),g.setToClearWatchedEvent()})},update:function(){var e=r+"disabled";1===i.pagingCount?i.directionNav.addClass(e).attr("tabindex","-1"):i.vars.animationLoop?i.directionNav.removeClass(e).removeAttr("tabindex"):0===i.animatingTo?i.directionNav.removeClass(e).filter("."+r+"prev").addClass(e).attr("tabindex","-1"):i.animatingTo===i.last?i.directionNav.removeClass(e).filter("."+r+"next").addClass(e).attr("tabindex","-1"):i.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var t=e('<div class="'+r+'pauseplay"><a href="#"></a></div>');i.controlsContainer?(i.controlsContainer.append(t),i.pausePlay=e("."+r+"pauseplay a",i.controlsContainer)):(i.append(t),i.pausePlay=e("."+r+"pauseplay a",i)),g.pausePlay.update(i.vars.slideshow?r+"pause":r+"play"),i.pausePlay.bind(c,function(t){t.preventDefault(),""!==d&&d!==t.type||(e(this).hasClass(r+"pause")?(i.manualPause=!0,i.manualPlay=!1,i.pause()):(i.manualPause=!1,i.manualPlay=!0,i.play())),""===d&&(d=t.type),g.setToClearWatchedEvent()})},update:function(e){"play"===e?i.pausePlay.removeClass(r+"pause").addClass(r+"play").html(i.vars.playText):i.pausePlay.removeClass(r+"play").addClass(r+"pause").html(i.vars.pauseText)}},touch:function(){function e(e){e.stopPropagation(),i.animating?e.preventDefault():(i.pause(),a._gesture.addPointer(e.pointerId),w=0,c=u?i.h:i.w,f=Number(new Date),l=p&&v&&i.animatingTo===i.last?0:p&&v?i.limit-(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo:p&&i.currentSlide===i.last?i.limit:p?(i.itemW+i.vars.itemMargin)*i.move*i.currentSlide:v?(i.last-i.currentSlide+i.cloneOffset)*c:(i.currentSlide+i.cloneOffset)*c)}function t(e){e.stopPropagation();var t=e.target._slider;if(t){var n=-e.translationX,i=-e.translationY;return w+=u?i:n,d=w,y=u?Math.abs(w)<Math.abs(-n):Math.abs(w)<Math.abs(-i),e.detail===e.MSGESTURE_FLAG_INERTIA?void setImmediate(function(){a._gesture.stop()}):void((!y||Number(new Date)-f>500)&&(e.preventDefault(),!m&&t.transitions&&(t.vars.animationLoop||(d=w/(0===t.currentSlide&&w<0||t.currentSlide===t.last&&w>0?Math.abs(w)/c+2:1)),t.setProps(l+d,"setTouch"))))}}function n(e){e.stopPropagation();var t=e.target._slider;if(t){if(t.animatingTo===t.currentSlide&&!y&&null!==d){var a=v?-d:d,n=a>0?t.getTarget("next"):t.getTarget("prev");t.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>c/2)?t.flexAnimate(n,t.vars.pauseOnAction):m||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}d&&y?t.vars.slideshow&&t.play():d?!t.vars.pauseOnAction&&t.play()||(t.vars.slideshow=!1):t.vars.slideshow&&!t.vars.pauseOnAction&&t.play()||(t.vars.slideshow=!1),s=null,r=null,d=null,l=null,w=0}}var s,r,l,c,d,f,g,h,S,y=!1,x=0,b=0,w=0;o?(a.style.msTouchAction="none",a._gesture=new MSGesture,a._gesture.target=a,a.addEventListener("MSPointerDown",e,!1),a._slider=i,a.addEventListener("MSGestureChange",t,!1),a.addEventListener("MSGestureEnd",n,!1)):(g=function(e){i.animating?e.preventDefault():(window.navigator.msPointerEnabled||1===e.touches.length)&&(i.pause(),c=u?i.h:i.w,f=Number(new Date),x=e.touches[0].pageX,b=e.touches[0].pageY,l=p&&v&&i.animatingTo===i.last?0:p&&v?i.limit-(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo:p&&i.currentSlide===i.last?i.limit:p?(i.itemW+i.vars.itemMargin)*i.move*i.currentSlide:v?(i.last-i.currentSlide+i.cloneOffset)*c:(i.currentSlide+i.cloneOffset)*c,s=u?b:x,r=u?x:b,a.addEventListener("touchmove",h,!1),a.addEventListener("touchend",S,!1))},h=function(e){x=e.touches[0].pageX,b=e.touches[0].pageY,d=u?s-b:s-x,y=u?Math.abs(d)<Math.abs(x-r):Math.abs(d)<Math.abs(b-r);var t=500;(!y||Number(new Date)-f>t)&&(e.preventDefault(),!m&&i.transitions&&(i.vars.animationLoop||(d/=0===i.currentSlide&&d<0||i.currentSlide===i.last&&d>0?Math.abs(d)/c+2:1),i.setProps(l+d,"setTouch")))},S=function(e){if(a.removeEventListener("touchmove",h,!1),i.animatingTo===i.currentSlide&&!y&&null!==d){var t=v?-d:d,n=t>0?i.getTarget("next"):i.getTarget("prev");i.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(t)>50||Math.abs(t)>c/2)?i.flexAnimate(n,i.vars.pauseOnAction):m||i.flexAnimate(i.currentSlide,i.vars.pauseOnAction,!0)}a.removeEventListener("touchend",S,!1),d&&y?i.vars.slideshow&&i.play():d?!i.vars.pauseOnAction&&i.play()||(i.vars.slideshow=!1):i.vars.slideshow&&!i.vars.pauseOnAction&&i.play()||(i.vars.slideshow=!1),s=null,r=null,d=null,l=null},a.addEventListener("touchstart",g,!1))},resize:function(){!i.animating&&i.is(":visible")&&(p||i.doMath(),m?g.smoothHeight():p?(i.slides.width(i.computedW),i.update(i.pagingCount),i.setProps()):u?(i.viewport.height(i.h),i.setProps(i.h,"setTotal")):(i.vars.smoothHeight&&g.smoothHeight(),i.newSlides.width(i.computedW),i.setProps(i.computedW,"setTotal")))},smoothHeight:function(e){if(!u||m){var t=m?i:i.viewport;e?t.animate({height:i.slides.eq(i.animatingTo).innerHeight()},e):t.innerHeight(i.slides.eq(i.animatingTo).innerHeight())}},sync:function(t){var a=e(i.vars.sync).data("flexslider"),n=i.animatingTo;switch(t){case"animate":a.flexAnimate(n,i.vars.pauseOnAction,!1,!0);break;case"play":a.playing||a.asNav||a.play();break;case"pause":a.pause()}},uniqueID:function(t){return t.filter("[id]").add(t.find("[id]")).each(function(){var t=e(this);t.attr("id",t.attr("id")+"_clone")}),t},pauseInvisible:{visProp:null,init:function(){var e=g.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){g.pauseInvisible.isHidden()?i.startTimeout?clearTimeout(i.startTimeout):i.pause():i.started?i.play():i.vars.initDelay>0?setTimeout(i.play,i.vars.initDelay):i.play()})}},isHidden:function(){var e=g.pauseInvisible.getHiddenProp();return!!e&&document[e]},getHiddenProp:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}},setToClearWatchedEvent:function(){clearTimeout(s),s=setTimeout(function(){d=""},3e3)}},i.flexAnimate=function(t,a,n,s,o){if(i.vars.animationLoop||t===i.currentSlide||(i.direction=t>i.currentSlide?"next":"prev"),f&&1===i.pagingCount&&(i.direction=i.currentItem<t?"next":"prev"),!i.animating&&(i.canAdvance(t,o)||n)&&i.is(":visible")){if(f&&s){var c=e(i.vars.asNavFor).data("flexslider");if(i.atEnd=0===t||t===i.count-1,c.flexAnimate(t,!0,!1,!0,o),i.direction=i.currentItem<t?"next":"prev",c.direction=i.direction,Math.ceil((t+1)/i.visible)-1===i.currentSlide||0===t)return i.currentItem=t,i.slides.removeClass(r+"active-slide").eq(t).addClass(r+"active-slide"),!1;i.currentItem=t,i.slides.removeClass(r+"active-slide").eq(t).addClass(r+"active-slide"),t=Math.floor(t/i.visible)}if(i.animating=!0,i.animatingTo=t,a&&i.pause(),i.vars.before(i),i.syncExists&&!o&&g.sync("animate"),i.vars.controlNav&&g.controlNav.active(),p||i.slides.removeClass(r+"active-slide").eq(t).addClass(r+"active-slide"),i.atEnd=0===t||t===i.last,i.vars.directionNav&&g.directionNav.update(),t===i.last&&(i.vars.end(i),i.vars.animationLoop||i.pause()),m)l?(i.slides.eq(i.currentSlide).css({opacity:0,zIndex:1}),i.slides.eq(t).css({opacity:1,zIndex:2}),i.wrapup(y)):(i.slides.eq(i.currentSlide).css({zIndex:1}).animate({opacity:0},i.vars.animationSpeed,i.vars.easing),i.slides.eq(t).css({zIndex:2}).animate({opacity:1},i.vars.animationSpeed,i.vars.easing,i.wrapup));else{var d,h,S,y=u?i.slides.filter(":first").height():i.computedW;p?(d=i.vars.itemMargin,S=(i.itemW+d)*i.move*i.animatingTo,h=S>i.limit&&1!==i.visible?i.limit:S):h=0===i.currentSlide&&t===i.count-1&&i.vars.animationLoop&&"next"!==i.direction?v?(i.count+i.cloneOffset)*y:0:i.currentSlide===i.last&&0===t&&i.vars.animationLoop&&"prev"!==i.direction?v?0:(i.count+1)*y:v?(i.count-1-t+i.cloneOffset)*y:(t+i.cloneOffset)*y,i.setProps(h,"",i.vars.animationSpeed),i.transitions?(i.vars.animationLoop&&i.atEnd||(i.animating=!1,i.currentSlide=i.animatingTo),i.container.unbind("webkitTransitionEnd transitionend"),i.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(i.ensureAnimationEnd),i.wrapup(y)}),clearTimeout(i.ensureAnimationEnd),i.ensureAnimationEnd=setTimeout(function(){i.wrapup(y)},i.vars.animationSpeed+100)):i.container.animate(i.args,i.vars.animationSpeed,i.vars.easing,function(){i.wrapup(y)})}i.vars.smoothHeight&&g.smoothHeight(i.vars.animationSpeed)}},i.wrapup=function(e){m||p||(0===i.currentSlide&&i.animatingTo===i.last&&i.vars.animationLoop?i.setProps(e,"jumpEnd"):i.currentSlide===i.last&&0===i.animatingTo&&i.vars.animationLoop&&i.setProps(e,"jumpStart")),i.animating=!1,i.currentSlide=i.animatingTo,i.vars.after(i)},i.animateSlides=function(){!i.animating&&t&&i.flexAnimate(i.getTarget("next"))},i.pause=function(){clearInterval(i.animatedSlides),i.animatedSlides=null,i.playing=!1,i.vars.pausePlay&&g.pausePlay.update("play"),i.syncExists&&g.sync("pause")},i.play=function(){i.playing&&clearInterval(i.animatedSlides),i.animatedSlides=i.animatedSlides||setInterval(i.animateSlides,i.vars.slideshowSpeed),i.started=i.playing=!0,i.vars.pausePlay&&g.pausePlay.update("pause"),i.syncExists&&g.sync("play")},i.stop=function(){i.pause(),i.stopped=!0},i.canAdvance=function(e,t){var a=f?i.pagingCount-1:i.last;return!!t||(!(!f||i.currentItem!==i.count-1||0!==e||"prev"!==i.direction)||(!f||0!==i.currentItem||e!==i.pagingCount-1||"next"===i.direction)&&(!(e===i.currentSlide&&!f)&&(!!i.vars.animationLoop||(!i.atEnd||0!==i.currentSlide||e!==a||"next"===i.direction)&&(!i.atEnd||i.currentSlide!==a||0!==e||"next"!==i.direction))))},i.getTarget=function(e){return i.direction=e,"next"===e?i.currentSlide===i.last?0:i.currentSlide+1:0===i.currentSlide?i.last:i.currentSlide-1},i.setProps=function(e,t,a){var n=function(){var a=e?e:(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo,n=function(){if(p)return"setTouch"===t?e:v&&i.animatingTo===i.last?0:v?i.limit-(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo:i.animatingTo===i.last?i.limit:a;switch(t){case"setTotal":return v?(i.count-1-i.currentSlide+i.cloneOffset)*e:(i.currentSlide+i.cloneOffset)*e;case"setTouch":return v?e:e;case"jumpEnd":return v?e:i.count*e;case"jumpStart":return v?i.count*e:e;default:return e}}();return n*-1+"px"}();i.transitions&&(n=u?"translate3d(0,"+n+",0)":"translate3d("+n+",0,0)",a=void 0!==a?a/1e3+"s":"0s",i.container.css("-"+i.pfx+"-transition-duration",a),i.container.css("transition-duration",a)),i.args[i.prop]=n,(i.transitions||void 0===a)&&i.container.css(i.args),i.container.css("transform",n)},i.setup=function(t){if(m)i.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===t&&(l?i.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+i.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(i.currentSlide).css({opacity:1,zIndex:2}):0==i.vars.fadeFirstSlide?i.slides.css({opacity:0,display:"block",zIndex:1}).eq(i.currentSlide).css({zIndex:2}).css({opacity:1}):i.slides.css({opacity:0,display:"block",zIndex:1}).eq(i.currentSlide).css({zIndex:2}).animate({opacity:1},i.vars.animationSpeed,i.vars.easing)),i.vars.smoothHeight&&g.smoothHeight();else{var a,n;"init"===t&&(i.viewport=e('<div class="'+r+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(i).append(i.container),i.cloneCount=0,i.cloneOffset=0,v&&(n=e.makeArray(i.slides).reverse(),i.slides=e(n),i.container.empty().append(i.slides))),i.vars.animationLoop&&!p&&(i.cloneCount=2,i.cloneOffset=1,"init"!==t&&i.container.find(".clone").remove(),i.container.append(g.uniqueID(i.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(g.uniqueID(i.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),i.newSlides=e(i.vars.selector,i),a=v?i.count-1-i.currentSlide+i.cloneOffset:i.currentSlide+i.cloneOffset,u&&!p?(i.container.height(200*(i.count+i.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){i.newSlides.css({display:"block"}),i.doMath(),i.viewport.height(i.h),i.setProps(a*i.h,"init")},"init"===t?100:0)):(i.container.width(200*(i.count+i.cloneCount)+"%"),i.setProps(a*i.computedW,"init"),setTimeout(function(){i.doMath(),i.newSlides.css({width:i.computedW,marginRight:i.computedM,"float":"left",display:"block"}),i.vars.smoothHeight&&g.smoothHeight()},"init"===t?100:0))}p||i.slides.removeClass(r+"active-slide").eq(i.currentSlide).addClass(r+"active-slide"),i.vars.init(i)},i.doMath=function(){var e=i.slides.first(),t=i.vars.itemMargin,a=i.vars.minItems,n=i.vars.maxItems;i.w=void 0===i.viewport?i.width():i.viewport.width(),i.h=e.height(),i.boxPadding=e.outerWidth()-e.width(),p?(i.itemT=i.vars.itemWidth+t,i.itemM=t,i.minW=a?a*i.itemT:i.w,i.maxW=n?n*i.itemT-t:i.w,i.itemW=i.minW>i.w?(i.w-t*(a-1))/a:i.maxW<i.w?(i.w-t*(n-1))/n:i.vars.itemWidth>i.w?i.w:i.vars.itemWidth,i.visible=Math.floor(i.w/i.itemW),i.move=i.vars.move>0&&i.vars.move<i.visible?i.vars.move:i.visible,i.pagingCount=Math.ceil((i.count-i.visible)/i.move+1),i.last=i.pagingCount-1,i.limit=1===i.pagingCount?0:i.vars.itemWidth>i.w?i.itemW*(i.count-1)+t*(i.count-1):(i.itemW+t)*i.count-i.w-t):(i.itemW=i.w,i.itemM=t,i.pagingCount=i.count,i.last=i.count-1),i.computedW=i.itemW-i.boxPadding,i.computedM=i.itemM},i.update=function(e,t){i.doMath(),p||(e<i.currentSlide?i.currentSlide+=1:e<=i.currentSlide&&0!==e&&(i.currentSlide-=1),i.animatingTo=i.currentSlide),i.vars.controlNav&&!i.manualControls&&("add"===t&&!p||i.pagingCount>i.controlNav.length?g.controlNav.update("add"):("remove"===t&&!p||i.pagingCount<i.controlNav.length)&&(p&&i.currentSlide>i.last&&(i.currentSlide-=1,i.animatingTo-=1),g.controlNav.update("remove",i.last))),i.vars.directionNav&&g.directionNav.update()},i.addSlide=function(t,a){var n=e(t);i.count+=1,i.last=i.count-1,u&&v?void 0!==a?i.slides.eq(i.count-a).after(n):i.container.prepend(n):void 0!==a?i.slides.eq(a).before(n):i.container.append(n),i.update(a,"add"),i.slides=e(i.vars.selector+":not(.clone)",i),i.setup(),i.vars.added(i)},i.removeSlide=function(t){var a=isNaN(t)?i.slides.index(e(t)):t;i.count-=1,i.last=i.count-1,isNaN(t)?e(t,i.slides).remove():u&&v?i.slides.eq(i.last).remove():i.slides.eq(t).remove(),i.doMath(),i.update(a,"remove"),i.slides=e(i.vars.selector+":not(.clone)",i),i.setup(),i.vars.removed(i)},g.init()},e(window).blur(function(e){t=!1}).focus(function(e){t=!0}),e.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}},e.fn.flexslider=function(t){if(void 0===t&&(t={}),"object"==typeof t)return this.each(function(){var a=e(this),n=t.selector?t.selector:".slides > li",i=a.find(n);1===i.length&&t.allowOneSlide===!1||0===i.length?(i.fadeIn(400),t.start&&t.start(a)):void 0===a.data("flexslider")&&new e.flexslider(this,t)});var a=e(this).data("flexslider");switch(t){case"play":a.play();break;case"pause":a.pause();break;case"stop":a.stop();break;case"next":a.flexAnimate(a.getTarget("next"),!0);break;case"prev":case"previous":a.flexAnimate(a.getTarget("prev"),!0);break;default:"number"==typeof t&&a.flexAnimate(t,!0)}}}(jQuery);
|
languages/ml-slider.pot
CHANGED
@@ -17,207 +17,207 @@ msgstr ""
|
|
17 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
18 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19 |
|
20 |
-
#: src/admin/Notices.php:
|
21 |
msgid "Always backup WordPress to avoid losing your site!"
|
22 |
msgstr ""
|
23 |
|
24 |
-
#: src/admin/Notices.php:
|
25 |
msgid "UpdraftPlus is the world's #1 backup plugin from the makers of MetaSlider. Backup to the cloud, on a schedule and restore with 1 click!"
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: src/admin/Notices.php:
|
29 |
msgid "Keyy: Instant and secure logon with a wave of your phone"
|
30 |
msgstr ""
|
31 |
|
32 |
-
#: src/admin/Notices.php:
|
33 |
msgid "No more forgotten passwords. Find out more about our revolutionary new WordPress plugin"
|
34 |
msgstr ""
|
35 |
|
36 |
-
#: src/admin/Notices.php:
|
37 |
msgid "Save Time and Money. Manage multiple WordPress sites from one location."
|
38 |
msgstr ""
|
39 |
|
40 |
-
#: src/admin/Notices.php:
|
41 |
msgid "UpdraftCentral is a highly efficient way to take backup, update and manage multiple WP sites from one location"
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: src/admin/Notices.php:
|
45 |
msgid "Like MetaSlider and have a minute to spare?"
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: src/admin/Notices.php:
|
49 |
msgid "Please help MetaSlider by giving a positive review at wordpress.org."
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: src/admin/Notices.php:
|
53 |
msgid "Help us to get even better MetaSlider"
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: src/admin/Notices.php:
|
57 |
msgid "Let us know how you use MetaSlider by answering 4 simple questions. We will make MetaSlider to suit you better."
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: src/admin/Notices.php:
|
61 |
msgid "Spice up your site with animated layers and video slides"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: src/admin/Notices.php:
|
65 |
msgid "With the MetaSlider Add-on pack you can give your slideshows a professional look!"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: src/admin/Notices.php:
|
69 |
msgid "Increase your revenue and conversion with video slides and many more features"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: src/admin/Notices.php:
|
73 |
msgid "Upgrade today to benefit from many more premium features. Find out more."
|
74 |
msgstr ""
|
75 |
|
76 |
-
#: src/admin/Notices.php:
|
77 |
msgid "Can you translate? Want to improve MetaSlider for speakers of your language?"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: src/admin/Notices.php:
|
81 |
msgid "Please go here for instructions - it is easy."
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: src/admin/Notices.php:
|
85 |
msgid "Thank you for installing MetaSlider"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: src/admin/Notices.php:
|
89 |
msgid "Supercharge & secure your WordPress site with our other top plugins:"
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: src/admin/Notices.php:
|
93 |
msgid "We’re making changes and need your help."
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: src/admin/Notices.php:
|
97 |
msgid "If you could spare a minute, we would like to ask you 4 easy questions about how you use MetaSlider. Your voice is important to us!"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: src/admin/Notices.php:
|
101 |
msgid "forever"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: src/admin/Notices.php:
|
105 |
msgid "Black Friday - 50% off the MetaSlider Add-on Pack until November 30th"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: src/admin/Notices.php:
|
109 |
msgid "To benefit, use this discount code:"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: src/admin/Notices.php:
|
113 |
msgid "until next year"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: src/admin/Notices.php:
|
117 |
msgid "Christmas sale - 50% off the MetaSlider Add-on Pack until December 25th"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: src/admin/Notices.php:
|
121 |
msgid "Happy New Year - 50% off the MetaSlider Add-on Pack until January 1st"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: src/admin/Notices.php:
|
125 |
msgid "Spring sale - 50% off the MetaSlider Add-on Pack until April 31st"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: src/admin/Notices.php:
|
129 |
msgid "Summer sale - 50% off the MetaSlider Add-on Pack until July 31st"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: src/admin/Notices.php:
|
133 |
msgid "Increase your conversion rate with video slides and many more options."
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: src/admin/Notices.php:
|
137 |
msgid "offers unparalleled choice and flexibility, allowing you to select one or a combination of over a dozen optimization options."
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: src/admin/Notices.php:
|
141 |
msgid "provides personal support, the ability to copy sites, more storage destinations, encrypted backups for security, multiple backup destinations, better reporting, no adverts and plenty more."
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: src/admin/Notices.php:
|
145 |
msgid "simplifies backups and restoration. It is the world's highest ranking and most popular scheduled backup plugin, with over a million currently-active installs."
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: src/admin/Notices.php:
|
149 |
msgid "auto-clean your WordPress database so that it runs at maximum efficiency."
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: src/admin/Notices.php:
|
153 |
msgid "Simple & secure login with a wave of your phone."
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: src/admin/Notices.php:
|
157 |
msgid "is a highly efficient way to manage, update and backup multiple websites from one place."
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: src/admin/Notices.php:
|
161 |
msgid "weeks"
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: src/admin/Notices.php:
|
165 |
msgid "Get UpdraftPlus"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: src/admin/Notices.php:
|
169 |
msgid "Get Keyy"
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: src/admin/Notices.php:
|
173 |
msgid "Optimize today"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: src/admin/Notices.php:
|
177 |
msgid "Get UpdraftCentral"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: src/admin/Notices.php:
|
181 |
msgid "Let's Start"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: src/admin/Notices.php:
|
185 |
msgid "Review MetaSlider"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: src/admin/Notices.php:
|
189 |
msgid "Find out more"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: src/admin/Notices.php:
|
193 |
msgid "Sign up"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: src/admin/Notices.php:
|
197 |
msgid "Go there"
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: src/admin/Notices.php:
|
201 |
msgid "Read more"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: src/admin/Notices.php:
|
205 |
msgid "The security check failed. Please refresh the page and try again."
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: src/admin/Notices.php:
|
209 |
msgid "This item does not exist. Please refresh the page and try again."
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: src/admin/Notices.php:
|
213 |
msgid "The option was successfully updated"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: src/admin/Notices.php:
|
217 |
msgid "The requested data does not exist."
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: src/admin/Notices.php:
|
221 |
msgid "The attempt to update the option failed."
|
222 |
msgstr ""
|
223 |
|
@@ -269,7 +269,7 @@ msgstr ""
|
|
269 |
msgid "Thanks for using the MetaSlider WordPress plugin. It looks like you don’t have any slideshows yet! To get started, click above to add your first one."
|
270 |
msgstr ""
|
271 |
|
272 |
-
#: src/admin/Tour.php:45, src/ml-slider.php:
|
273 |
msgid "Learn More"
|
274 |
msgstr ""
|
275 |
|
@@ -305,7 +305,7 @@ msgstr ""
|
|
305 |
msgid "After you have selected your media from the left, click below to continue."
|
306 |
msgstr ""
|
307 |
|
308 |
-
#: src/admin/Tour.php:63, src/ml-slider.php:
|
309 |
msgid "Preview Slideshow"
|
310 |
msgstr ""
|
311 |
|
@@ -361,7 +361,7 @@ msgstr ""
|
|
361 |
msgid "free"
|
362 |
msgstr ""
|
363 |
|
364 |
-
#: src/admin/views/pages/upgrade.php:20, src/ml-slider.php:
|
365 |
msgid "Add-ons"
|
366 |
msgstr ""
|
367 |
|
@@ -565,7 +565,7 @@ msgstr ""
|
|
565 |
msgid "Select Slider:"
|
566 |
msgstr ""
|
567 |
|
568 |
-
#: src/inc/metaslider.widget.class.php:122, src/ml-slider.php:
|
569 |
msgid "No slideshows found"
|
570 |
msgstr ""
|
571 |
|
@@ -677,534 +677,534 @@ msgstr ""
|
|
677 |
msgid "Previous"
|
678 |
msgstr ""
|
679 |
|
680 |
-
#: src/ml-slider.php:
|
681 |
msgid "Image"
|
682 |
msgstr ""
|
683 |
|
684 |
-
#: src/ml-slider.php:
|
685 |
msgid "Add to slideshow"
|
686 |
msgstr ""
|
687 |
|
688 |
-
#: src/ml-slider.php:
|
689 |
msgid "The slide was successfully restored"
|
690 |
msgstr ""
|
691 |
|
692 |
-
#: src/ml-slider.php:
|
693 |
msgid "The attempt to restore the slide failed."
|
694 |
msgstr ""
|
695 |
|
696 |
-
#: src/ml-slider.php:
|
697 |
msgid "The slide was successfully trashed"
|
698 |
msgstr ""
|
699 |
|
700 |
-
#: src/ml-slider.php:
|
701 |
msgid "New Slideshow"
|
702 |
msgstr ""
|
703 |
|
704 |
-
#: src/ml-slider.php:
|
705 |
msgid "Get the add-on pack today!"
|
706 |
msgstr ""
|
707 |
|
708 |
-
#: src/ml-slider.php:
|
709 |
msgid "Select Slideshow"
|
710 |
msgstr ""
|
711 |
|
712 |
-
#: src/ml-slider.php:
|
713 |
msgid "or"
|
714 |
msgstr ""
|
715 |
|
716 |
-
#: src/ml-slider.php:
|
717 |
msgid "Create a New Slideshow"
|
718 |
msgstr ""
|
719 |
|
720 |
-
#: src/ml-slider.php:
|
721 |
msgid "Add a New Slideshow"
|
722 |
msgstr ""
|
723 |
|
724 |
-
#: src/ml-slider.php:
|
725 |
msgid "Trashed Slides"
|
726 |
msgstr ""
|
727 |
|
728 |
-
#: src/ml-slider.php:
|
729 |
msgid "<a href=\"%s\">view active</a>"
|
730 |
msgstr ""
|
731 |
|
732 |
-
#: src/ml-slider.php:
|
733 |
msgid "Add a New Slide"
|
734 |
msgstr ""
|
735 |
|
736 |
-
#: src/ml-slider.php:
|
737 |
msgid "Add Slide"
|
738 |
msgstr ""
|
739 |
|
740 |
-
#: src/ml-slider.php:
|
741 |
msgid "You are viewing slides that have been trashed, which will be automatically deleted in %s days. Click <a href=\"%s\">here</a> to view active slides."
|
742 |
msgstr ""
|
743 |
|
744 |
-
#: src/ml-slider.php:
|
745 |
msgid "Preview"
|
746 |
msgstr ""
|
747 |
|
748 |
-
#: src/ml-slider.php:
|
749 |
msgid "Save"
|
750 |
msgstr ""
|
751 |
|
752 |
-
#: src/ml-slider.php:
|
753 |
msgid "Width"
|
754 |
msgstr ""
|
755 |
|
756 |
-
#: src/ml-slider.php:
|
757 |
msgid "Slideshow width"
|
758 |
msgstr ""
|
759 |
|
760 |
-
#: src/ml-slider.php:
|
761 |
msgid "px"
|
762 |
msgstr ""
|
763 |
|
764 |
-
#: src/ml-slider.php:
|
765 |
msgid "Height"
|
766 |
msgstr ""
|
767 |
|
768 |
-
#: src/ml-slider.php:
|
769 |
msgid "Slideshow height"
|
770 |
msgstr ""
|
771 |
|
772 |
-
#: src/ml-slider.php:
|
773 |
msgid "Effect"
|
774 |
msgstr ""
|
775 |
|
776 |
-
#: src/ml-slider.php:
|
777 |
msgid "Slide transition effect"
|
778 |
msgstr ""
|
779 |
|
780 |
-
#: src/ml-slider.php:
|
781 |
msgid "Random"
|
782 |
msgstr ""
|
783 |
|
784 |
-
#: src/ml-slider.php:
|
785 |
msgid "Swirl"
|
786 |
msgstr ""
|
787 |
|
788 |
-
#: src/ml-slider.php:
|
789 |
msgid "Rain"
|
790 |
msgstr ""
|
791 |
|
792 |
-
#: src/ml-slider.php:
|
793 |
msgid "Straight"
|
794 |
msgstr ""
|
795 |
|
796 |
-
#: src/ml-slider.php:
|
797 |
msgid "Slide Down"
|
798 |
msgstr ""
|
799 |
|
800 |
-
#: src/ml-slider.php:
|
801 |
msgid "Slice Up"
|
802 |
msgstr ""
|
803 |
|
804 |
-
#: src/ml-slider.php:
|
805 |
msgid "Slide Up Left"
|
806 |
msgstr ""
|
807 |
|
808 |
-
#: src/ml-slider.php:
|
809 |
msgid "Slice Up Down"
|
810 |
msgstr ""
|
811 |
|
812 |
-
#: src/ml-slider.php:
|
813 |
msgid "Slide Up Down Left"
|
814 |
msgstr ""
|
815 |
|
816 |
-
#: src/ml-slider.php:
|
817 |
msgid "Fold"
|
818 |
msgstr ""
|
819 |
|
820 |
-
#: src/ml-slider.php:
|
821 |
msgid "Fade"
|
822 |
msgstr ""
|
823 |
|
824 |
-
#: src/ml-slider.php:
|
825 |
msgid "Slide In Right"
|
826 |
msgstr ""
|
827 |
|
828 |
-
#: src/ml-slider.php:
|
829 |
msgid "Slide In Left"
|
830 |
msgstr ""
|
831 |
|
832 |
-
#: src/ml-slider.php:
|
833 |
msgid "Box Random"
|
834 |
msgstr ""
|
835 |
|
836 |
-
#: src/ml-slider.php:
|
837 |
msgid "Box Rain"
|
838 |
msgstr ""
|
839 |
|
840 |
-
#: src/ml-slider.php:
|
841 |
msgid "Box Rain Reverse"
|
842 |
msgstr ""
|
843 |
|
844 |
-
#: src/ml-slider.php:
|
845 |
msgid "Box Rain Grow Reverse"
|
846 |
msgstr ""
|
847 |
|
848 |
-
#: src/ml-slider.php:
|
849 |
msgid "Slide"
|
850 |
msgstr ""
|
851 |
|
852 |
-
#: src/ml-slider.php:
|
853 |
msgid "Theme"
|
854 |
msgstr ""
|
855 |
|
856 |
-
#: src/ml-slider.php:
|
857 |
msgid "Slideshow theme"
|
858 |
msgstr ""
|
859 |
|
860 |
-
#: src/ml-slider.php:
|
861 |
msgid "Default"
|
862 |
msgstr ""
|
863 |
|
864 |
-
#: src/ml-slider.php:
|
865 |
msgid "Dark (Nivo)"
|
866 |
msgstr ""
|
867 |
|
868 |
-
#: src/ml-slider.php:
|
869 |
msgid "Light (Nivo)"
|
870 |
msgstr ""
|
871 |
|
872 |
-
#: src/ml-slider.php:
|
873 |
msgid "Bar (Nivo)"
|
874 |
msgstr ""
|
875 |
|
876 |
-
#: src/ml-slider.php:
|
877 |
msgid "Arrows"
|
878 |
msgstr ""
|
879 |
|
880 |
-
#: src/ml-slider.php:
|
881 |
msgid "Show the previous/next arrows"
|
882 |
msgstr ""
|
883 |
|
884 |
-
#: src/ml-slider.php:
|
885 |
msgid "Navigation"
|
886 |
msgstr ""
|
887 |
|
888 |
-
#: src/ml-slider.php:
|
889 |
msgid "Show the slide navigation bullets"
|
890 |
msgstr ""
|
891 |
|
892 |
-
#: src/ml-slider.php:
|
893 |
msgid "Hidden"
|
894 |
msgstr ""
|
895 |
|
896 |
-
#: src/ml-slider.php:
|
897 |
msgid "Dots"
|
898 |
msgstr ""
|
899 |
|
900 |
-
#: src/ml-slider.php:
|
901 |
msgid "Thumbnail"
|
902 |
msgstr ""
|
903 |
|
904 |
-
#: src/ml-slider.php:
|
905 |
msgid "Filmstrip"
|
906 |
msgstr ""
|
907 |
|
908 |
-
#: src/ml-slider.php:
|
909 |
msgid "Title"
|
910 |
msgstr ""
|
911 |
|
912 |
-
#: src/ml-slider.php:
|
913 |
msgid "Slideshow title"
|
914 |
msgstr ""
|
915 |
|
916 |
-
#: src/ml-slider.php:
|
917 |
msgid "View trashed slides"
|
918 |
msgstr ""
|
919 |
|
920 |
-
#: src/ml-slider.php:
|
921 |
msgid "Trash"
|
922 |
msgstr ""
|
923 |
|
924 |
-
#: src/ml-slider.php:
|
925 |
msgid "Advanced Settings"
|
926 |
msgstr ""
|
927 |
|
928 |
-
#: src/ml-slider.php:
|
929 |
msgid "Stretch"
|
930 |
msgstr ""
|
931 |
|
932 |
-
#: src/ml-slider.php:
|
933 |
msgid "100% wide output"
|
934 |
msgstr ""
|
935 |
|
936 |
-
#: src/ml-slider.php:
|
937 |
msgid "Stretch the slideshow output to fill it's parent container"
|
938 |
msgstr ""
|
939 |
|
940 |
-
#: src/ml-slider.php:
|
941 |
msgid "Center align"
|
942 |
msgstr ""
|
943 |
|
944 |
-
#: src/ml-slider.php:
|
945 |
msgid "Center align the slideshow"
|
946 |
msgstr ""
|
947 |
|
948 |
-
#: src/ml-slider.php:
|
949 |
msgid "Auto play"
|
950 |
msgstr ""
|
951 |
|
952 |
-
#: src/ml-slider.php:
|
953 |
msgid "Transition between slides automatically"
|
954 |
msgstr ""
|
955 |
|
956 |
-
#: src/ml-slider.php:
|
957 |
msgid "Image Crop"
|
958 |
msgstr ""
|
959 |
|
960 |
-
#: src/ml-slider.php:
|
961 |
msgid "Smart Crop"
|
962 |
msgstr ""
|
963 |
|
964 |
-
#: src/ml-slider.php:
|
965 |
msgid "Standard"
|
966 |
msgstr ""
|
967 |
|
968 |
-
#: src/ml-slider.php:
|
969 |
msgid "Disabled"
|
970 |
msgstr ""
|
971 |
|
972 |
-
#: src/ml-slider.php:
|
973 |
msgid "Disabled (Smart Pad)"
|
974 |
msgstr ""
|
975 |
|
976 |
-
#: src/ml-slider.php:
|
977 |
msgid "Smart Crop ensures your responsive slides are cropped to a ratio that results in a consistent slideshow size"
|
978 |
msgstr ""
|
979 |
|
980 |
-
#: src/ml-slider.php:
|
981 |
msgid "Carousel mode"
|
982 |
msgstr ""
|
983 |
|
984 |
-
#: src/ml-slider.php:
|
985 |
msgid "Display multiple slides at once. Slideshow output will be 100% wide."
|
986 |
msgstr ""
|
987 |
|
988 |
-
#: src/ml-slider.php:
|
989 |
msgid "Carousel margin"
|
990 |
msgstr ""
|
991 |
|
992 |
-
#: src/ml-slider.php:
|
993 |
msgid "Pixel margin between slides in carousel."
|
994 |
msgstr ""
|
995 |
|
996 |
-
#: src/ml-slider.php:
|
997 |
msgid "Randomise the order of the slides"
|
998 |
msgstr ""
|
999 |
|
1000 |
-
#: src/ml-slider.php:
|
1001 |
msgid "Hover pause"
|
1002 |
msgstr ""
|
1003 |
|
1004 |
-
#: src/ml-slider.php:
|
1005 |
msgid "Pause the slideshow when hovering over slider, then resume when no longer hovering."
|
1006 |
msgstr ""
|
1007 |
|
1008 |
-
#: src/ml-slider.php:
|
1009 |
msgid "Reverse"
|
1010 |
msgstr ""
|
1011 |
|
1012 |
-
#: src/ml-slider.php:
|
1013 |
msgid "Reverse the animation direction"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
-
#: src/ml-slider.php:
|
1017 |
msgid "Slide delay"
|
1018 |
msgstr ""
|
1019 |
|
1020 |
-
#: src/ml-slider.php:
|
1021 |
msgid "How long to display each slide, in milliseconds"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
-
#: src/ml-slider.php:
|
1025 |
msgid "ms"
|
1026 |
msgstr ""
|
1027 |
|
1028 |
-
#: src/ml-slider.php:
|
1029 |
msgid "Animation speed"
|
1030 |
msgstr ""
|
1031 |
|
1032 |
-
#: src/ml-slider.php:
|
1033 |
msgid "Set the speed of animations, in milliseconds"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
-
#: src/ml-slider.php:
|
1037 |
msgid "Number of slices"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
-
#: src/ml-slider.php:
|
1041 |
msgid "Number of squares"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
-
#: src/ml-slider.php:
|
1045 |
msgid "Slide direction"
|
1046 |
msgstr ""
|
1047 |
|
1048 |
-
#: src/ml-slider.php:
|
1049 |
msgid "Select the sliding direction"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
-
#: src/ml-slider.php:
|
1053 |
msgid "Horizontal"
|
1054 |
msgstr ""
|
1055 |
|
1056 |
-
#: src/ml-slider.php:
|
1057 |
msgid "Vertical"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
-
#: src/ml-slider.php:
|
1061 |
msgid "Easing"
|
1062 |
msgstr ""
|
1063 |
|
1064 |
-
#: src/ml-slider.php:
|
1065 |
msgid "Animation easing effect"
|
1066 |
msgstr ""
|
1067 |
|
1068 |
-
#: src/ml-slider.php:
|
1069 |
msgid "Previous text"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
-
#: src/ml-slider.php:
|
1073 |
msgid "Set the text for the 'previous' direction item"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
-
#: src/ml-slider.php:
|
1077 |
msgid "Next text"
|
1078 |
msgstr ""
|
1079 |
|
1080 |
-
#: src/ml-slider.php:
|
1081 |
msgid "Set the text for the 'next' direction item"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
-
#: src/ml-slider.php:
|
1085 |
msgid "Square delay"
|
1086 |
msgstr ""
|
1087 |
|
1088 |
-
#: src/ml-slider.php:
|
1089 |
msgid "Delay between squares in ms"
|
1090 |
msgstr ""
|
1091 |
|
1092 |
-
#: src/ml-slider.php:
|
1093 |
msgid "Opacity"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
-
#: src/ml-slider.php:
|
1097 |
msgid "Opacity of title and navigation"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
-
#: src/ml-slider.php:
|
1101 |
msgid "Caption speed"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
-
#: src/ml-slider.php:
|
1105 |
msgid "Set the fade in speed of the caption"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
-
#: src/ml-slider.php:
|
1109 |
msgid "Developer options"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
-
#: src/ml-slider.php:
|
1113 |
msgid "CSS classes"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
-
#: src/ml-slider.php:
|
1117 |
msgid "Specify any custom CSS Classes you would like to be added to the slider wrapper"
|
1118 |
msgstr ""
|
1119 |
|
1120 |
-
#: src/ml-slider.php:
|
1121 |
msgid "Print CSS"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
-
#: src/ml-slider.php:
|
1125 |
msgid "Uncheck this is you would like to include your own CSS"
|
1126 |
msgstr ""
|
1127 |
|
1128 |
-
#: src/ml-slider.php:
|
1129 |
msgid "Print JS"
|
1130 |
msgstr ""
|
1131 |
|
1132 |
-
#: src/ml-slider.php:
|
1133 |
msgid "Uncheck this is you would like to include your own Javascript"
|
1134 |
msgstr ""
|
1135 |
|
1136 |
-
#: src/ml-slider.php:
|
1137 |
msgid "No conflict mode"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
-
#: src/ml-slider.php:
|
1141 |
msgid "Delay adding the flexslider class to the slideshow"
|
1142 |
msgstr ""
|
1143 |
|
1144 |
-
#: src/ml-slider.php:
|
1145 |
msgid "Delete Slideshow"
|
1146 |
msgstr ""
|
1147 |
|
1148 |
-
#: src/ml-slider.php:
|
1149 |
msgid "Select slideshow to insert into post"
|
1150 |
msgstr ""
|
1151 |
|
1152 |
-
#: src/ml-slider.php:
|
1153 |
msgid "Add slider"
|
1154 |
msgstr ""
|
1155 |
|
1156 |
-
#: src/ml-slider.php:
|
1157 |
msgid "Insert MetaSlider"
|
1158 |
msgstr ""
|
1159 |
|
1160 |
-
#: src/ml-slider.php:
|
1161 |
msgid "Choose slideshow"
|
1162 |
msgstr ""
|
1163 |
|
1164 |
-
#: src/ml-slider.php:
|
1165 |
msgid "Insert slideshow"
|
1166 |
msgstr ""
|
1167 |
|
1168 |
-
#: src/ml-slider.php:
|
1169 |
msgid "Take a tour"
|
1170 |
msgstr ""
|
1171 |
|
1172 |
-
#: src/ml-slider.php:
|
1173 |
msgid "Support"
|
1174 |
msgstr ""
|
1175 |
|
1176 |
-
#: src/ml-slider.php:
|
1177 |
msgid "Premium Support"
|
1178 |
msgstr ""
|
1179 |
|
1180 |
-
#: src/ml-slider.php:
|
1181 |
msgid "Documentation"
|
1182 |
msgstr ""
|
1183 |
|
1184 |
-
#: src/ml-slider.php:
|
1185 |
msgid "Leave a review"
|
1186 |
msgstr ""
|
1187 |
|
1188 |
-
#: src/ml-slider.php:
|
1189 |
msgid "Upgrade Now"
|
1190 |
msgstr ""
|
1191 |
|
1192 |
-
#: src/ml-slider.php:
|
1193 |
msgid "Get The Pro Pack Today!"
|
1194 |
msgstr ""
|
1195 |
|
1196 |
-
#: src/ml-slider.php:
|
1197 |
msgid "Switch to Dropdown view"
|
1198 |
msgstr ""
|
1199 |
|
1200 |
-
#: src/ml-slider.php:
|
1201 |
msgid "Switch to Tab view"
|
1202 |
msgstr ""
|
1203 |
|
1204 |
-
#: src/ml-slider.php:
|
1205 |
msgid "Layout"
|
1206 |
msgstr ""
|
1207 |
|
1208 |
-
#: src/ml-slider.php:
|
1209 |
msgid "View The Documentation"
|
1210 |
msgstr ""
|
17 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
18 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19 |
|
20 |
+
#: src/admin/Notices.php:68
|
21 |
msgid "Always backup WordPress to avoid losing your site!"
|
22 |
msgstr ""
|
23 |
|
24 |
+
#: src/admin/Notices.php:69
|
25 |
msgid "UpdraftPlus is the world's #1 backup plugin from the makers of MetaSlider. Backup to the cloud, on a schedule and restore with 1 click!"
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: src/admin/Notices.php:79
|
29 |
msgid "Keyy: Instant and secure logon with a wave of your phone"
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: src/admin/Notices.php:80
|
33 |
msgid "No more forgotten passwords. Find out more about our revolutionary new WordPress plugin"
|
34 |
msgstr ""
|
35 |
|
36 |
+
#: src/admin/Notices.php:90
|
37 |
msgid "Save Time and Money. Manage multiple WordPress sites from one location."
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: src/admin/Notices.php:91
|
41 |
msgid "UpdraftCentral is a highly efficient way to take backup, update and manage multiple WP sites from one location"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: src/admin/Notices.php:101
|
45 |
msgid "Like MetaSlider and have a minute to spare?"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: src/admin/Notices.php:102
|
49 |
msgid "Please help MetaSlider by giving a positive review at wordpress.org."
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: src/admin/Notices.php:111
|
53 |
msgid "Help us to get even better MetaSlider"
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: src/admin/Notices.php:112
|
57 |
msgid "Let us know how you use MetaSlider by answering 4 simple questions. We will make MetaSlider to suit you better."
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: src/admin/Notices.php:121
|
61 |
msgid "Spice up your site with animated layers and video slides"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: src/admin/Notices.php:122
|
65 |
msgid "With the MetaSlider Add-on pack you can give your slideshows a professional look!"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: src/admin/Notices.php:131
|
69 |
msgid "Increase your revenue and conversion with video slides and many more features"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: src/admin/Notices.php:132
|
73 |
msgid "Upgrade today to benefit from many more premium features. Find out more."
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: src/admin/Notices.php:141
|
77 |
msgid "Can you translate? Want to improve MetaSlider for speakers of your language?"
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: src/admin/Notices.php:142
|
81 |
msgid "Please go here for instructions - it is easy."
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: src/admin/Notices.php:152
|
85 |
msgid "Thank you for installing MetaSlider"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: src/admin/Notices.php:153
|
89 |
msgid "Supercharge & secure your WordPress site with our other top plugins:"
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: src/admin/Notices.php:170
|
93 |
msgid "We’re making changes and need your help."
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: src/admin/Notices.php:171
|
97 |
msgid "If you could spare a minute, we would like to ask you 4 easy questions about how you use MetaSlider. Your voice is important to us!"
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: src/admin/Notices.php:176
|
101 |
msgid "forever"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: src/admin/Notices.php:190
|
105 |
msgid "Black Friday - 50% off the MetaSlider Add-on Pack until November 30th"
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: src/admin/Notices.php:191, src/admin/Notices.php:204, src/admin/Notices.php:217, src/admin/Notices.php:230, src/admin/Notices.php:243
|
109 |
msgid "To benefit, use this discount code:"
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: src/admin/Notices.php:199, src/admin/Notices.php:212, src/admin/Notices.php:225, src/admin/Notices.php:238, src/admin/Notices.php:251
|
113 |
msgid "until next year"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: src/admin/Notices.php:203
|
117 |
msgid "Christmas sale - 50% off the MetaSlider Add-on Pack until December 25th"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: src/admin/Notices.php:216
|
121 |
msgid "Happy New Year - 50% off the MetaSlider Add-on Pack until January 1st"
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: src/admin/Notices.php:229
|
125 |
msgid "Spring sale - 50% off the MetaSlider Add-on Pack until April 31st"
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: src/admin/Notices.php:242
|
129 |
msgid "Summer sale - 50% off the MetaSlider Add-on Pack until July 31st"
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: src/admin/Notices.php:265
|
133 |
msgid "Increase your conversion rate with video slides and many more options."
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: src/admin/Notices.php:272
|
137 |
msgid "offers unparalleled choice and flexibility, allowing you to select one or a combination of over a dozen optimization options."
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: src/admin/Notices.php:279
|
141 |
msgid "provides personal support, the ability to copy sites, more storage destinations, encrypted backups for security, multiple backup destinations, better reporting, no adverts and plenty more."
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: src/admin/Notices.php:286
|
145 |
msgid "simplifies backups and restoration. It is the world's highest ranking and most popular scheduled backup plugin, with over a million currently-active installs."
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: src/admin/Notices.php:293
|
149 |
msgid "auto-clean your WordPress database so that it runs at maximum efficiency."
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: src/admin/Notices.php:300
|
153 |
msgid "Simple & secure login with a wave of your phone."
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: src/admin/Notices.php:307
|
157 |
msgid "is a highly efficient way to manage, update and backup multiple websites from one place."
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: src/admin/Notices.php:512
|
161 |
msgid "weeks"
|
162 |
msgstr ""
|
163 |
|
164 |
+
#: src/admin/Notices.php:527
|
165 |
msgid "Get UpdraftPlus"
|
166 |
msgstr ""
|
167 |
|
168 |
+
#: src/admin/Notices.php:528
|
169 |
msgid "Get Keyy"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: src/admin/Notices.php:529
|
173 |
msgid "Optimize today"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: src/admin/Notices.php:530
|
177 |
msgid "Get UpdraftCentral"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: src/admin/Notices.php:531
|
181 |
msgid "Let's Start"
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: src/admin/Notices.php:532
|
185 |
msgid "Review MetaSlider"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: src/admin/Notices.php:533
|
189 |
msgid "Find out more"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: src/admin/Notices.php:534
|
193 |
msgid "Sign up"
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: src/admin/Notices.php:535
|
197 |
msgid "Go there"
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: src/admin/Notices.php:537
|
201 |
msgid "Read more"
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: src/admin/Notices.php:550, src/admin/Tour.php:119, src/inc/slide/metaslide.class.php:113, src/inc/slide/metaslide.image.class.php:107, src/ml-slider.php:615, src/ml-slider.php:661
|
205 |
msgid "The security check failed. Please refresh the page and try again."
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: src/admin/Notices.php:556
|
209 |
msgid "This item does not exist. Please refresh the page and try again."
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: src/admin/Notices.php:569
|
213 |
msgid "The option was successfully updated"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: src/admin/Notices.php:622
|
217 |
msgid "The requested data does not exist."
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: src/admin/Notices.php:640
|
221 |
msgid "The attempt to update the option failed."
|
222 |
msgstr ""
|
223 |
|
269 |
msgid "Thanks for using the MetaSlider WordPress plugin. It looks like you don’t have any slideshows yet! To get started, click above to add your first one."
|
270 |
msgstr ""
|
271 |
|
272 |
+
#: src/admin/Tour.php:45, src/ml-slider.php:1010
|
273 |
msgid "Learn More"
|
274 |
msgstr ""
|
275 |
|
305 |
msgid "After you have selected your media from the left, click below to continue."
|
306 |
msgstr ""
|
307 |
|
308 |
+
#: src/admin/Tour.php:63, src/ml-slider.php:1338
|
309 |
msgid "Preview Slideshow"
|
310 |
msgstr ""
|
311 |
|
361 |
msgid "free"
|
362 |
msgstr ""
|
363 |
|
364 |
+
#: src/admin/views/pages/upgrade.php:20, src/ml-slider.php:310, src/ml-slider.php:1901
|
365 |
msgid "Add-ons"
|
366 |
msgstr ""
|
367 |
|
565 |
msgid "Select Slider:"
|
566 |
msgstr ""
|
567 |
|
568 |
+
#: src/inc/metaslider.widget.class.php:122, src/ml-slider.php:1847
|
569 |
msgid "No slideshows found"
|
570 |
msgstr ""
|
571 |
|
677 |
msgid "Previous"
|
678 |
msgstr ""
|
679 |
|
680 |
+
#: src/ml-slider.php:433
|
681 |
msgid "Image"
|
682 |
msgstr ""
|
683 |
|
684 |
+
#: src/ml-slider.php:434
|
685 |
msgid "Add to slideshow"
|
686 |
msgstr ""
|
687 |
|
688 |
+
#: src/ml-slider.php:628
|
689 |
msgid "The slide was successfully restored"
|
690 |
msgstr ""
|
691 |
|
692 |
+
#: src/ml-slider.php:643
|
693 |
msgid "The attempt to restore the slide failed."
|
694 |
msgstr ""
|
695 |
|
696 |
+
#: src/ml-slider.php:674
|
697 |
msgid "The slide was successfully trashed"
|
698 |
msgstr ""
|
699 |
|
700 |
+
#: src/ml-slider.php:851, src/ml-slider.php:1183
|
701 |
msgid "New Slideshow"
|
702 |
msgstr ""
|
703 |
|
704 |
+
#: src/ml-slider.php:1010
|
705 |
msgid "Get the add-on pack today!"
|
706 |
msgstr ""
|
707 |
|
708 |
+
#: src/ml-slider.php:1163
|
709 |
msgid "Select Slideshow"
|
710 |
msgstr ""
|
711 |
|
712 |
+
#: src/ml-slider.php:1175
|
713 |
msgid "or"
|
714 |
msgstr ""
|
715 |
|
716 |
+
#: src/ml-slider.php:1176
|
717 |
msgid "Create a New Slideshow"
|
718 |
msgstr ""
|
719 |
|
720 |
+
#: src/ml-slider.php:1195, src/ml-slider.php:1197
|
721 |
msgid "Add a New Slideshow"
|
722 |
msgstr ""
|
723 |
|
724 |
+
#: src/ml-slider.php:1290
|
725 |
msgid "Trashed Slides"
|
726 |
msgstr ""
|
727 |
|
728 |
+
#: src/ml-slider.php:1291
|
729 |
msgid "<a href=\"%s\">view active</a>"
|
730 |
msgstr ""
|
731 |
|
732 |
+
#: src/ml-slider.php:1300
|
733 |
msgid "Add a New Slide"
|
734 |
msgstr ""
|
735 |
|
736 |
+
#: src/ml-slider.php:1302
|
737 |
msgid "Add Slide"
|
738 |
msgstr ""
|
739 |
|
740 |
+
#: src/ml-slider.php:1329
|
741 |
msgid "You are viewing slides that have been trashed, which will be automatically deleted in %s days. Click <a href=\"%s\">here</a> to view active slides."
|
742 |
msgstr ""
|
743 |
|
744 |
+
#: src/ml-slider.php:1340
|
745 |
msgid "Preview"
|
746 |
msgstr ""
|
747 |
|
748 |
+
#: src/ml-slider.php:1343
|
749 |
msgid "Save"
|
750 |
msgstr ""
|
751 |
|
752 |
+
#: src/ml-slider.php:1371, src/ml-slider.php:1629
|
753 |
msgid "Width"
|
754 |
msgstr ""
|
755 |
|
756 |
+
#: src/ml-slider.php:1373
|
757 |
msgid "Slideshow width"
|
758 |
msgstr ""
|
759 |
|
760 |
+
#: src/ml-slider.php:1374, src/ml-slider.php:1387, src/ml-slider.php:1556
|
761 |
msgid "px"
|
762 |
msgstr ""
|
763 |
|
764 |
+
#: src/ml-slider.php:1384, src/ml-slider.php:1642
|
765 |
msgid "Height"
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: src/ml-slider.php:1386
|
769 |
msgid "Slideshow height"
|
770 |
msgstr ""
|
771 |
|
772 |
+
#: src/ml-slider.php:1393
|
773 |
msgid "Effect"
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: src/ml-slider.php:1395
|
777 |
msgid "Slide transition effect"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: src/ml-slider.php:1397, src/ml-slider.php:1561
|
781 |
msgid "Random"
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: src/ml-slider.php:1398
|
785 |
msgid "Swirl"
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: src/ml-slider.php:1399
|
789 |
msgid "Rain"
|
790 |
msgstr ""
|
791 |
|
792 |
+
#: src/ml-slider.php:1400
|
793 |
msgid "Straight"
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: src/ml-slider.php:1401
|
797 |
msgid "Slide Down"
|
798 |
msgstr ""
|
799 |
|
800 |
+
#: src/ml-slider.php:1402
|
801 |
msgid "Slice Up"
|
802 |
msgstr ""
|
803 |
|
804 |
+
#: src/ml-slider.php:1403
|
805 |
msgid "Slide Up Left"
|
806 |
msgstr ""
|
807 |
|
808 |
+
#: src/ml-slider.php:1404
|
809 |
msgid "Slice Up Down"
|
810 |
msgstr ""
|
811 |
|
812 |
+
#: src/ml-slider.php:1405
|
813 |
msgid "Slide Up Down Left"
|
814 |
msgstr ""
|
815 |
|
816 |
+
#: src/ml-slider.php:1406
|
817 |
msgid "Fold"
|
818 |
msgstr ""
|
819 |
|
820 |
+
#: src/ml-slider.php:1407
|
821 |
msgid "Fade"
|
822 |
msgstr ""
|
823 |
|
824 |
+
#: src/ml-slider.php:1408
|
825 |
msgid "Slide In Right"
|
826 |
msgstr ""
|
827 |
|
828 |
+
#: src/ml-slider.php:1409
|
829 |
msgid "Slide In Left"
|
830 |
msgstr ""
|
831 |
|
832 |
+
#: src/ml-slider.php:1410
|
833 |
msgid "Box Random"
|
834 |
msgstr ""
|
835 |
|
836 |
+
#: src/ml-slider.php:1411
|
837 |
msgid "Box Rain"
|
838 |
msgstr ""
|
839 |
|
840 |
+
#: src/ml-slider.php:1412
|
841 |
msgid "Box Rain Reverse"
|
842 |
msgstr ""
|
843 |
|
844 |
+
#: src/ml-slider.php:1413
|
845 |
msgid "Box Rain Grow Reverse"
|
846 |
msgstr ""
|
847 |
|
848 |
+
#: src/ml-slider.php:1414
|
849 |
msgid "Slide"
|
850 |
msgstr ""
|
851 |
|
852 |
+
#: src/ml-slider.php:1421
|
853 |
msgid "Theme"
|
854 |
msgstr ""
|
855 |
|
856 |
+
#: src/ml-slider.php:1423
|
857 |
msgid "Slideshow theme"
|
858 |
msgstr ""
|
859 |
|
860 |
+
#: src/ml-slider.php:1425
|
861 |
msgid "Default"
|
862 |
msgstr ""
|
863 |
|
864 |
+
#: src/ml-slider.php:1426
|
865 |
msgid "Dark (Nivo)"
|
866 |
msgstr ""
|
867 |
|
868 |
+
#: src/ml-slider.php:1427
|
869 |
msgid "Light (Nivo)"
|
870 |
msgstr ""
|
871 |
|
872 |
+
#: src/ml-slider.php:1428
|
873 |
msgid "Bar (Nivo)"
|
874 |
msgstr ""
|
875 |
|
876 |
+
#: src/ml-slider.php:1434
|
877 |
msgid "Arrows"
|
878 |
msgstr ""
|
879 |
|
880 |
+
#: src/ml-slider.php:1437
|
881 |
msgid "Show the previous/next arrows"
|
882 |
msgstr ""
|
883 |
|
884 |
+
#: src/ml-slider.php:1442
|
885 |
msgid "Navigation"
|
886 |
msgstr ""
|
887 |
|
888 |
+
#: src/ml-slider.php:1445
|
889 |
msgid "Show the slide navigation bullets"
|
890 |
msgstr ""
|
891 |
|
892 |
+
#: src/ml-slider.php:1447
|
893 |
msgid "Hidden"
|
894 |
msgstr ""
|
895 |
|
896 |
+
#: src/ml-slider.php:1448
|
897 |
msgid "Dots"
|
898 |
msgstr ""
|
899 |
|
900 |
+
#: src/ml-slider.php:1450
|
901 |
msgid "Thumbnail"
|
902 |
msgstr ""
|
903 |
|
904 |
+
#: src/ml-slider.php:1454
|
905 |
msgid "Filmstrip"
|
906 |
msgstr ""
|
907 |
|
908 |
+
#: src/ml-slider.php:1467
|
909 |
msgid "Title"
|
910 |
msgstr ""
|
911 |
|
912 |
+
#: src/ml-slider.php:1468
|
913 |
msgid "Slideshow title"
|
914 |
msgstr ""
|
915 |
|
916 |
+
#: src/ml-slider.php:1485
|
917 |
msgid "View trashed slides"
|
918 |
msgstr ""
|
919 |
|
920 |
+
#: src/ml-slider.php:1486
|
921 |
msgid "Trash"
|
922 |
msgstr ""
|
923 |
|
924 |
+
#: src/ml-slider.php:1493
|
925 |
msgid "Advanced Settings"
|
926 |
msgstr ""
|
927 |
|
928 |
+
#: src/ml-slider.php:1502
|
929 |
msgid "Stretch"
|
930 |
msgstr ""
|
931 |
|
932 |
+
#: src/ml-slider.php:1504
|
933 |
msgid "100% wide output"
|
934 |
msgstr ""
|
935 |
|
936 |
+
#: src/ml-slider.php:1506
|
937 |
msgid "Stretch the slideshow output to fill it's parent container"
|
938 |
msgstr ""
|
939 |
|
940 |
+
#: src/ml-slider.php:1511
|
941 |
msgid "Center align"
|
942 |
msgstr ""
|
943 |
|
944 |
+
#: src/ml-slider.php:1514
|
945 |
msgid "Center align the slideshow"
|
946 |
msgstr ""
|
947 |
|
948 |
+
#: src/ml-slider.php:1519
|
949 |
msgid "Auto play"
|
950 |
msgstr ""
|
951 |
|
952 |
+
#: src/ml-slider.php:1522
|
953 |
msgid "Transition between slides automatically"
|
954 |
msgstr ""
|
955 |
|
956 |
+
#: src/ml-slider.php:1527
|
957 |
msgid "Image Crop"
|
958 |
msgstr ""
|
959 |
|
960 |
+
#: src/ml-slider.php:1531
|
961 |
msgid "Smart Crop"
|
962 |
msgstr ""
|
963 |
|
964 |
+
#: src/ml-slider.php:1532
|
965 |
msgid "Standard"
|
966 |
msgstr ""
|
967 |
|
968 |
+
#: src/ml-slider.php:1533
|
969 |
msgid "Disabled"
|
970 |
msgstr ""
|
971 |
|
972 |
+
#: src/ml-slider.php:1534
|
973 |
msgid "Disabled (Smart Pad)"
|
974 |
msgstr ""
|
975 |
|
976 |
+
#: src/ml-slider.php:1536
|
977 |
msgid "Smart Crop ensures your responsive slides are cropped to a ratio that results in a consistent slideshow size"
|
978 |
msgstr ""
|
979 |
|
980 |
+
#: src/ml-slider.php:1541
|
981 |
msgid "Carousel mode"
|
982 |
msgstr ""
|
983 |
|
984 |
+
#: src/ml-slider.php:1544
|
985 |
msgid "Display multiple slides at once. Slideshow output will be 100% wide."
|
986 |
msgstr ""
|
987 |
|
988 |
+
#: src/ml-slider.php:1552
|
989 |
msgid "Carousel margin"
|
990 |
msgstr ""
|
991 |
|
992 |
+
#: src/ml-slider.php:1555
|
993 |
msgid "Pixel margin between slides in carousel."
|
994 |
msgstr ""
|
995 |
|
996 |
+
#: src/ml-slider.php:1564
|
997 |
msgid "Randomise the order of the slides"
|
998 |
msgstr ""
|
999 |
|
1000 |
+
#: src/ml-slider.php:1569
|
1001 |
msgid "Hover pause"
|
1002 |
msgstr ""
|
1003 |
|
1004 |
+
#: src/ml-slider.php:1572
|
1005 |
msgid "Pause the slideshow when hovering over slider, then resume when no longer hovering."
|
1006 |
msgstr ""
|
1007 |
|
1008 |
+
#: src/ml-slider.php:1577
|
1009 |
msgid "Reverse"
|
1010 |
msgstr ""
|
1011 |
|
1012 |
+
#: src/ml-slider.php:1580
|
1013 |
msgid "Reverse the animation direction"
|
1014 |
msgstr ""
|
1015 |
|
1016 |
+
#: src/ml-slider.php:1590
|
1017 |
msgid "Slide delay"
|
1018 |
msgstr ""
|
1019 |
|
1020 |
+
#: src/ml-slider.php:1592
|
1021 |
msgid "How long to display each slide, in milliseconds"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
+
#: src/ml-slider.php:1593, src/ml-slider.php:1606, src/ml-slider.php:1619, src/ml-slider.php:1695, src/ml-slider.php:1721
|
1025 |
msgid "ms"
|
1026 |
msgstr ""
|
1027 |
|
1028 |
+
#: src/ml-slider.php:1603
|
1029 |
msgid "Animation speed"
|
1030 |
msgstr ""
|
1031 |
|
1032 |
+
#: src/ml-slider.php:1605
|
1033 |
msgid "Set the speed of animations, in milliseconds"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
+
#: src/ml-slider.php:1616, src/ml-slider.php:1618
|
1037 |
msgid "Number of slices"
|
1038 |
msgstr ""
|
1039 |
|
1040 |
+
#: src/ml-slider.php:1629, src/ml-slider.php:1631, src/ml-slider.php:1642, src/ml-slider.php:1644
|
1041 |
msgid "Number of squares"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
+
#: src/ml-slider.php:1650
|
1045 |
msgid "Slide direction"
|
1046 |
msgstr ""
|
1047 |
|
1048 |
+
#: src/ml-slider.php:1652
|
1049 |
msgid "Select the sliding direction"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: src/ml-slider.php:1655
|
1053 |
msgid "Horizontal"
|
1054 |
msgstr ""
|
1055 |
|
1056 |
+
#: src/ml-slider.php:1656
|
1057 |
msgid "Vertical"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
+
#: src/ml-slider.php:1662
|
1061 |
msgid "Easing"
|
1062 |
msgstr ""
|
1063 |
|
1064 |
+
#: src/ml-slider.php:1664
|
1065 |
msgid "Animation easing effect"
|
1066 |
msgstr ""
|
1067 |
|
1068 |
+
#: src/ml-slider.php:1671
|
1069 |
msgid "Previous text"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
+
#: src/ml-slider.php:1673
|
1073 |
msgid "Set the text for the 'previous' direction item"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
+
#: src/ml-slider.php:1679
|
1077 |
msgid "Next text"
|
1078 |
msgstr ""
|
1079 |
|
1080 |
+
#: src/ml-slider.php:1681
|
1081 |
msgid "Set the text for the 'next' direction item"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
+
#: src/ml-slider.php:1692
|
1085 |
msgid "Square delay"
|
1086 |
msgstr ""
|
1087 |
|
1088 |
+
#: src/ml-slider.php:1694
|
1089 |
msgid "Delay between squares in ms"
|
1090 |
msgstr ""
|
1091 |
|
1092 |
+
#: src/ml-slider.php:1705
|
1093 |
msgid "Opacity"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
+
#: src/ml-slider.php:1707
|
1097 |
msgid "Opacity of title and navigation"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
+
#: src/ml-slider.php:1718
|
1101 |
msgid "Caption speed"
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: src/ml-slider.php:1720
|
1105 |
msgid "Set the fade in speed of the caption"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
+
#: src/ml-slider.php:1727
|
1109 |
msgid "Developer options"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
+
#: src/ml-slider.php:1732
|
1113 |
msgid "CSS classes"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
+
#: src/ml-slider.php:1734
|
1117 |
msgid "Specify any custom CSS Classes you would like to be added to the slider wrapper"
|
1118 |
msgstr ""
|
1119 |
|
1120 |
+
#: src/ml-slider.php:1740
|
1121 |
msgid "Print CSS"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
+
#: src/ml-slider.php:1743
|
1125 |
msgid "Uncheck this is you would like to include your own CSS"
|
1126 |
msgstr ""
|
1127 |
|
1128 |
+
#: src/ml-slider.php:1748
|
1129 |
msgid "Print JS"
|
1130 |
msgstr ""
|
1131 |
|
1132 |
+
#: src/ml-slider.php:1751
|
1133 |
msgid "Uncheck this is you would like to include your own Javascript"
|
1134 |
msgstr ""
|
1135 |
|
1136 |
+
#: src/ml-slider.php:1756
|
1137 |
msgid "No conflict mode"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
+
#: src/ml-slider.php:1759
|
1141 |
msgid "Delay adding the flexslider class to the slideshow"
|
1142 |
msgstr ""
|
1143 |
|
1144 |
+
#: src/ml-slider.php:1774
|
1145 |
msgid "Delete Slideshow"
|
1146 |
msgstr ""
|
1147 |
|
1148 |
+
#: src/ml-slider.php:1801
|
1149 |
msgid "Select slideshow to insert into post"
|
1150 |
msgstr ""
|
1151 |
|
1152 |
+
#: src/ml-slider.php:1804
|
1153 |
msgid "Add slider"
|
1154 |
msgstr ""
|
1155 |
|
1156 |
+
#: src/ml-slider.php:1838
|
1157 |
msgid "Insert MetaSlider"
|
1158 |
msgstr ""
|
1159 |
|
1160 |
+
#: src/ml-slider.php:1840
|
1161 |
msgid "Choose slideshow"
|
1162 |
msgstr ""
|
1163 |
|
1164 |
+
#: src/ml-slider.php:1845
|
1165 |
msgid "Insert slideshow"
|
1166 |
msgstr ""
|
1167 |
|
1168 |
+
#: src/ml-slider.php:1898
|
1169 |
msgid "Take a tour"
|
1170 |
msgstr ""
|
1171 |
|
1172 |
+
#: src/ml-slider.php:1902
|
1173 |
msgid "Support"
|
1174 |
msgstr ""
|
1175 |
|
1176 |
+
#: src/ml-slider.php:1904
|
1177 |
msgid "Premium Support"
|
1178 |
msgstr ""
|
1179 |
|
1180 |
+
#: src/ml-slider.php:1906, src/ml-slider.php:1969
|
1181 |
msgid "Documentation"
|
1182 |
msgstr ""
|
1183 |
|
1184 |
+
#: src/ml-slider.php:1907
|
1185 |
msgid "Leave a review"
|
1186 |
msgstr ""
|
1187 |
|
1188 |
+
#: src/ml-slider.php:1941
|
1189 |
msgid "Upgrade Now"
|
1190 |
msgstr ""
|
1191 |
|
1192 |
+
#: src/ml-slider.php:1943
|
1193 |
msgid "Get The Pro Pack Today!"
|
1194 |
msgstr ""
|
1195 |
|
1196 |
+
#: src/ml-slider.php:1960
|
1197 |
msgid "Switch to Dropdown view"
|
1198 |
msgstr ""
|
1199 |
|
1200 |
+
#: src/ml-slider.php:1960
|
1201 |
msgid "Switch to Tab view"
|
1202 |
msgstr ""
|
1203 |
|
1204 |
+
#: src/ml-slider.php:1962
|
1205 |
msgid "Layout"
|
1206 |
msgstr ""
|
1207 |
|
1208 |
+
#: src/ml-slider.php:1969
|
1209 |
msgid "View The Documentation"
|
1210 |
msgstr ""
|
ml-slider.php
CHANGED
@@ -1,1994 +1,1994 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* MetaSlider. Slideshow plugin for WordPress.
|
4 |
-
*
|
5 |
-
* Plugin Name: MetaSlider
|
6 |
-
* Plugin URI: https://www.metaslider.com
|
7 |
-
* Description: Easy to use slideshow plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides.
|
8 |
-
* Version: 3.6.
|
9 |
-
* Author: Team Updraft
|
10 |
-
* Author URI: https://www.metaslider.com
|
11 |
-
* License: GPL-2.0+
|
12 |
-
* Copyright: 2017 Simba Hosting Ltd
|
13 |
-
*
|
14 |
-
* Text Domain: ml-slider
|
15 |
-
* Domain Path: /languages
|
16 |
-
*/
|
17 |
-
|
18 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
19 |
-
exit; // disable direct access
|
20 |
-
}
|
21 |
-
|
22 |
-
if ( ! class_exists( 'MetaSliderPlugin' ) ) :
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Register the plugin.
|
26 |
-
*
|
27 |
-
* Display the administration panel, insert JavaScript etc.
|
28 |
-
*/
|
29 |
-
class MetaSliderPlugin {
|
30 |
-
|
31 |
-
/**
|
32 |
-
* @var string
|
33 |
-
*/
|
34 |
-
public $version = '3.6.
|
35 |
-
|
36 |
-
/**
|
37 |
-
* @var string The lowest tier price for upgrades
|
38 |
-
*/
|
39 |
-
public $pro_price = '39';
|
40 |
-
|
41 |
-
/**
|
42 |
-
* @var MetaSlider
|
43 |
-
*/
|
44 |
-
public $slider = null;
|
45 |
-
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Init
|
49 |
-
*/
|
50 |
-
public static function init() {
|
51 |
-
|
52 |
-
$metaslider = new self();
|
53 |
-
|
54 |
-
}
|
55 |
-
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Constructor
|
59 |
-
*/
|
60 |
-
public function __construct() {
|
61 |
-
$this->define_constants();
|
62 |
-
$this->includes();
|
63 |
-
$this->setup_actions();
|
64 |
-
$this->setup_filters();
|
65 |
-
$this->setup_shortcode();
|
66 |
-
$this->register_slide_types();
|
67 |
-
$this->admin = new MetaSlider_Admin_Pages($this);
|
68 |
-
}
|
69 |
-
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Define MetaSlider constants
|
73 |
-
*/
|
74 |
-
private function define_constants() {
|
75 |
-
define('METASLIDER_VERSION', $this->version);
|
76 |
-
define('METASLIDER_BASE_URL', trailingslashit(plugins_url('ml-slider')));
|
77 |
-
define('METASLIDER_ASSETS_URL', trailingslashit(METASLIDER_BASE_URL . 'assets'));
|
78 |
-
define('METASLIDER_ADMIN_URL', trailingslashit(METASLIDER_BASE_URL . 'admin'));
|
79 |
-
define('METASLIDER_PATH', plugin_dir_path(__FILE__));
|
80 |
-
define('METASLIDER_PRO_PRICE', $this->pro_price);
|
81 |
-
}
|
82 |
-
|
83 |
-
/**
|
84 |
-
* All MetaSlider classes
|
85 |
-
*/
|
86 |
-
private function plugin_classes() {
|
87 |
-
return array(
|
88 |
-
'metaslider' => METASLIDER_PATH . 'inc/slider/metaslider.class.php',
|
89 |
-
'metacoinslider' => METASLIDER_PATH . 'inc/slider/metaslider.coin.class.php',
|
90 |
-
'metaflexslider' => METASLIDER_PATH . 'inc/slider/metaslider.flex.class.php',
|
91 |
-
'metanivoslider' => METASLIDER_PATH . 'inc/slider/metaslider.nivo.class.php',
|
92 |
-
'metaresponsiveslider' => METASLIDER_PATH . 'inc/slider/metaslider.responsive.class.php',
|
93 |
-
'metaslide' => METASLIDER_PATH . 'inc/slide/metaslide.class.php',
|
94 |
-
'metaimageslide' => METASLIDER_PATH . 'inc/slide/metaslide.image.class.php',
|
95 |
-
'metasliderimagehelper' => METASLIDER_PATH . 'inc/metaslider.imagehelper.class.php',
|
96 |
-
'metaslidersystemcheck' => METASLIDER_PATH . 'inc/metaslider.systemcheck.class.php',
|
97 |
-
'metaslider_widget' => METASLIDER_PATH . 'inc/metaslider.widget.class.php',
|
98 |
-
'simple_html_dom' => METASLIDER_PATH . 'inc/simple_html_dom.php',
|
99 |
-
'metaslider_notices' => METASLIDER_PATH . 'admin/Notices.php',
|
100 |
-
'metaslider_admin_pages' => METASLIDER_PATH . 'admin/Pages.php',
|
101 |
-
'metaslider_tour' => METASLIDER_PATH . 'admin/Tour.php'
|
102 |
-
);
|
103 |
-
}
|
104 |
-
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Load required classes
|
108 |
-
*/
|
109 |
-
private function includes() {
|
110 |
-
require_once(METASLIDER_PATH . 'admin/lib/helpers.php');
|
111 |
-
$autoload_is_disabled = defined( 'METASLIDER_AUTOLOAD_CLASSES' ) && METASLIDER_AUTOLOAD_CLASSES === false;
|
112 |
-
|
113 |
-
if ( function_exists( "spl_autoload_register" ) && ! ( $autoload_is_disabled ) ) {
|
114 |
-
|
115 |
-
// >= PHP 5.2 - Use auto loading
|
116 |
-
if ( function_exists( "__autoload" ) ) {
|
117 |
-
spl_autoload_register( "__autoload" );
|
118 |
-
}
|
119 |
-
|
120 |
-
spl_autoload_register( array( $this, 'autoload' ) );
|
121 |
-
|
122 |
-
} else {
|
123 |
-
|
124 |
-
// < PHP5.2 - Require all classes
|
125 |
-
foreach ( $this->plugin_classes() as $id => $path ) {
|
126 |
-
if ( is_readable( $path ) && ! class_exists( $id ) ) {
|
127 |
-
require_once( $path );
|
128 |
-
}
|
129 |
-
}
|
130 |
-
|
131 |
-
}
|
132 |
-
|
133 |
-
}
|
134 |
-
|
135 |
-
|
136 |
-
/**
|
137 |
-
* Autoload MetaSlider classes to reduce memory consumption
|
138 |
-
*/
|
139 |
-
public function autoload( $class ) {
|
140 |
-
|
141 |
-
$classes = $this->plugin_classes();
|
142 |
-
|
143 |
-
$class_name = strtolower( $class );
|
144 |
-
|
145 |
-
if ( isset( $classes[$class_name] ) && is_readable( $classes[$class_name] ) ) {
|
146 |
-
require_once( $classes[$class_name] );
|
147 |
-
}
|
148 |
-
|
149 |
-
}
|
150 |
-
|
151 |
-
|
152 |
-
/**
|
153 |
-
* Register the [metaslider] shortcode.
|
154 |
-
*/
|
155 |
-
private function setup_shortcode() {
|
156 |
-
|
157 |
-
add_shortcode( 'metaslider', array( $this, 'register_shortcode' ) );
|
158 |
-
add_shortcode( 'ml-slider', array( $this, 'register_shortcode' ) ); // backwards compatibility
|
159 |
-
|
160 |
-
}
|
161 |
-
|
162 |
-
|
163 |
-
/**
|
164 |
-
* Hook MetaSlider into WordPress
|
165 |
-
*/
|
166 |
-
private function setup_actions() {
|
167 |
-
add_action('admin_menu', array($this, 'register_admin_pages'), 9553);
|
168 |
-
add_action('init', array($this, 'register_post_types'));
|
169 |
-
add_action('init', array($this, 'register_taxonomy'));
|
170 |
-
add_action('init', array($this, 'load_plugin_textdomain'));
|
171 |
-
add_action('admin_footer', array($this, 'admin_footer'), 11);
|
172 |
-
add_action('widgets_init', array($this, 'register_metaslider_widget'));
|
173 |
-
|
174 |
-
add_action('admin_post_metaslider_preview', array($this, 'do_preview'));
|
175 |
-
add_action('admin_post_metaslider_switch_view', array($this, 'switch_view'));
|
176 |
-
add_action('admin_post_metaslider_delete_slide', array($this, 'delete_slide'));
|
177 |
-
add_action('admin_post_metaslider_delete_slider', array($this, 'delete_slider'));
|
178 |
-
add_action('admin_post_metaslider_create_slider', array($this, 'create_slider'));
|
179 |
-
add_action('admin_post_metaslider_update_slider', array($this, 'update_slider'));
|
180 |
-
|
181 |
-
add_action('media_upload_vimeo', array($this, 'upgrade_to_pro_tab'));
|
182 |
-
add_action('media_upload_youtube', array($this, 'upgrade_to_pro_tab'));
|
183 |
-
add_action('media_upload_post_feed', array($this, 'upgrade_to_pro_tab'));
|
184 |
-
add_action('media_upload_layer', array($this, 'upgrade_to_pro_tab'));
|
185 |
-
|
186 |
-
// TODO: Refactor to Slide class object
|
187 |
-
add_action('wp_ajax_delete_slide', array($this, 'ajax_delete_slide'));
|
188 |
-
add_action('wp_ajax_undelete_slide', array($this, 'ajax_undelete_slide'));
|
189 |
-
|
190 |
-
// TODO: Make this work
|
191 |
-
// register_activation_hook(plugin_basename(__FILE__), array($this, 'after_activation'));
|
192 |
-
}
|
193 |
-
|
194 |
-
|
195 |
-
/**
|
196 |
-
* Hook MetaSlider into WordPress
|
197 |
-
*/
|
198 |
-
private function setup_filters() {
|
199 |
-
add_filter('media_upload_tabs', array($this, 'custom_media_upload_tab_name'), 998);
|
200 |
-
add_filter('media_view_strings', array($this, 'custom_media_uploader_tabs'), 5);
|
201 |
-
add_filter('media_buttons_context', array($this, 'insert_metaslider_button'));
|
202 |
-
add_filter("plugin_row_meta", array($this, 'get_extra_meta_links'), 10, 4);
|
203 |
-
add_action('admin_head', array($this, 'add_star_styles'));
|
204 |
-
add_action('admin_head', array($this, 'add_tour_nonce_to_activation_page'));
|
205 |
-
|
206 |
-
// html5 compatibility for stylesheets enqueued within <body>
|
207 |
-
add_filter('style_loader_tag', array($this, 'add_property_attribute_to_stylesheet_links'), 11, 2);
|
208 |
-
}
|
209 |
-
|
210 |
-
|
211 |
-
/**
|
212 |
-
* Register MetaSlider widget
|
213 |
-
*/
|
214 |
-
public function register_metaslider_widget() {
|
215 |
-
register_widget('MetaSlider_Widget');
|
216 |
-
}
|
217 |
-
|
218 |
-
|
219 |
-
/**
|
220 |
-
* Register ML Slider post type
|
221 |
-
*/
|
222 |
-
public function register_post_types() {
|
223 |
-
|
224 |
-
$show_ui = false;
|
225 |
-
|
226 |
-
$capability = apply_filters( 'metaslider_capability', 'edit_others_posts' );
|
227 |
-
|
228 |
-
if ( is_admin() && current_user_can( $capability ) && ( isset($_GET['show_ui']) || defined("METASLIDER_DEBUG") && METASLIDER_DEBUG ) ) {
|
229 |
-
$show_ui = true;
|
230 |
-
}
|
231 |
-
|
232 |
-
register_post_type( 'ml-slider', array(
|
233 |
-
'query_var' => false,
|
234 |
-
'rewrite' => false,
|
235 |
-
'public' => false,
|
236 |
-
'exclude_from_search' => true,
|
237 |
-
'publicly_queryable' => false,
|
238 |
-
'show_in_nav_menus' => false,
|
239 |
-
'show_ui' => $show_ui,
|
240 |
-
'labels' => array(
|
241 |
-
'name' => 'MetaSlider'
|
242 |
-
)
|
243 |
-
)
|
244 |
-
);
|
245 |
-
|
246 |
-
register_post_type( 'ml-slide', array(
|
247 |
-
'query_var' => false,
|
248 |
-
'rewrite' => false,
|
249 |
-
'public' => false,
|
250 |
-
'exclude_from_search' => true,
|
251 |
-
'publicly_queryable' => false,
|
252 |
-
'show_in_nav_menus' => false,
|
253 |
-
'show_ui' => $show_ui,
|
254 |
-
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt'),
|
255 |
-
'labels' => array(
|
256 |
-
'name' => 'Meta Slides'
|
257 |
-
)
|
258 |
-
)
|
259 |
-
);
|
260 |
-
|
261 |
-
}
|
262 |
-
|
263 |
-
|
264 |
-
/**
|
265 |
-
* Register taxonomy to store slider => slides relationship
|
266 |
-
*/
|
267 |
-
public function register_taxonomy() {
|
268 |
-
|
269 |
-
$show_ui = false;
|
270 |
-
|
271 |
-
$capability = apply_filters( 'metaslider_capability', 'edit_others_posts' );
|
272 |
-
|
273 |
-
if (is_admin() && current_user_can( $capability ) && ( isset($_GET['show_ui']) || defined("METASLIDER_DEBUG") && METASLIDER_DEBUG ) ) {
|
274 |
-
$show_ui = true;
|
275 |
-
}
|
276 |
-
|
277 |
-
register_taxonomy( 'ml-slider', array('attachment', 'ml-slide'), array(
|
278 |
-
'hierarchical' => true,
|
279 |
-
'public' => false,
|
280 |
-
'query_var' => false,
|
281 |
-
'rewrite' => false,
|
282 |
-
'show_ui' => $show_ui,
|
283 |
-
'label' => "Slider"
|
284 |
-
)
|
285 |
-
);
|
286 |
-
|
287 |
-
}
|
288 |
-
|
289 |
-
|
290 |
-
/**
|
291 |
-
* Register our slide types
|
292 |
-
*/
|
293 |
-
private function register_slide_types() {
|
294 |
-
|
295 |
-
$image = new MetaImageSlide();
|
296 |
-
|
297 |
-
}
|
298 |
-
|
299 |
-
/**
|
300 |
-
* Add the menu pages
|
301 |
-
*/
|
302 |
-
public function register_admin_pages() {
|
303 |
-
if (metaslider_is_pro_active()) {
|
304 |
-
$this->admin->add_page('MetaSlider Pro', 'metaslider');
|
305 |
-
} else {
|
306 |
-
$this->admin->add_page('MetaSlider');
|
307 |
-
}
|
308 |
-
|
309 |
-
if (metaslider_sees_upgrade_page()) {
|
310 |
-
$this->admin->add_page(__('Add-ons', 'ml-slider'), 'upgrade', 'metaslider');
|
311 |
-
}
|
312 |
-
}
|
313 |
-
|
314 |
-
/**
|
315 |
-
* Shortcode used to display slideshow
|
316 |
-
*
|
317 |
-
* @return string HTML output of the shortcode
|
318 |
-
*/
|
319 |
-
public function register_shortcode( $atts ) {
|
320 |
-
|
321 |
-
extract( shortcode_atts( array(
|
322 |
-
'id' => false,
|
323 |
-
'restrict_to' => false
|
324 |
-
), $atts, 'metaslider' ) );
|
325 |
-
|
326 |
-
|
327 |
-
if ( ! $id ) {
|
328 |
-
return false;
|
329 |
-
}
|
330 |
-
|
331 |
-
// handle [metaslider id=123 restrict_to=home]
|
332 |
-
if ($restrict_to && $restrict_to == 'home' && ! is_front_page()) {
|
333 |
-
return;
|
334 |
-
}
|
335 |
-
|
336 |
-
if ($restrict_to && $restrict_to != 'home' && ! is_page( $restrict_to ) ) {
|
337 |
-
return;
|
338 |
-
}
|
339 |
-
|
340 |
-
// we have an ID to work with
|
341 |
-
$slider = get_post( $id );
|
342 |
-
|
343 |
-
// check the slider is published and the ID is correct
|
344 |
-
if ( ! $slider || $slider->post_status != 'publish' || $slider->post_type != 'ml-slider' ) {
|
345 |
-
return "<!-- MetaSlider {$atts['id']} not found -->";
|
346 |
-
}
|
347 |
-
|
348 |
-
// lets go
|
349 |
-
$this->set_slider( $id, $atts );
|
350 |
-
$this->slider->enqueue_scripts();
|
351 |
-
|
352 |
-
return $this->slider->render_public_slides();
|
353 |
-
|
354 |
-
}
|
355 |
-
|
356 |
-
/**
|
357 |
-
* Set first activation option to database
|
358 |
-
*/
|
359 |
-
public function after_activation() {
|
360 |
-
|
361 |
-
// Set date showing the first activation and redirect
|
362 |
-
if (!get_option('ms_was_installed_on')) {
|
363 |
-
update_option('ms_was_installed_on', time());
|
364 |
-
}
|
365 |
-
}
|
366 |
-
|
367 |
-
/**
|
368 |
-
* Initialise translations
|
369 |
-
*/
|
370 |
-
public function load_plugin_textdomain() {
|
371 |
-
|
372 |
-
load_plugin_textdomain( 'ml-slider', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
373 |
-
|
374 |
-
}
|
375 |
-
|
376 |
-
|
377 |
-
/**
|
378 |
-
* Outputs a blank page containing a slideshow preview (for use in the 'Preview' iFrame)
|
379 |
-
*/
|
380 |
-
public function do_preview() {
|
381 |
-
|
382 |
-
remove_action('wp_footer', 'wp_admin_bar_render', 1000);
|
383 |
-
|
384 |
-
if ( isset( $_GET['slider_id'] ) && absint( $_GET['slider_id'] ) > 0 ) {
|
385 |
-
$id = absint( $_GET['slider_id'] );
|
386 |
-
|
387 |
-
?>
|
388 |
-
<!DOCTYPE html>
|
389 |
-
<html>
|
390 |
-
<head>
|
391 |
-
<style type='text/css'>
|
392 |
-
body, html {
|
393 |
-
overflow: hidden;
|
394 |
-
margin: 0;
|
395 |
-
padding: 0;
|
396 |
-
}
|
397 |
-
</style>
|
398 |
-
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
399 |
-
<meta http-equiv="Pragma" content="no-cache" />
|
400 |
-
<meta http-equiv="Expires" content="0" />
|
401 |
-
</head>
|
402 |
-
<body>
|
403 |
-
<?php echo do_shortcode("[metaslider id={$id}]"); ?>
|
404 |
-
<?php wp_footer(); ?>
|
405 |
-
</body>
|
406 |
-
</html>
|
407 |
-
<?php
|
408 |
-
}
|
409 |
-
|
410 |
-
die();
|
411 |
-
|
412 |
-
}
|
413 |
-
|
414 |
-
|
415 |
-
/**
|
416 |
-
* Check our WordPress installation is compatible with MetaSlider
|
417 |
-
*/
|
418 |
-
public function do_system_check() {
|
419 |
-
|
420 |
-
$systemCheck = new MetaSliderSystemCheck();
|
421 |
-
$systemCheck->check();
|
422 |
-
|
423 |
-
}
|
424 |
-
|
425 |
-
|
426 |
-
/**
|
427 |
-
* Update the tab options in the media manager
|
428 |
-
*/
|
429 |
-
public function custom_media_uploader_tabs( $strings ) {
|
430 |
-
|
431 |
-
//update strings
|
432 |
-
if ( ( isset( $_GET['page'] ) && $_GET['page'] == 'metaslider' ) ) {
|
433 |
-
$strings['insertMediaTitle'] = __( "Image", "ml-slider" );
|
434 |
-
$strings['insertIntoPost'] = __( "Add to slideshow", "ml-slider" );
|
435 |
-
// remove options
|
436 |
-
|
437 |
-
$strings_to_remove = array(
|
438 |
-
'createVideoPlaylistTitle',
|
439 |
-
'createGalleryTitle',
|
440 |
-
'insertFromUrlTitle',
|
441 |
-
'createPlaylistTitle'
|
442 |
-
);
|
443 |
-
|
444 |
-
foreach ($strings_to_remove as $string) {
|
445 |
-
if (isset($strings[$string])) {
|
446 |
-
unset($strings[$string]);
|
447 |
-
}
|
448 |
-
}
|
449 |
-
}
|
450 |
-
|
451 |
-
return $strings;
|
452 |
-
|
453 |
-
}
|
454 |
-
|
455 |
-
|
456 |
-
/**
|
457 |
-
* Add extra tabs to the default wordpress Media Manager iframe
|
458 |
-
*
|
459 |
-
* @var array existing media manager tabs
|
460 |
-
*/
|
461 |
-
public function custom_media_upload_tab_name( $tabs ) {
|
462 |
-
|
463 |
-
$metaslider_tabs = array( 'post_feed', 'layer', 'youtube', 'vimeo' );
|
464 |
-
|
465 |
-
// restrict our tab changes to the MetaSlider plugin page
|
466 |
-
if ( ( isset( $_GET['page'] ) && $_GET['page'] == 'metaslider' ) || ( isset( $_GET['tab'] ) && in_array( $_GET['tab'], $metaslider_tabs ) ) ) {
|
467 |
-
$newtabs = array();
|
468 |
-
|
469 |
-
if ( function_exists( 'is_plugin_active' ) && ! is_plugin_active( 'ml-slider-pro/ml-slider-pro.php' ) ) {
|
470 |
-
$newtabs = array(
|
471 |
-
'post_feed' => __( "Post Feed", "metaslider" ),
|
472 |
-
'vimeo' => __( "Vimeo", "metaslider" ),
|
473 |
-
'youtube' => __( "YouTube", "metaslider" ),
|
474 |
-
'layer' => __( "Layer Slide", "metaslider" )
|
475 |
-
);
|
476 |
-
}
|
477 |
-
|
478 |
-
if ( isset( $tabs['nextgen'] ) )
|
479 |
-
unset( $tabs['nextgen'] );
|
480 |
-
|
481 |
-
|
482 |
-
if ( is_array( $tabs ) ) {
|
483 |
-
return array_merge( $tabs, $newtabs );
|
484 |
-
} else {
|
485 |
-
return $newtabs;
|
486 |
-
}
|
487 |
-
|
488 |
-
}
|
489 |
-
|
490 |
-
return $tabs;
|
491 |
-
|
492 |
-
|
493 |
-
}
|
494 |
-
|
495 |
-
|
496 |
-
/**
|
497 |
-
* Set the current slider
|
498 |
-
*/
|
499 |
-
public function set_slider( $id, $shortcode_settings = array() ) {
|
500 |
-
|
501 |
-
$type = 'flex';
|
502 |
-
|
503 |
-
if ( isset( $shortcode_settings['type'] ) ) {
|
504 |
-
$type = $shortcode_settings['type'];
|
505 |
-
} else if ( $settings = get_post_meta( $id, 'ml-slider_settings', true ) ) {
|
506 |
-
if ( is_array( $settings ) && isset( $settings['type'] ) ) {
|
507 |
-
$type = $settings['type'];
|
508 |
-
}
|
509 |
-
}
|
510 |
-
|
511 |
-
if ( ! in_array( $type, array( 'flex', 'coin', 'nivo', 'responsive' ) ) ) {
|
512 |
-
$type = 'flex';
|
513 |
-
}
|
514 |
-
|
515 |
-
$this->slider = $this->load_slider( $type, $id, $shortcode_settings );
|
516 |
-
|
517 |
-
}
|
518 |
-
|
519 |
-
|
520 |
-
/**
|
521 |
-
* Create a new slider based on the sliders type setting
|
522 |
-
*/
|
523 |
-
private function load_slider( $type, $id, $shortcode_settings ) {
|
524 |
-
|
525 |
-
switch ( $type ) {
|
526 |
-
case( 'coin' ):
|
527 |
-
return new MetaCoinSlider( $id, $shortcode_settings );
|
528 |
-
case( 'flex' ):
|
529 |
-
return new MetaFlexSlider( $id, $shortcode_settings );
|
530 |
-
case( 'nivo' ):
|
531 |
-
return new MetaNivoSlider( $id, $shortcode_settings );
|
532 |
-
case( 'responsive' ):
|
533 |
-
return new MetaResponsiveSlider( $id, $shortcode_settings );
|
534 |
-
default:
|
535 |
-
return new MetaFlexSlider( $id, $shortcode_settings );
|
536 |
-
|
537 |
-
}
|
538 |
-
}
|
539 |
-
|
540 |
-
|
541 |
-
/**
|
542 |
-
*
|
543 |
-
*/
|
544 |
-
public function update_slider() {
|
545 |
-
|
546 |
-
check_admin_referer( "metaslider_update_slider" );
|
547 |
-
|
548 |
-
$capability = apply_filters( 'metaslider_capability', 'edit_others_posts' );
|
549 |
-
|
550 |
-
if ( ! current_user_can( $capability ) ) {
|
551 |
-
return;
|
552 |
-
}
|
553 |
-
|
554 |
-
$slider_id = absint( $_POST['slider_id'] );
|
555 |
-
|
556 |
-
if ( ! $slider_id ) {
|
557 |
-
return;
|
558 |
-
}
|
559 |
-
|
560 |
-
// update settings
|
561 |
-
if ( isset( $_POST['settings'] ) ) {
|
562 |
-
|
563 |
-
$new_settings = $_POST['settings'];
|
564 |
-
|
565 |
-
$old_settings = get_post_meta( $slider_id, 'ml-slider_settings', true );
|
566 |
-
|
567 |
-
// convert submitted checkbox values from 'on' or 'off' to boolean values
|
568 |
-
$checkboxes = apply_filters( "metaslider_checkbox_settings", array( 'noConflict', 'fullWidth', 'hoverPause', 'links', 'reverse', 'random', 'printCss', 'printJs', 'smoothHeight', 'center', 'carouselMode', 'autoPlay' ) );
|
569 |
-
|
570 |
-
foreach ( $checkboxes as $checkbox ) {
|
571 |
-
if ( isset( $new_settings[$checkbox] ) && $new_settings[$checkbox] == 'on' ) {
|
572 |
-
$new_settings[$checkbox] = "true";
|
573 |
-
} else {
|
574 |
-
$new_settings[$checkbox] = "false";
|
575 |
-
}
|
576 |
-
}
|
577 |
-
|
578 |
-
$settings = array_merge( (array)$old_settings, $new_settings );
|
579 |
-
|
580 |
-
// update the slider settings
|
581 |
-
update_post_meta( $slider_id, 'ml-slider_settings', $settings );
|
582 |
-
|
583 |
-
}
|
584 |
-
|
585 |
-
// update slideshow title
|
586 |
-
if ( isset( $_POST['title'] ) ) {
|
587 |
-
|
588 |
-
$slide = array(
|
589 |
-
'ID' => $slider_id,
|
590 |
-
'post_title' => esc_html( $_POST['title'] )
|
591 |
-
);
|
592 |
-
|
593 |
-
wp_update_post( $slide );
|
594 |
-
|
595 |
-
}
|
596 |
-
|
597 |
-
// update individual slides
|
598 |
-
if ( isset( $_POST['attachment'] ) ) {
|
599 |
-
|
600 |
-
foreach ( $_POST['attachment'] as $slide_id => $fields ) {
|
601 |
-
do_action( "metaslider_save_{$fields['type']}_slide", $slide_id, $slider_id, $fields );
|
602 |
-
}
|
603 |
-
|
604 |
-
}
|
605 |
-
|
606 |
-
}
|
607 |
-
|
608 |
-
/**
|
609 |
-
* Delete a slide via ajax.
|
610 |
-
* @return string Returns the status of the request
|
611 |
-
*/
|
612 |
-
public function ajax_undelete_slide() {
|
613 |
-
if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'metaslider_undelete_slide')) {
|
614 |
-
return wp_send_json_error(array(
|
615 |
-
'message' => __('The security check failed. Please refresh the page and try again.', 'ml-slider')
|
616 |
-
), 401);
|
617 |
-
}
|
618 |
-
|
619 |
-
$result = $this->undelete_slide(absint($_POST['slide_id']), absint($_POST['slider_id']));
|
620 |
-
|
621 |
-
if (is_wp_error($result)) {
|
622 |
-
return wp_send_json_error(array(
|
623 |
-
'message' => $result->get_error_message()
|
624 |
-
), 409);
|
625 |
-
}
|
626 |
-
|
627 |
-
return wp_send_json_success(array(
|
628 |
-
'message' => __('The slide was successfully restored', 'ml-slider'),
|
629 |
-
), 200);
|
630 |
-
}
|
631 |
-
|
632 |
-
/**
|
633 |
-
* Undeletes a slide.
|
634 |
-
* @param int $slide_id The ID of the slide
|
635 |
-
* @param int $slider_id The ID of the slider (for legacy purposes)
|
636 |
-
* @return mixed
|
637 |
-
*/
|
638 |
-
public function undelete_slide($slide_id, $slider_id) {
|
639 |
-
if ('ml-slide' === get_post_type($slide_id)) {
|
640 |
-
return wp_update_post(array(
|
641 |
-
'ID' => $slide_id,
|
642 |
-
'post_status' => 'publish'
|
643 |
-
), new WP_Error('update_failed', __('The attempt to restore the slide failed.', 'ml-slider'), array('status' => 409)));
|
644 |
-
}
|
645 |
-
|
646 |
-
// Legacy: This removes the relationship between the slider and slide
|
647 |
-
// This restores the relationship between a slide and slider.
|
648 |
-
// If using a newer version, this relationship is never lost on delete.
|
649 |
-
|
650 |
-
// Get the slider's term and apply it to the slide.
|
651 |
-
$term = get_term_by('name', $slider_id, 'ml-slider');
|
652 |
-
return wp_set_object_terms($slide_id, $term->term_id, 'ml-slider');
|
653 |
-
}
|
654 |
-
|
655 |
-
/**
|
656 |
-
* Delete a slide via ajax.
|
657 |
-
*/
|
658 |
-
public function ajax_delete_slide() {
|
659 |
-
if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'metaslider_delete_slide')) {
|
660 |
-
return wp_send_json_error(array(
|
661 |
-
'message' => __('The security check failed. Please refresh the page and try again.', 'ml-slider')
|
662 |
-
), 401);
|
663 |
-
}
|
664 |
-
|
665 |
-
$result = $this->delete_slide(absint($_POST['slide_id']), absint($_POST['slider_id']));
|
666 |
-
|
667 |
-
if (is_wp_error($result)) {
|
668 |
-
return wp_send_json_error(array(
|
669 |
-
'message' => $result->get_error_message()
|
670 |
-
), 409);
|
671 |
-
}
|
672 |
-
|
673 |
-
return wp_send_json_success(array(
|
674 |
-
'message' => __('The slide was successfully trashed', 'ml-slider'),
|
675 |
-
), 200);
|
676 |
-
}
|
677 |
-
|
678 |
-
/**
|
679 |
-
* Delete a slide by either trashing it or for
|
680 |
-
* legacy reasons removing the taxonomy relationship.
|
681 |
-
* @param int $slide_id
|
682 |
-
* @param int $slider_id
|
683 |
-
* @return mixed Will return the terms or WP_Error
|
684 |
-
*/
|
685 |
-
public function delete_slide($slide_id, $slider_id) {
|
686 |
-
if ('ml-slide' === get_post_type($slide_id)) {
|
687 |
-
return wp_update_post(array(
|
688 |
-
'ID' => $slide_id,
|
689 |
-
'post_status' => 'trash'
|
690 |
-
), new WP_Error('update_failed', 'The attempt to delete the slide failed.', array('status' => 409)));
|
691 |
-
}
|
692 |
-
|
693 |
-
// Legacy: This removes the relationship between the slider and slide
|
694 |
-
/* A slider with ID 216 might have a term_id of 7
|
695 |
-
* A slide with ID 217 could have a term_taxonomy_id of 7
|
696 |
-
* Multiple slides would have this term_taxonomy_id of 7 */
|
697 |
-
|
698 |
-
// This returns the term_taxonomy_id (7 from example)
|
699 |
-
$current_terms = wp_get_object_terms($slide_id, 'ml-slider', array('fields' => 'ids'));
|
700 |
-
|
701 |
-
// This returns the term object, named after the slider ID
|
702 |
-
// The $term->term_id would be 7 in the example above
|
703 |
-
// It also includes the count of slides attached to the slider
|
704 |
-
$term = get_term_by('name', $slider_id, 'ml-slider');
|
705 |
-
|
706 |
-
// I'm not sure why this is here. It seems this is only useful if
|
707 |
-
// a slide was attached to multiple sliders. A slide should only
|
708 |
-
// have one $current_terms (7 above)
|
709 |
-
$new_terms = array();
|
710 |
-
foreach ($current_terms as $current_term) {
|
711 |
-
if ($current_term != $term->term_id) {
|
712 |
-
$new_terms[] = absint($current_term);
|
713 |
-
}
|
714 |
-
}
|
715 |
-
|
716 |
-
// This only works becasue $new_terms is an empty array,
|
717 |
-
// which deletes the relationship. I'm leaving the loop above
|
718 |
-
// in case it's here for some legacy reason I'm unaware of.
|
719 |
-
return wp_set_object_terms($slide_id, $new_terms, 'ml-slider');
|
720 |
-
}
|
721 |
-
|
722 |
-
|
723 |
-
/**
|
724 |
-
* Delete a slider (send it to trash)
|
725 |
-
*/
|
726 |
-
public function delete_slider() {
|
727 |
-
|
728 |
-
// check nonce
|
729 |
-
check_admin_referer( "metaslider_delete_slider" );
|
730 |
-
|
731 |
-
$capability = apply_filters( 'metaslider_capability', 'edit_others_posts' );
|
732 |
-
|
733 |
-
if ( ! current_user_can( $capability ) ) {
|
734 |
-
return;
|
735 |
-
}
|
736 |
-
|
737 |
-
$slider_id = absint( $_GET['slider_id'] );
|
738 |
-
|
739 |
-
if ( get_post_type( $slider_id ) != 'ml-slider' ) {
|
740 |
-
wp_redirect( admin_url( "admin.php?page=metaslider" ) );
|
741 |
-
wp_die();
|
742 |
-
}
|
743 |
-
|
744 |
-
// send the post to trash
|
745 |
-
$id = wp_update_post( array(
|
746 |
-
'ID' => $slider_id,
|
747 |
-
'post_status' => 'trash'
|
748 |
-
)
|
749 |
-
);
|
750 |
-
|
751 |
-
$this->delete_all_slides_from_slider($slider_id);
|
752 |
-
|
753 |
-
$slider_id = $this->find_slider( 'modified', 'DESC' );
|
754 |
-
|
755 |
-
wp_redirect( admin_url( "admin.php?page=metaslider&id={$slider_id}" ) );
|
756 |
-
|
757 |
-
}
|
758 |
-
|
759 |
-
|
760 |
-
/**
|
761 |
-
* Trashes all new format slides for a given slideshow ID
|
762 |
-
*
|
763 |
-
* @param int $slider_id
|
764 |
-
* @return int - The ID of the slideshow from which the slides were removed
|
765 |
-
*/
|
766 |
-
private function delete_all_slides_from_slider($slider_id) {
|
767 |
-
// find slides and trash them
|
768 |
-
$args = array(
|
769 |
-
'force_no_custom_order' => true,
|
770 |
-
'orderby' => 'menu_order',
|
771 |
-
'order' => 'ASC',
|
772 |
-
'post_type' => array('ml-slide'),
|
773 |
-
'post_status' => array('publish'),
|
774 |
-
'lang' => '', // polylang, ingore language filter
|
775 |
-
'suppress_filters' => 1, // wpml, ignore language filter
|
776 |
-
'posts_per_page' => -1,
|
777 |
-
'tax_query' => array(
|
778 |
-
array(
|
779 |
-
'taxonomy' => 'ml-slider',
|
780 |
-
'field' => 'slug',
|
781 |
-
'terms' => $slider_id
|
782 |
-
)
|
783 |
-
)
|
784 |
-
);
|
785 |
-
|
786 |
-
$query = new WP_Query( $args );
|
787 |
-
|
788 |
-
while ( $query->have_posts() ) {
|
789 |
-
$query->next_post();
|
790 |
-
$id = $query->post->ID;
|
791 |
-
|
792 |
-
$id = wp_update_post( array(
|
793 |
-
'ID' => $id,
|
794 |
-
'post_status' => 'trash'
|
795 |
-
)
|
796 |
-
);
|
797 |
-
}
|
798 |
-
|
799 |
-
return $slider_id;
|
800 |
-
}
|
801 |
-
|
802 |
-
|
803 |
-
/**
|
804 |
-
*
|
805 |
-
*/
|
806 |
-
public function switch_view() {
|
807 |
-
global $user_ID;
|
808 |
-
|
809 |
-
$view = $_GET['view'];
|
810 |
-
|
811 |
-
$allowed_views = array('tabs', 'dropdown');
|
812 |
-
|
813 |
-
if ( ! in_array( $view, $allowed_views ) ) {
|
814 |
-
return;
|
815 |
-
}
|
816 |
-
|
817 |
-
delete_user_meta( $user_ID, "metaslider_view" );
|
818 |
-
|
819 |
-
if ( $view == 'dropdown' ) {
|
820 |
-
add_user_meta( $user_ID, "metaslider_view", "dropdown");
|
821 |
-
}
|
822 |
-
|
823 |
-
wp_redirect( admin_url( "admin.php?page=metaslider" ) );
|
824 |
-
|
825 |
-
}
|
826 |
-
|
827 |
-
|
828 |
-
/**
|
829 |
-
* Create a new slider
|
830 |
-
*/
|
831 |
-
public function create_slider() {
|
832 |
-
|
833 |
-
// check nonce
|
834 |
-
check_admin_referer( "metaslider_create_slider" );
|
835 |
-
|
836 |
-
$capability = apply_filters( 'metaslider_capability', 'edit_others_posts' );
|
837 |
-
|
838 |
-
if ( ! current_user_can( $capability ) ) {
|
839 |
-
return;
|
840 |
-
}
|
841 |
-
|
842 |
-
$defaults = array();
|
843 |
-
|
844 |
-
// if possible, take a copy of the last edited slider settings in place of default settings
|
845 |
-
if ( $last_modified = $this->find_slider( 'modified', 'DESC' ) ) {
|
846 |
-
$defaults = get_post_meta( $last_modified, 'ml-slider_settings', true );
|
847 |
-
}
|
848 |
-
|
849 |
-
// insert the post
|
850 |
-
$id = wp_insert_post( array(
|
851 |
-
'post_title' => __("New Slideshow", "ml-slider"),
|
852 |
-
'post_status' => 'publish',
|
853 |
-
'post_type' => 'ml-slider'
|
854 |
-
)
|
855 |
-
);
|
856 |
-
|
857 |
-
// use the default settings if we can't find anything more suitable.
|
858 |
-
if ( empty( $defaults ) ) {
|
859 |
-
$slider = new MetaSlider( $id, array() );
|
860 |
-
$defaults = $slider->get_default_parameters();
|
861 |
-
}
|
862 |
-
|
863 |
-
// insert the post meta
|
864 |
-
add_post_meta( $id, 'ml-slider_settings', $defaults, true );
|
865 |
-
|
866 |
-
// create the taxonomy term, the term is the ID of the slider itself
|
867 |
-
wp_insert_term( $id, 'ml-slider' );
|
868 |
-
|
869 |
-
wp_redirect( admin_url( "admin.php?page=metaslider&id={$id}" ) );
|
870 |
-
|
871 |
-
}
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
/**
|
876 |
-
* Find a single slider ID. For example, last edited, or first published.
|
877 |
-
*
|
878 |
-
* @param string $orderby field to order.
|
879 |
-
* @param string $order direction (ASC or DESC).
|
880 |
-
* @return int slider ID.
|
881 |
-
*/
|
882 |
-
private function find_slider( $orderby, $order ) {
|
883 |
-
|
884 |
-
$args = array(
|
885 |
-
'force_no_custom_order' => true,
|
886 |
-
'post_type' => 'ml-slider',
|
887 |
-
'num_posts' => 1,
|
888 |
-
'post_status' => 'publish',
|
889 |
-
'suppress_filters' => 1, // wpml, ignore language filter
|
890 |
-
'orderby' => $orderby,
|
891 |
-
'order' => $order
|
892 |
-
);
|
893 |
-
|
894 |
-
$the_query = new WP_Query( $args );
|
895 |
-
|
896 |
-
while ( $the_query->have_posts() ) {
|
897 |
-
$the_query->the_post();
|
898 |
-
return $the_query->post->ID;
|
899 |
-
}
|
900 |
-
|
901 |
-
wp_reset_query();
|
902 |
-
|
903 |
-
return false;
|
904 |
-
|
905 |
-
}
|
906 |
-
|
907 |
-
|
908 |
-
/**
|
909 |
-
* Get sliders. Returns a nicely formatted array of currently
|
910 |
-
* published sliders.
|
911 |
-
*
|
912 |
-
* @param string $sort_key
|
913 |
-
* @return array all published sliders
|
914 |
-
*/
|
915 |
-
public function all_meta_sliders( $sort_key = 'date' ) {
|
916 |
-
|
917 |
-
$sliders = array();
|
918 |
-
|
919 |
-
// list the tabs
|
920 |
-
$args = array(
|
921 |
-
'post_type' => 'ml-slider',
|
922 |
-
'post_status' => 'publish',
|
923 |
-
'orderby' => $sort_key,
|
924 |
-
'suppress_filters' => 1, // wpml, ignore language filter
|
925 |
-
'order' => 'ASC',
|
926 |
-
'posts_per_page' => -1
|
927 |
-
);
|
928 |
-
|
929 |
-
$args = apply_filters( 'metaslider_all_meta_sliders_args', $args );
|
930 |
-
|
931 |
-
// WP_Query causes issues with other plugins using admin_footer to insert scripts
|
932 |
-
// use get_posts instead
|
933 |
-
$all_sliders = get_posts( $args );
|
934 |
-
|
935 |
-
foreach( $all_sliders as $slideshow ) {
|
936 |
-
|
937 |
-
$active = $this->slider && ( $this->slider->id == $slideshow->ID ) ? true : false;
|
938 |
-
|
939 |
-
$sliders[] = array(
|
940 |
-
'active' => $active,
|
941 |
-
'title' => $slideshow->post_title,
|
942 |
-
'id' => $slideshow->ID
|
943 |
-
);
|
944 |
-
|
945 |
-
}
|
946 |
-
|
947 |
-
return $sliders;
|
948 |
-
|
949 |
-
}
|
950 |
-
|
951 |
-
|
952 |
-
/**
|
953 |
-
* Compare array values
|
954 |
-
*
|
955 |
-
* @param array $elem1
|
956 |
-
* @param array $elem2
|
957 |
-
* @return bool
|
958 |
-
*/
|
959 |
-
private function compare_elems( $elem1, $elem2 ) {
|
960 |
-
|
961 |
-
return $elem1['priority'] > $elem2['priority'];
|
962 |
-
|
963 |
-
}
|
964 |
-
|
965 |
-
|
966 |
-
/**
|
967 |
-
*
|
968 |
-
* @param array $aFields - array of field to render
|
969 |
-
* @return string
|
970 |
-
*/
|
971 |
-
public function build_settings_rows( $aFields ) {
|
972 |
-
|
973 |
-
// order the fields by priority
|
974 |
-
uasort( $aFields, array( $this, "compare_elems" ) );
|
975 |
-
|
976 |
-
$return = "";
|
977 |
-
|
978 |
-
// loop through the array and build the settings HTML
|
979 |
-
foreach ( $aFields as $id => $row ) {
|
980 |
-
// checkbox input type
|
981 |
-
if ( $row['type'] == 'checkbox' ) {
|
982 |
-
$return .= "<tr><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='checkbox' name='settings[{$id}]' {$row['checked']} />";
|
983 |
-
|
984 |
-
if ( isset( $row['after'] ) ) {
|
985 |
-
$return .= "<span class='after'>{$row['after']}</span>";
|
986 |
-
}
|
987 |
-
|
988 |
-
$return .= "</td></tr>";
|
989 |
-
}
|
990 |
-
|
991 |
-
// navigation row
|
992 |
-
if ( $row['type'] == 'navigation' ) {
|
993 |
-
$navigation_row = "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><ul>";
|
994 |
-
|
995 |
-
foreach ( $row['options'] as $k => $v ) {
|
996 |
-
$tease = isset($v['addon_required']) ? 'disabled' : '';
|
997 |
-
|
998 |
-
if ( $row['value'] === true && $k === 'true' ) {
|
999 |
-
$checked = checked( true, true, false );
|
1000 |
-
} else if ( $row['value'] === false && $k === 'false' ) {
|
1001 |
-
$checked = checked( true, true, false );
|
1002 |
-
} else {
|
1003 |
-
$checked = checked( $k, $row['value'], false );
|
1004 |
-
}
|
1005 |
-
|
1006 |
-
$disabled = $k == 'thumbnails' ? 'disabled' : '';
|
1007 |
-
$navigation_row .= "<li><label class='{$tease}'><input {$tease} type='radio' name='settings[{$id}]' value='{$k}' {$checked} {$disabled}/>{$v['label']}</label>";
|
1008 |
-
|
1009 |
-
if (isset($v['addon_required']) && $v['addon_required']) {
|
1010 |
-
$navigation_row .= sprintf(" <a target='_blank' class='get-addon' href='%s' title='%s'>%s</a>", metaslider_get_upgrade_link(), __('Get the add-on pack today!', 'ml-slider'), __('Learn More', 'ml-slider'));
|
1011 |
-
}
|
1012 |
-
|
1013 |
-
$navigation_row .= "</li>";
|
1014 |
-
}
|
1015 |
-
|
1016 |
-
$navigation_row .= "</ul></td></tr>";
|
1017 |
-
|
1018 |
-
$return .= apply_filters( 'metaslider_navigation_options', $navigation_row, $this->slider );
|
1019 |
-
}
|
1020 |
-
|
1021 |
-
// navigation row
|
1022 |
-
if ( $row['type'] == 'radio' ) {
|
1023 |
-
$navigation_row = "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><ul>";
|
1024 |
-
|
1025 |
-
foreach ( $row['options'] as $k => $v ) {
|
1026 |
-
$checked = checked( $k, $row['value'], false );
|
1027 |
-
$class = isset( $v['class'] ) ? $v['class'] : "";
|
1028 |
-
$navigation_row .= "<li><label><input type='radio' name='settings[{$id}]' value='{$k}' {$checked} class='radio {$class}'/>{$v['label']}</label></li>";
|
1029 |
-
}
|
1030 |
-
|
1031 |
-
$navigation_row .= "</ul></td></tr>";
|
1032 |
-
|
1033 |
-
$return .= apply_filters( 'metaslider_navigation_options', $navigation_row, $this->slider );
|
1034 |
-
}
|
1035 |
-
|
1036 |
-
// header/divider row
|
1037 |
-
if ( $row['type'] == 'divider' ) {
|
1038 |
-
$return .= "<tr class='{$row['type']}'><td colspan='2' class='divider'><b>{$row['value']}</b></td></tr>";
|
1039 |
-
}
|
1040 |
-
|
1041 |
-
// slideshow select row
|
1042 |
-
if ( $row['type'] == 'slider-lib' ) {
|
1043 |
-
$return .= "<tr class='{$row['type']}'><td colspan='2' class='slider-lib-row'>";
|
1044 |
-
|
1045 |
-
foreach ( $row['options'] as $k => $v ) {
|
1046 |
-
$checked = checked( $k, $row['value'], false );
|
1047 |
-
$return .= "<input class='select-slider' id='{$k}' rel='{$k}' type='radio' name='settings[type]' value='{$k}' {$checked} />
|
1048 |
-
<label tabindex='0' for='{$k}'>{$v['label']}</label>";
|
1049 |
-
}
|
1050 |
-
|
1051 |
-
$return .= "</td></tr>";
|
1052 |
-
}
|
1053 |
-
|
1054 |
-
// number input type
|
1055 |
-
if ( $row['type'] == 'number' ) {
|
1056 |
-
$return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='number' min='{$row['min']}' max='{$row['max']}' step='{$row['step']}' name='settings[{$id}]' value='" . absint( $row['value'] ) . "' /><span class='after'>{$row['after']}</span></td></tr>";
|
1057 |
-
}
|
1058 |
-
|
1059 |
-
// select drop down
|
1060 |
-
if ( $row['type'] == 'select' ) {
|
1061 |
-
$return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><select class='option {$row['class']} {$id}' name='settings[{$id}]'>";
|
1062 |
-
foreach ( $row['options'] as $k => $v ) {
|
1063 |
-
$selected = selected( $k, $row['value'], false );
|
1064 |
-
$return .= "<option class='{$v['class']}' value='{$k}' {$selected}>{$v['label']}</option>";
|
1065 |
-
}
|
1066 |
-
$return .= "</select></td></tr>";
|
1067 |
-
}
|
1068 |
-
|
1069 |
-
// theme drop down
|
1070 |
-
if ( $row['type'] == 'theme' ) {
|
1071 |
-
$return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><select class='option {$row['class']} {$id}' name='settings[{$id}]'>";
|
1072 |
-
$themes = "";
|
1073 |
-
|
1074 |
-
foreach ( $row['options'] as $k => $v ) {
|
1075 |
-
$selected = selected( $k, $row['value'], false );
|
1076 |
-
$themes .= "<option class='{$v['class']}' value='{$k}' {$selected}>{$v['label']}</option>";
|
1077 |
-
}
|
1078 |
-
|
1079 |
-
$return .= apply_filters( 'metaslider_get_available_themes', $themes, $this->slider->get_setting( 'theme' ) );
|
1080 |
-
|
1081 |
-
$return .= "</select></td></tr>";
|
1082 |
-
}
|
1083 |
-
|
1084 |
-
// text input type
|
1085 |
-
if ( $row['type'] == 'text' ) {
|
1086 |
-
$return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='text' name='settings[{$id}]' value='" . esc_attr( $row['value'] ) . "' /></td></tr>";
|
1087 |
-
}
|
1088 |
-
|
1089 |
-
// text input type
|
1090 |
-
if ( $row['type'] == 'textarea' ) {
|
1091 |
-
$return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\" colspan='2'>{$row['label']}</td></tr><tr><td colspan='2'><textarea class='option {$row['class']} {$id}' name='settings[{$id}]' />{$row['value']}</textarea></td></tr>";
|
1092 |
-
}
|
1093 |
-
|
1094 |
-
// text input type
|
1095 |
-
if ( $row['type'] == 'title' ) {
|
1096 |
-
$return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='text' name='{$id}' value='" . esc_attr( $row['value'] ) . "' /></td></tr>";
|
1097 |
-
}
|
1098 |
-
}
|
1099 |
-
|
1100 |
-
return $return;
|
1101 |
-
|
1102 |
-
}
|
1103 |
-
|
1104 |
-
|
1105 |
-
/**
|
1106 |
-
* Return an indexed array of all easing options
|
1107 |
-
*
|
1108 |
-
* @return array
|
1109 |
-
*/
|
1110 |
-
private function get_easing_options() {
|
1111 |
-
|
1112 |
-
$options = array(
|
1113 |
-
'linear', 'swing', 'jswing', 'easeInQuad', 'easeOutQuad', 'easeInOutQuad',
|
1114 |
-
'easeInCubic', 'easeOutCubic', 'easeInOutCubic', 'easeInQuart',
|
1115 |
-
'easeOutQuart', 'easeInOutQuart', 'easeInQuint', 'easeOutQuint',
|
1116 |
-
'easeInOutQuint', 'easeInSine', 'easeOutSine', 'easeInOutSine',
|
1117 |
-
'easeInExpo', 'easeOutExpo', 'easeInOutExpo', 'easeInCirc', 'easeOutCirc',
|
1118 |
-
'easeInOutCirc', 'easeInElastic', 'easeOutElastic', 'easeInOutElastic',
|
1119 |
-
'easeInBack', 'easeOutBack', 'easeInOutBack', 'easeInBounce', 'easeOutBounce',
|
1120 |
-
'easeInOutBounce'
|
1121 |
-
);
|
1122 |
-
|
1123 |
-
foreach ( $options as $option ) {
|
1124 |
-
$return[$option] = array(
|
1125 |
-
'label' => ucfirst( preg_replace( '/(\w+)([A-Z])/U', '\\1 \\2', $option ) ),
|
1126 |
-
'class' => ''
|
1127 |
-
);
|
1128 |
-
}
|
1129 |
-
|
1130 |
-
return $return;
|
1131 |
-
|
1132 |
-
}
|
1133 |
-
|
1134 |
-
/**
|
1135 |
-
* Output the slideshow selector.
|
1136 |
-
*
|
1137 |
-
* Show tabs or a dropdown list depending on the users saved preference.
|
1138 |
-
*/
|
1139 |
-
public function print_slideshow_selector() {
|
1140 |
-
global $user_ID;
|
1141 |
-
|
1142 |
-
// First check if we have any slideshows yet
|
1143 |
-
if ($tabs = $this->all_meta_sliders()) {
|
1144 |
-
|
1145 |
-
// Next check if they have the tabs view selected
|
1146 |
-
if ('tabs' == $this->get_view()) {
|
1147 |
-
|
1148 |
-
// Render the tabs
|
1149 |
-
echo "<div class='nav-tab-wrapper'>";
|
1150 |
-
foreach ($tabs as $tab) {
|
1151 |
-
if ( $tab['active'] ) {
|
1152 |
-
echo "<div class='nav-tab nav-tab-active'><input class='no_last_pass' type='text' name='title' value='" . esc_attr($tab['title']) . "'></div>";
|
1153 |
-
} else {
|
1154 |
-
echo "<a href='?page=metaslider&id={$tab['id']}' title= '" . esc_attr($tab['title']) . "' class='nav-tab'>" . esc_html( $tab['title'] ) . "</a>";
|
1155 |
-
}
|
1156 |
-
}
|
1157 |
-
echo $this->get_add_slideshow_button("New", 'nav-tab');
|
1158 |
-
echo "</div>";
|
1159 |
-
|
1160 |
-
// This will render the select dropdown view
|
1161 |
-
// TODO make this resemble the WP Nav menu UI perhaps
|
1162 |
-
} else {
|
1163 |
-
echo "<div class='manage-menus'><label for='select-slideshow' class='selected-menu'>" . __("Select Slideshow", "ml-slider") . ": </label>";
|
1164 |
-
echo "<select name='select-slideshow' onchange='if (this.value) window.location.href=this.value'>";
|
1165 |
-
|
1166 |
-
$tabs = $this->all_meta_sliders('title');
|
1167 |
-
foreach ($tabs as $tab) {
|
1168 |
-
$selected = $tab['active'] ? " selected" : "";
|
1169 |
-
if ($tab['active']) {
|
1170 |
-
$title = $tab['title'];
|
1171 |
-
}
|
1172 |
-
echo "<option value='?page=metaslider&id={$tab['id']}'{$selected}>{$tab['title']}</option>";
|
1173 |
-
}
|
1174 |
-
echo "</select>";
|
1175 |
-
echo "<span class='add-new-menu-action'> " . __( 'or', "ml-slider" ) . " ";
|
1176 |
-
echo "<a href='". wp_nonce_url(admin_url("admin-post.php?action=metaslider_create_slider"), "metaslider_create_slider") ."' id='create_new_tab' class='' title='" . __('Create a New Slideshow', 'ml-slider') . "'>create a new slideshow</a>";
|
1177 |
-
echo "</span></div>";
|
1178 |
-
}
|
1179 |
-
|
1180 |
-
// This section is shown when there are no slideshows
|
1181 |
-
} else {
|
1182 |
-
echo "<div class='nav-tab-wrapper'>";
|
1183 |
-
echo "<div class='fake-tabs nav-tab nav-tab-active'><span class='blurred-out'>" . __('New Slideshow', 'ml-slider') ."</span></div>";
|
1184 |
-
echo $this->get_add_slideshow_button("New", 'nav-tab');
|
1185 |
-
echo "</div>";
|
1186 |
-
}
|
1187 |
-
}
|
1188 |
-
|
1189 |
-
/**
|
1190 |
-
* Return a button to sadd a new slideshow.
|
1191 |
-
*/
|
1192 |
-
protected function get_add_slideshow_button($text = '', $classes = '') {
|
1193 |
-
$add_url = wp_nonce_url(admin_url("admin-post.php?action=metaslider_create_slider"), "metaslider_create_slider");
|
1194 |
-
if ('' == $text) {
|
1195 |
-
$text = __('Add a New Slideshow', 'ml-slider');
|
1196 |
-
}
|
1197 |
-
return "<a href='{$add_url}' id='create_new_tab' class='ml-add-new {$classes}' title='" . __('Add a New Slideshow', 'ml-slider') . "'><i><svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-plus-circle'><circle cx='12' cy='12' r='10'/><line x1='12' y1='8' x2='12' y2='16'/><line x1='8' y1='12' x2='16' y2='12'/></svg></i> {$text}</a>";
|
1198 |
-
}
|
1199 |
-
|
1200 |
-
/**
|
1201 |
-
* Return the users saved view preference.
|
1202 |
-
*/
|
1203 |
-
public function get_view() {
|
1204 |
-
global $user_ID;
|
1205 |
-
|
1206 |
-
if ( get_user_meta( $user_ID, "metaslider_view", true ) ) {
|
1207 |
-
return get_user_meta( $user_ID, "metaslider_view", true );
|
1208 |
-
}
|
1209 |
-
|
1210 |
-
return 'tabs';
|
1211 |
-
}
|
1212 |
-
|
1213 |
-
|
1214 |
-
/**
|
1215 |
-
* Render the admin page (tabs, slides, settings)
|
1216 |
-
*/
|
1217 |
-
public function render_admin_page() {
|
1218 |
-
|
1219 |
-
// Default to the most recently modified slider
|
1220 |
-
$slider_id = $this->find_slider('modified', 'DESC');
|
1221 |
-
|
1222 |
-
// If the id parameter exists, verify and use that.
|
1223 |
-
if (isset($_REQUEST['id']) && $id = $_REQUEST['id']) {
|
1224 |
-
if (in_array(get_post_status(absint($id)), array('publish', 'inherit'))) {
|
1225 |
-
$slider_id = $id;
|
1226 |
-
}
|
1227 |
-
}
|
1228 |
-
|
1229 |
-
// "Set the slider"
|
1230 |
-
// TODO figure out what this does and if it can be better stated
|
1231 |
-
// Perhaps maybe "apply_settings()" or something.
|
1232 |
-
if ($slider_id) {
|
1233 |
-
$this->set_slider($slider_id);
|
1234 |
-
}
|
1235 |
-
|
1236 |
-
echo "<div class='wrap metaslider-ui-top' style='margin-top:0;'>";
|
1237 |
-
echo $this->documentation_button();
|
1238 |
-
echo $this->toggle_layout_button();
|
1239 |
-
|
1240 |
-
if (metaslider_sees_call_to_action()) {
|
1241 |
-
echo $this->upgrade_to_pro_top_button();
|
1242 |
-
}
|
1243 |
-
echo "</div>";
|
1244 |
-
|
1245 |
-
$this->do_system_check();
|
1246 |
-
|
1247 |
-
$slider_id = $this->slider ? $this->slider->id : 0;
|
1248 |
-
|
1249 |
-
?>
|
1250 |
-
|
1251 |
-
<script type='text/javascript'>
|
1252 |
-
var metaslider_slider_id = <?php echo $slider_id; ?>;
|
1253 |
-
</script>
|
1254 |
-
|
1255 |
-
<div class="wrap metaslider metaslider-ui">
|
1256 |
-
<h1 class="wp-heading-inline metaslider-title">
|
1257 |
-
<img width=50 height=50 src="<?php echo METASLIDER_ADMIN_URL ?>images/metaslider_logo_large.png" alt="MetaSlider">
|
1258 |
-
MetaSlider
|
1259 |
-
<?php if (metaslider_is_pro_active()) {
|
1260 |
-
echo ' Pro';
|
1261 |
-
} ?>
|
1262 |
-
</h1>
|
1263 |
-
<?php if (metaslider_sees_notices($this)) {
|
1264 |
-
echo $this->notices->do_notice(false, 'header', true);
|
1265 |
-
} ?>
|
1266 |
-
<form accept-charset="UTF-8" action="<?php echo admin_url( 'admin-post.php'); ?>" method="post">
|
1267 |
-
<input type="hidden" name="action" value="metaslider_update_slider">
|
1268 |
-
<input type="hidden" name="slider_id" value="<?php echo $slider_id; ?>">
|
1269 |
-
<?php wp_nonce_field( 'metaslider_update_slider' ); ?>
|
1270 |
-
|
1271 |
-
<?php $this->print_slideshow_selector(); ?>
|
1272 |
-
|
1273 |
-
<?php if ( ! $this->slider ) return; ?>
|
1274 |
-
|
1275 |
-
<div id='poststuff' class="metaslider-inner wp-clearfix">
|
1276 |
-
<div id='post-body' class='metabox-holder columns-2'>
|
1277 |
-
|
1278 |
-
<div id='post-body-content'>
|
1279 |
-
<div class="left">
|
1280 |
-
|
1281 |
-
<?php do_action( "metaslider_admin_table_before", $this->slider->id ); ?>
|
1282 |
-
|
1283 |
-
<table class="widefat sortable metaslider-slides-container">
|
1284 |
-
<thead>
|
1285 |
-
<tr>
|
1286 |
-
<?php if (metaslider_viewing_trashed_slides($this->slider->id)) {
|
1287 |
-
|
1288 |
-
// If they are on the trash page, show them?>
|
1289 |
-
<th class="trashed-header">
|
1290 |
-
<h3><i><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-trash-2"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg></i> <?php _e('Trashed Slides', 'ml-slider'); ?></h3>
|
1291 |
-
<small> <?php printf(__('<a href="%s">view active</a>', 'ml-slider'), admin_url("?page=metaslider&id={$this->slider->id}")); ?></small>
|
1292 |
-
</th>
|
1293 |
-
<?php } else { ?>
|
1294 |
-
<th class="slider-title" colspan="2">
|
1295 |
-
<h3 class="alignleft"><?php echo get_the_title($this->slider->id) ?></h3>
|
1296 |
-
<input class="metaslider-shortcode" readonly='readonly' onclick="this.select()" type='text' value='[metaslider id=<?php echo $this->slider->id ?>]'>
|
1297 |
-
<?php if (!metaslider_viewing_trashed_slides($this->slider->id)) {
|
1298 |
-
|
1299 |
-
// Remove the actions on trashed view?>
|
1300 |
-
<button class='ml-button ml-has-icon ml-skinless-button alignright add-slide' data-editor='content' title='<?php _e( "Add a New Slide", "ml-slider" ) ?>'>
|
1301 |
-
<i style="top:0;"><svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus-circle"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="16"/><line x1="8" y1="12" x2="16" y2="12"/></svg></i>
|
1302 |
-
<span><?php _e("Add Slide", "ml-slider") ?></span>
|
1303 |
-
</button>
|
1304 |
-
<?php } ?>
|
1305 |
-
<?php do_action( "metaslider_admin_table_header_right", $this->slider->id ); ?>
|
1306 |
-
</th>
|
1307 |
-
<?php } ?>
|
1308 |
-
</tr>
|
1309 |
-
</thead>
|
1310 |
-
|
1311 |
-
<tbody>
|
1312 |
-
<?php
|
1313 |
-
$this->slider->render_admin_slides();
|
1314 |
-
?>
|
1315 |
-
</tbody>
|
1316 |
-
</table>
|
1317 |
-
|
1318 |
-
<?php do_action( "metaslider_admin_table_after", $this->slider->id ); ?>
|
1319 |
-
|
1320 |
-
</div>
|
1321 |
-
</div>
|
1322 |
-
|
1323 |
-
<div id="postbox-container-1" class="postbox-container ml-sidebar metaslider-settings-area">
|
1324 |
-
<div class='right'>
|
1325 |
-
<?php if (metaslider_viewing_trashed_slides($this->slider->id)) {
|
1326 |
-
|
1327 |
-
// Show a notice explaining the trash?>
|
1328 |
-
<div class="ms-postbox trashed-notice">
|
1329 |
-
<div class="notice-info"><?php printf(__('You are viewing slides that have been trashed, which will be automatically deleted in %s days. Click <a href="%s">here</a> to view active slides.', 'ml-slider'), EMPTY_TRASH_DAYS, admin_url("?page=metaslider&id={$this->slider->id}")); ?></div>
|
1330 |
-
|
1331 |
-
<?php // TODO this is a temp fix to avoid a compatability check in pro
|
1332 |
-
echo "<input type='checkbox' style='display:none;' checked class='select-slider' rel='flex'></inpu>";
|
1333 |
-
?>
|
1334 |
-
</div>
|
1335 |
-
<?php } else {?>
|
1336 |
-
<div class="ms-postbox" id="metaslider_configuration">
|
1337 |
-
<div class='configuration metaslider-actions'>
|
1338 |
-
<button class='metaslider-preview ml-button ml-has-icon ml-skinless-button' type='submit' id='ms-preview' title='<?php _e("Preview Slideshow", "ml-slider") ?>' data-slider_id='<?php echo $this->slider->id ?>' data-slider_width='<?php echo $this->slider->get_setting("width"); ?>' data-slider_height='<?php echo $this->slider->get_setting("height") ?>'>
|
1339 |
-
<i><svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg></i>
|
1340 |
-
<span><?php _e("Preview", "ml-slider") ?></span>
|
1341 |
-
</button>
|
1342 |
-
<button class='alignright button button-primary' type='submit' name='save' id='ms-save'>
|
1343 |
-
<?php _e("Save", "ml-slider"); ?>
|
1344 |
-
</button>
|
1345 |
-
<span class="spinner"></span>
|
1346 |
-
</div>
|
1347 |
-
<div class="inside wp-clearfix">
|
1348 |
-
<table class="settings">
|
1349 |
-
<tbody>
|
1350 |
-
<?php
|
1351 |
-
$aFields = array(
|
1352 |
-
'type' => array(
|
1353 |
-
'priority' => 0,
|
1354 |
-
'type' => 'slider-lib',
|
1355 |
-
'value' => $this->slider->get_setting('type'),
|
1356 |
-
'options' => array(
|
1357 |
-
'flex' => array('label' => "FlexSlider"),
|
1358 |
-
'responsive' => array('label' => "R. Slides"),
|
1359 |
-
'nivo' => array('label' => "Nivo Slider"),
|
1360 |
-
'coin' => array('label' => "Coin Slider")
|
1361 |
-
)
|
1362 |
-
),
|
1363 |
-
'width' => array(
|
1364 |
-
'priority' => 10,
|
1365 |
-
'type' => 'number',
|
1366 |
-
'size' => 3,
|
1367 |
-
'min' => 0,
|
1368 |
-
'max' => 9999,
|
1369 |
-
'step' => 1,
|
1370 |
-
'value' => $this->slider->get_setting( 'width' ),
|
1371 |
-
'label' => __( "Width", "ml-slider" ),
|
1372 |
-
'class' => 'coin flex responsive nivo',
|
1373 |
-
'helptext' => __( "Slideshow width", "ml-slider" ),
|
1374 |
-
'after' => __( "px", "ml-slider" )
|
1375 |
-
),
|
1376 |
-
'height' => array(
|
1377 |
-
'priority' => 20,
|
1378 |
-
'type' => 'number',
|
1379 |
-
'size' => 3,
|
1380 |
-
'min' => 0,
|
1381 |
-
'max' => 9999,
|
1382 |
-
'step' => 1,
|
1383 |
-
'value' => $this->slider->get_setting( 'height' ),
|
1384 |
-
'label' => __( "Height", "ml-slider" ),
|
1385 |
-
'class' => 'coin flex responsive nivo',
|
1386 |
-
'helptext' => __( "Slideshow height", "ml-slider" ),
|
1387 |
-
'after' => __( "px", "ml-slider" )
|
1388 |
-
),
|
1389 |
-
'effect' => array(
|
1390 |
-
'priority' => 30,
|
1391 |
-
'type' => 'select',
|
1392 |
-
'value' => $this->slider->get_setting( 'effect' ),
|
1393 |
-
'label' => __( "Effect", "ml-slider" ),
|
1394 |
-
'class' => 'effect coin flex responsive nivo',
|
1395 |
-
'helptext' => __( "Slide transition effect", "ml-slider" ),
|
1396 |
-
'options' => array(
|
1397 |
-
'random' => array( 'class' => 'option coin nivo' , 'label' => __( "Random", "ml-slider" ) ),
|
1398 |
-
'swirl' => array( 'class' => 'option coin', 'label' => __( "Swirl", "ml-slider" ) ),
|
1399 |
-
'rain' => array( 'class' => 'option coin', 'label' => __( "Rain", "ml-slider" ) ),
|
1400 |
-
'straight' => array( 'class' => 'option coin', 'label' => __( "Straight", "ml-slider" ) ),
|
1401 |
-
'sliceDown' => array( 'class' => 'option nivo', 'label' => __( "Slide Down", "ml-slider" ) ),
|
1402 |
-
'sliceUp' => array( 'class' => 'option nivo', 'label' => __( "Slice Up", "ml-slider" ) ),
|
1403 |
-
'sliceUpLeft' => array( 'class' => 'option nivo', 'label' => __( "Slide Up Left", "ml-slider" ) ),
|
1404 |
-
'sliceUpDown' => array( 'class' => 'option nivo', 'label' => __( "Slice Up Down", "ml-slider" ) ),
|
1405 |
-
'slideUpDownLeft' => array( 'class' => 'option nivo', 'label' => __( "Slide Up Down Left", "ml-slider" ) ),
|
1406 |
-
'fold' => array( 'class' => 'option nivo', 'label' => __( "Fold", "ml-slider" ) ),
|
1407 |
-
'fade' => array( 'class' => 'option nivo flex responsive', 'label' => __( "Fade", "ml-slider" ) ),
|
1408 |
-
'slideInRight' => array( 'class' => 'option nivo', 'label' => __( "Slide In Right", "ml-slider" ) ),
|
1409 |
-
'slideInLeft' => array( 'class' => 'option nivo', 'label' => __( "Slide In Left", "ml-slider" ) ),
|
1410 |
-
'boxRandom' => array( 'class' => 'option nivo', 'label' => __( "Box Random", "ml-slider" ) ),
|
1411 |
-
'boxRain' => array( 'class' => 'option nivo', 'label' => __( "Box Rain", "ml-slider" ) ),
|
1412 |
-
'boxRainReverse' => array( 'class' => 'option nivo', 'label' => __( "Box Rain Reverse", "ml-slider" ) ),
|
1413 |
-
'boxRainGrowReverse' => array( 'class' => 'option nivo', 'label' => __( "Box Rain Grow Reverse", "ml-slider" ) ),
|
1414 |
-
'slide' => array( 'class' => 'option flex', 'label' => __( "Slide", "ml-slider" ) )
|
1415 |
-
),
|
1416 |
-
),
|
1417 |
-
'theme' => array(
|
1418 |
-
'priority' => 40,
|
1419 |
-
'type' => 'theme',
|
1420 |
-
'value' => $this->slider->get_setting( 'theme' ),
|
1421 |
-
'label' => __( "Theme", "ml-slider" ),
|
1422 |
-
'class' => 'effect coin flex responsive nivo',
|
1423 |
-
'helptext' => __( "Slideshow theme", "ml-slider" ),
|
1424 |
-
'options' => array(
|
1425 |
-
'default' => array( 'class' => 'option nivo flex coin responsive' , 'label' => __( "Default", "ml-slider" ) ),
|
1426 |
-
'dark' => array( 'class' => 'option nivo', 'label' => __( "Dark (Nivo)", "ml-slider" ) ),
|
1427 |
-
'light' => array( 'class' => 'option nivo', 'label' => __( "Light (Nivo)", "ml-slider" ) ),
|
1428 |
-
'bar' => array( 'class' => 'option nivo', 'label' => __( "Bar (Nivo)", "ml-slider" ) ),
|
1429 |
-
),
|
1430 |
-
),
|
1431 |
-
'links' => array(
|
1432 |
-
'priority' => 50,
|
1433 |
-
'type' => 'checkbox',
|
1434 |
-
'label' => __( "Arrows", "ml-slider" ),
|
1435 |
-
'class' => 'option coin flex nivo responsive',
|
1436 |
-
'checked' => $this->slider->get_setting( 'links' ) == 'true' ? 'checked' : '',
|
1437 |
-
'helptext' => __( "Show the previous/next arrows", "ml-slider" )
|
1438 |
-
),
|
1439 |
-
'navigation' => array(
|
1440 |
-
'priority' => 60,
|
1441 |
-
'type' => 'navigation',
|
1442 |
-
'label' => __("Navigation", "ml-slider"),
|
1443 |
-
'class' => 'option coin flex nivo responsive',
|
1444 |
-
'value' => $this->slider->get_setting('navigation'),
|
1445 |
-
'helptext' => __("Show the slide navigation bullets", "ml-slider"),
|
1446 |
-
'options' => array(
|
1447 |
-
'false' => array('label' => __("Hidden", "ml-slider")),
|
1448 |
-
'true' => array('label' => __("Dots", "ml-slider")),
|
1449 |
-
'thumbs' => array(
|
1450 |
-
'label' => __("Thumbnail", "ml-slider"),
|
1451 |
-
'addon_required' => true
|
1452 |
-
),
|
1453 |
-
'filmstrip' => array(
|
1454 |
-
'label' => __("Filmstrip", "ml-slider"),
|
1455 |
-
'addon_required' => true
|
1456 |
-
),
|
1457 |
-
)
|
1458 |
-
),
|
1459 |
-
);
|
1460 |
-
|
1461 |
-
if ( $this->get_view() == 'dropdown' ) {
|
1462 |
-
$aFields['title'] = array(
|
1463 |
-
'type' => 'title',
|
1464 |
-
'priority' => 5,
|
1465 |
-
'class' => 'option flex nivo responsive coin',
|
1466 |
-
'value' => get_the_title($this->slider->id),
|
1467 |
-
'label' => __( "Title", "ml-slider" ),
|
1468 |
-
'helptext' => __( "Slideshow title", "ml-slider" )
|
1469 |
-
);
|
1470 |
-
}
|
1471 |
-
|
1472 |
-
$aFields = apply_filters( 'metaslider_basic_settings', $aFields, $this->slider );
|
1473 |
-
|
1474 |
-
echo $this->build_settings_rows( $aFields );
|
1475 |
-
?>
|
1476 |
-
</tbody>
|
1477 |
-
</table>
|
1478 |
-
|
1479 |
-
|
1480 |
-
<?php // Show the restore button if there are trashed posts
|
1481 |
-
// Also, render but hide the link in case we want to show
|
1482 |
-
// it when the user deletes their first slide
|
1483 |
-
$count = count(metaslider_has_trashed_slides($this->slider->id));
|
1484 |
-
if (!metaslider_viewing_trashed_slides($this->slider->id)) { ?>
|
1485 |
-
<a <?php echo $count ? '' : "style='display:none;'" ?> class="restore-slide-link" title="<?php _e('View trashed slides', 'ml-slider'); ?>" href="<?php echo admin_url("?page=metaslider&id={$this->slider->id}&show_trashed=true"); ?>">
|
1486 |
-
<i><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-trash-2"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg></i><?php echo __('Trash', 'ml-slider'); if ($count) echo " <span>({$count})</span>";?>
|
1487 |
-
</a>
|
1488 |
-
<?php } ?>
|
1489 |
-
</div>
|
1490 |
-
</div>
|
1491 |
-
|
1492 |
-
<div class="ms-postbox ms-toggle closed" id="metaslider_advanced_settings">
|
1493 |
-
<div class="handlediv" title="Click to toggle"><br></div><h3 class="hndle"><span><?php _e( "Advanced Settings", "ml-slider" ) ?></span></h3>
|
1494 |
-
<div class="inside">
|
1495 |
-
<table>
|
1496 |
-
<tbody>
|
1497 |
-
<?php
|
1498 |
-
$aFields = array(
|
1499 |
-
'fullWidth' => array(
|
1500 |
-
'priority' => 5,
|
1501 |
-
'type' => 'checkbox',
|
1502 |
-
'label' => __( "Stretch", "ml-slider" ),
|
1503 |
-
'class' => 'option flex nivo responsive',
|
1504 |
-
'after' => __( "100% wide output", "ml-slider" ),
|
1505 |
-
'checked' => $this->slider->get_setting( 'fullWidth' ) == 'true' ? 'checked' : '',
|
1506 |
-
'helptext' => __( "Stretch the slideshow output to fill it's parent container", "ml-slider" )
|
1507 |
-
),
|
1508 |
-
'center' => array(
|
1509 |
-
'priority' => 10,
|
1510 |
-
'type' => 'checkbox',
|
1511 |
-
'label' => __( "Center align", "ml-slider" ),
|
1512 |
-
'class' => 'option coin flex nivo responsive',
|
1513 |
-
'checked' => $this->slider->get_setting( 'center' ) == 'true' ? 'checked' : '',
|
1514 |
-
'helptext' => __( "Center align the slideshow", "ml-slider" )
|
1515 |
-
),
|
1516 |
-
'autoPlay' => array(
|
1517 |
-
'priority' => 20,
|
1518 |
-
'type' => 'checkbox',
|
1519 |
-
'label' => __( "Auto play", "ml-slider" ),
|
1520 |
-
'class' => 'option flex nivo responsive',
|
1521 |
-
'checked' => $this->slider->get_setting( 'autoPlay' ) == 'true' ? 'checked' : '',
|
1522 |
-
'helptext' => __( "Transition between slides automatically", "ml-slider" )
|
1523 |
-
),
|
1524 |
-
'smartCrop' => array(
|
1525 |
-
'priority' => 30,
|
1526 |
-
'type' => 'select',
|
1527 |
-
'label' => __( "Image Crop", "ml-slider" ),
|
1528 |
-
'class' => 'option coin flex nivo responsive',
|
1529 |
-
'value' => $this->slider->get_setting( 'smartCrop' ),
|
1530 |
-
'options' => array(
|
1531 |
-
'true' => array( 'label' => __( "Smart Crop", "ml-slider" ), 'class' => '' ),
|
1532 |
-
'false' => array( 'label' => __( "Standard", "ml-slider" ), 'class' => '' ),
|
1533 |
-
'disabled' => array( 'label' => __( "Disabled", "ml-slider" ), 'class' => '' ),
|
1534 |
-
'disabled_pad' => array( 'label' => __( "Disabled (Smart Pad)", "ml-slider" ), 'class' => 'option flex' ),
|
1535 |
-
),
|
1536 |
-
'helptext' => __( "Smart Crop ensures your responsive slides are cropped to a ratio that results in a consistent slideshow size", "ml-slider" )
|
1537 |
-
),
|
1538 |
-
'carouselMode' => array(
|
1539 |
-
'priority' => 40,
|
1540 |
-
'type' => 'checkbox',
|
1541 |
-
'label' => __( "Carousel mode", "ml-slider" ),
|
1542 |
-
'class' => 'option flex showNextWhenChecked',
|
1543 |
-
'checked' => $this->slider->get_setting( 'carouselMode' ) == 'true' ? 'checked' : '',
|
1544 |
-
'helptext' => __( "Display multiple slides at once. Slideshow output will be 100% wide.", "ml-slider" )
|
1545 |
-
),
|
1546 |
-
'carouselMargin' => array(
|
1547 |
-
'priority' => 45,
|
1548 |
-
'min' => 0,
|
1549 |
-
'max' => 9999,
|
1550 |
-
'step' => 1,
|
1551 |
-
'type' => 'number',
|
1552 |
-
'label' => __( "Carousel margin", "ml-slider" ),
|
1553 |
-
'class' => 'option flex',
|
1554 |
-
'value' => $this->slider->get_setting( 'carouselMargin' ),
|
1555 |
-
'helptext' => __( "Pixel margin between slides in carousel.", "ml-slider" ),
|
1556 |
-
'after' => __( "px", "ml-slider" )
|
1557 |
-
),
|
1558 |
-
'random' => array(
|
1559 |
-
'priority' => 50,
|
1560 |
-
'type' => 'checkbox',
|
1561 |
-
'label' => __( "Random", "ml-slider" ),
|
1562 |
-
'class' => 'option coin flex nivo responsive',
|
1563 |
-
'checked' => $this->slider->get_setting( 'random' ) == 'true' ? 'checked' : '',
|
1564 |
-
'helptext' => __( "Randomise the order of the slides", "ml-slider" )
|
1565 |
-
),
|
1566 |
-
'hoverPause' => array(
|
1567 |
-
'priority' => 60,
|
1568 |
-
'type' => 'checkbox',
|
1569 |
-
'label' => __( "Hover pause", "ml-slider" ),
|
1570 |
-
'class' => 'option coin flex nivo responsive',
|
1571 |
-
'checked' => $this->slider->get_setting( 'hoverPause' ) == 'true' ? 'checked' : '',
|
1572 |
-
'helptext' => __( "Pause the slideshow when hovering over slider, then resume when no longer hovering.", "ml-slider" )
|
1573 |
-
),
|
1574 |
-
'reverse' => array(
|
1575 |
-
'priority' => 70,
|
1576 |
-
'type' => 'checkbox',
|
1577 |
-
'label' => __( "Reverse", "ml-slider" ),
|
1578 |
-
'class' => 'option flex',
|
1579 |
-
'checked' => $this->slider->get_setting( 'reverse' ) == 'true' ? 'checked' : '',
|
1580 |
-
'helptext' => __( "Reverse the animation direction", "ml-slider" )
|
1581 |
-
),
|
1582 |
-
'delay' => array(
|
1583 |
-
'priority' => 80,
|
1584 |
-
'type' => 'number',
|
1585 |
-
'size' => 3,
|
1586 |
-
'min' => 500,
|
1587 |
-
'max' => 10000,
|
1588 |
-
'step' => 100,
|
1589 |
-
'value' => $this->slider->get_setting( 'delay' ),
|
1590 |
-
'label' => __( "Slide delay", "ml-slider" ),
|
1591 |
-
'class' => 'option coin flex responsive nivo',
|
1592 |
-
'helptext' => __( "How long to display each slide, in milliseconds", "ml-slider" ),
|
1593 |
-
'after' => __( "ms", "ml-slider" )
|
1594 |
-
),
|
1595 |
-
'animationSpeed' => array(
|
1596 |
-
'priority' => 90,
|
1597 |
-
'type' => 'number',
|
1598 |
-
'size' => 3,
|
1599 |
-
'min' => 0,
|
1600 |
-
'max' => 2000,
|
1601 |
-
'step' => 100,
|
1602 |
-
'value' => $this->slider->get_setting( 'animationSpeed' ),
|
1603 |
-
'label' => __( "Animation speed", "ml-slider" ),
|
1604 |
-
'class' => 'option flex responsive nivo',
|
1605 |
-
'helptext' => __( "Set the speed of animations, in milliseconds", "ml-slider" ),
|
1606 |
-
'after' => __( "ms", "ml-slider" )
|
1607 |
-
),
|
1608 |
-
'slices' => array(
|
1609 |
-
'priority' => 100,
|
1610 |
-
'type' => 'number',
|
1611 |
-
'size' => 3,
|
1612 |
-
'min' => 0,
|
1613 |
-
'max' => 20,
|
1614 |
-
'step' => 1,
|
1615 |
-
'value' => $this->slider->get_setting( 'slices' ),
|
1616 |
-
'label' => __( "Number of slices", "ml-slider" ),
|
1617 |
-
'class' => 'option nivo',
|
1618 |
-
'helptext' => __( "Number of slices", "ml-slider" ),
|
1619 |
-
'after' => __( "ms", "ml-slider" )
|
1620 |
-
),
|
1621 |
-
'spw' => array(
|
1622 |
-
'priority' => 110,
|
1623 |
-
'type' => 'number',
|
1624 |
-
'size' => 3,
|
1625 |
-
'min' => 0,
|
1626 |
-
'max' => 20,
|
1627 |
-
'step' => 1,
|
1628 |
-
'value' => $this->slider->get_setting( 'spw' ),
|
1629 |
-
'label' => __( "Number of squares", "ml-slider" ) . " (" . __( "Width", "ml-slider" ) . ")",
|
1630 |
-
'class' => 'option nivo',
|
1631 |
-
'helptext' => __( "Number of squares", "ml-slider" ),
|
1632 |
-
'after' => ''
|
1633 |
-
),
|
1634 |
-
'sph' => array(
|
1635 |
-
'priority' => 120,
|
1636 |
-
'type' => 'number',
|
1637 |
-
'size' => 3,
|
1638 |
-
'min' => 0,
|
1639 |
-
'max' => 20,
|
1640 |
-
'step' => 1,
|
1641 |
-
'value' => $this->slider->get_setting( 'sph' ),
|
1642 |
-
'label' => __( "Number of squares", "ml-slider" ) . " (" . __( "Height", "ml-slider" ) . ")",
|
1643 |
-
'class' => 'option nivo',
|
1644 |
-
'helptext' => __( "Number of squares", "ml-slider" ),
|
1645 |
-
'after' => ''
|
1646 |
-
),
|
1647 |
-
'direction' => array(
|
1648 |
-
'priority' => 130,
|
1649 |
-
'type' => 'select',
|
1650 |
-
'label' => __( "Slide direction", "ml-slider" ),
|
1651 |
-
'class' => 'option flex',
|
1652 |
-
'helptext' => __( "Select the sliding direction", "ml-slider" ),
|
1653 |
-
'value' => $this->slider->get_setting( 'direction' ),
|
1654 |
-
'options' => array(
|
1655 |
-
'horizontal' => array( 'label' => __( "Horizontal", "ml-slider" ), 'class' => '' ),
|
1656 |
-
'vertical' => array( 'label' => __( "Vertical", "ml-slider" ), 'class' => '' ),
|
1657 |
-
)
|
1658 |
-
),
|
1659 |
-
'easing' => array(
|
1660 |
-
'priority' => 140,
|
1661 |
-
'type' => 'select',
|
1662 |
-
'label' => __( "Easing", "ml-slider" ),
|
1663 |
-
'class' => 'option flex',
|
1664 |
-
'helptext' => __( "Animation easing effect", "ml-slider" ),
|
1665 |
-
'value' => $this->slider->get_setting( 'easing' ),
|
1666 |
-
'options' => $this->get_easing_options()
|
1667 |
-
),
|
1668 |
-
'prevText' => array(
|
1669 |
-
'priority' => 150,
|
1670 |
-
'type' => 'text',
|
1671 |
-
'label' => __( "Previous text", "ml-slider" ),
|
1672 |
-
'class' => 'option coin flex responsive nivo',
|
1673 |
-
'helptext' => __( "Set the text for the 'previous' direction item", "ml-slider" ),
|
1674 |
-
'value' => $this->slider->get_setting( 'prevText' ) == 'false' ? '' : $this->slider->get_setting( 'prevText' )
|
1675 |
-
),
|
1676 |
-
'nextText' => array(
|
1677 |
-
'priority' => 160,
|
1678 |
-
'type' => 'text',
|
1679 |
-
'label' => __( "Next text", "ml-slider" ),
|
1680 |
-
'class' => 'option coin flex responsive nivo',
|
1681 |
-
'helptext' => __( "Set the text for the 'next' direction item", "ml-slider" ),
|
1682 |
-
'value' => $this->slider->get_setting( 'nextText' ) == 'false' ? '' : $this->slider->get_setting( 'nextText' )
|
1683 |
-
),
|
1684 |
-
'sDelay' => array(
|
1685 |
-
'priority' => 170,
|
1686 |
-
'type' => 'number',
|
1687 |
-
'size' => 3,
|
1688 |
-
'min' => 0,
|
1689 |
-
'max' => 500,
|
1690 |
-
'step' => 10,
|
1691 |
-
'value' => $this->slider->get_setting( 'sDelay' ),
|
1692 |
-
'label' => __( "Square delay", "ml-slider" ),
|
1693 |
-
'class' => 'option coin',
|
1694 |
-
'helptext' => __( "Delay between squares in ms", "ml-slider" ),
|
1695 |
-
'after' => __( "ms", "ml-slider" )
|
1696 |
-
),
|
1697 |
-
'opacity' => array(
|
1698 |
-
'priority' => 180,
|
1699 |
-
'type' => 'number',
|
1700 |
-
'size' => 3,
|
1701 |
-
'min' => 0,
|
1702 |
-
'max' => 1,
|
1703 |
-
'step' => 0.1,
|
1704 |
-
'value' => $this->slider->get_setting( 'opacity' ),
|
1705 |
-
'label' => __( "Opacity", "ml-slider" ),
|
1706 |
-
'class' => 'option coin',
|
1707 |
-
'helptext' => __( "Opacity of title and navigation", "ml-slider" ),
|
1708 |
-
'after' => ''
|
1709 |
-
),
|
1710 |
-
'titleSpeed' => array(
|
1711 |
-
'priority' => 190,
|
1712 |
-
'type' => 'number',
|
1713 |
-
'size' => 3,
|
1714 |
-
'min' => 0,
|
1715 |
-
'max' => 10000,
|
1716 |
-
'step' => 100,
|
1717 |
-
'value' => $this->slider->get_setting( 'titleSpeed' ),
|
1718 |
-
'label' => __( "Caption speed", "ml-slider" ),
|
1719 |
-
'class' => 'option coin',
|
1720 |
-
'helptext' => __( "Set the fade in speed of the caption", "ml-slider" ),
|
1721 |
-
'after' => __( "ms", "ml-slider" )
|
1722 |
-
),
|
1723 |
-
'developerOptions' => array(
|
1724 |
-
'priority' => 195,
|
1725 |
-
'type' => 'divider',
|
1726 |
-
'class' => 'option coin flex responsive nivo',
|
1727 |
-
'value' => __( "Developer options", "ml-slider" )
|
1728 |
-
),
|
1729 |
-
'cssClass' => array(
|
1730 |
-
'priority' => 200,
|
1731 |
-
'type' => 'text',
|
1732 |
-
'label' => __( "CSS classes", "ml-slider" ),
|
1733 |
-
'class' => 'option coin flex responsive nivo',
|
1734 |
-
'helptext' => __( "Specify any custom CSS Classes you would like to be added to the slider wrapper", "ml-slider" ),
|
1735 |
-
'value' => $this->slider->get_setting( 'cssClass' ) == 'false' ? '' : $this->slider->get_setting( 'cssClass' )
|
1736 |
-
),
|
1737 |
-
'printCss' => array(
|
1738 |
-
'priority' => 210,
|
1739 |
-
'type' => 'checkbox',
|
1740 |
-
'label' => __( "Print CSS", "ml-slider" ),
|
1741 |
-
'class' => 'option coin flex responsive nivo useWithCaution',
|
1742 |
-
'checked' => $this->slider->get_setting( 'printCss' ) == 'true' ? 'checked' : '',
|
1743 |
-
'helptext' => __( "Uncheck this is you would like to include your own CSS", "ml-slider" )
|
1744 |
-
),
|
1745 |
-
'printJs' => array(
|
1746 |
-
'priority' => 220,
|
1747 |
-
'type' => 'checkbox',
|
1748 |
-
'label' => __( "Print JS", "ml-slider" ),
|
1749 |
-
'class' => 'option coin flex responsive nivo useWithCaution',
|
1750 |
-
'checked' => $this->slider->get_setting( 'printJs' ) == 'true' ? 'checked' : '',
|
1751 |
-
'helptext' => __( "Uncheck this is you would like to include your own Javascript", "ml-slider" )
|
1752 |
-
),
|
1753 |
-
'noConflict' => array(
|
1754 |
-
'priority' => 230,
|
1755 |
-
'type' => 'checkbox',
|
1756 |
-
'label' => __( "No conflict mode", "ml-slider" ),
|
1757 |
-
'class' => 'option flex',
|
1758 |
-
'checked' => $this->slider->get_setting( 'noConflict' ) == 'true' ? 'checked' : '',
|
1759 |
-
'helptext' => __( "Delay adding the flexslider class to the slideshow", "ml-slider" )
|
1760 |
-
),
|
1761 |
-
);
|
1762 |
-
|
1763 |
-
$aFields = apply_filters( 'metaslider_advanced_settings', $aFields, $this->slider );
|
1764 |
-
|
1765 |
-
echo $this->build_settings_rows( $aFields );
|
1766 |
-
?>
|
1767 |
-
</tbody>
|
1768 |
-
</table>
|
1769 |
-
</div>
|
1770 |
-
</div>
|
1771 |
-
|
1772 |
-
<?php $url = wp_nonce_url(admin_url("admin-post.php?action=metaslider_delete_slider&slider_id={$this->slider->id}"), "metaslider_delete_slider"); ?>
|
1773 |
-
|
1774 |
-
<a class='delete-slider alignright ml-has-icon ml-button ml-delete-button' href='<?php echo $url ?>'><i><svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></i><span><?php _e( "Delete Slideshow", "ml-slider" ) ?></span></a>
|
1775 |
-
</div>
|
1776 |
-
<?php } ?>
|
1777 |
-
</div>
|
1778 |
-
</div>
|
1779 |
-
</div>
|
1780 |
-
</form>
|
1781 |
-
</div>
|
1782 |
-
<?php
|
1783 |
-
}
|
1784 |
-
|
1785 |
-
|
1786 |
-
/**
|
1787 |
-
* Append the 'Add Slider' button to selected admin pages
|
1788 |
-
*/
|
1789 |
-
public function insert_metaslider_button( $context ) {
|
1790 |
-
|
1791 |
-
$capability = apply_filters( 'metaslider_capability', 'edit_others_posts' );
|
1792 |
-
|
1793 |
-
if ( ! current_user_can( $capability ) ) {
|
1794 |
-
return $context;
|
1795 |
-
}
|
1796 |
-
|
1797 |
-
global $pagenow;
|
1798 |
-
|
1799 |
-
if ( in_array( $pagenow, array( 'post.php', 'page.php', 'post-new.php', 'post-edit.php' ) ) ) {
|
1800 |
-
$context .= '<a href="#TB_inline?&inlineId=choose-meta-slider" class="thickbox button" title="' .
|
1801 |
-
__( "Select slideshow to insert into post", "ml-slider" ) .
|
1802 |
-
'"><span class="wp-media-buttons-icon" style="background: url(' . METASLIDER_ASSETS_URL .
|
1803 |
-
'/metaslider/matchalabs.png); background-repeat: no-repeat; background-position: left bottom;"></span> ' .
|
1804 |
-
__( "Add slider", "ml-slider" ) . '</a>';
|
1805 |
-
}
|
1806 |
-
|
1807 |
-
return $context;
|
1808 |
-
|
1809 |
-
}
|
1810 |
-
|
1811 |
-
|
1812 |
-
/**
|
1813 |
-
* Append the 'Choose MetaSlider' thickbox content to the bottom of selected admin pages
|
1814 |
-
*/
|
1815 |
-
public function admin_footer() {
|
1816 |
-
|
1817 |
-
global $pagenow;
|
1818 |
-
|
1819 |
-
// Only run in post/page creation and edit screens
|
1820 |
-
if ( in_array( $pagenow, array( 'post.php', 'page.php', 'post-new.php', 'post-edit.php' ) ) ) {
|
1821 |
-
$sliders = $this->all_meta_sliders( 'title' );
|
1822 |
-
?>
|
1823 |
-
|
1824 |
-
<script type="text/javascript">
|
1825 |
-
jQuery(document).ready(function() {
|
1826 |
-
jQuery('#insertMetaSlider').on('click', function() {
|
1827 |
-
var id = jQuery('#metaslider-select option:selected').val();
|
1828 |
-
window.send_to_editor('[metaslider id=' + id + ']');
|
1829 |
-
tb_remove();
|
1830 |
-
})
|
1831 |
-
});
|
1832 |
-
</script>
|
1833 |
-
|
1834 |
-
<div id="choose-meta-slider" style="display: none;">
|
1835 |
-
<div class="wrap">
|
1836 |
-
<?php
|
1837 |
-
if ( count( $sliders ) ) {
|
1838 |
-
echo "<h3 style='margin-bottom: 20px;'>" . __( "Insert MetaSlider", "ml-slider" ) . "</h3>";
|
1839 |
-
echo "<select id='metaslider-select'>";
|
1840 |
-
echo "<option disabled=disabled>" . __( "Choose slideshow", "ml-slider" ) . "</option>";
|
1841 |
-
foreach ( $sliders as $slider ) {
|
1842 |
-
echo "<option value='{$slider['id']}'>{$slider['title']}</option>";
|
1843 |
-
}
|
1844 |
-
echo "</select>";
|
1845 |
-
echo "<button class='button primary' id='insertMetaSlider'>" . __( "Insert slideshow", "ml-slider" ) . "</button>";
|
1846 |
-
} else {
|
1847 |
-
_e( "No slideshows found", "ml-slider" );
|
1848 |
-
}
|
1849 |
-
?>
|
1850 |
-
</div>
|
1851 |
-
</div>
|
1852 |
-
|
1853 |
-
<?php
|
1854 |
-
}
|
1855 |
-
}
|
1856 |
-
|
1857 |
-
|
1858 |
-
/**
|
1859 |
-
* Return the MetaSlider pro upgrade iFrame
|
1860 |
-
*/
|
1861 |
-
public function upgrade_to_pro_tab() {
|
1862 |
-
|
1863 |
-
if ( function_exists( 'is_plugin_active' ) && ! is_plugin_active( 'ml-slider-pro/ml-slider-pro.php' ) ) {
|
1864 |
-
return wp_iframe( array( $this, 'upgrade_to_pro_iframe' ) );
|
1865 |
-
}
|
1866 |
-
|
1867 |
-
}
|
1868 |
-
|
1869 |
-
|
1870 |
-
/**
|
1871 |
-
* Media Manager iframe HTML
|
1872 |
-
*/
|
1873 |
-
public function upgrade_to_pro_iframe() {
|
1874 |
-
|
1875 |
-
wp_enqueue_style(
|
1876 |
-
wp_enqueue_script(
|
1877 |
-
|
1878 |
-
$link = apply_filters( 'metaslider_hoplink', 'https://www.metaslider.com/upgrade/' );
|
1879 |
-
$link .= '?utm_source=lite&utm_medium=more-slide-types&utm_campaign=pro';
|
1880 |
-
|
1881 |
-
echo implode("", array(
|
1882 |
-
"<div class='metaslider_pro'>",
|
1883 |
-
"<p>Get the Pro Addon pack to add support for: <b>Post Feed</b> Slides, <b>YouTube</b> Slides, <b>HTML</b> Slides & <b>Vimeo</b> Slides</p>",
|
1884 |
-
"<a class='probutton' href='{$link}' target='_blank'>Get <span class='logo'><strong>Meta</strong>Slider</span><span class='super'>Pro</span></a>",
|
1885 |
-
"<span class='subtext'>Opens in a new window</span>",
|
1886 |
-
"</div>"
|
1887 |
-
));
|
1888 |
-
|
1889 |
-
}
|
1890 |
-
|
1891 |
-
/**
|
1892 |
-
* Adds extra links to the plugin activation page
|
1893 |
-
*/
|
1894 |
-
public function get_extra_meta_links($meta, $file, $data, $status) {
|
1895 |
-
|
1896 |
-
if (plugin_basename(__FILE__) == $file) {
|
1897 |
-
$plugin_page = admin_url('admin.php?page=metaslider');
|
1898 |
-
$meta[] = "<a href='{$plugin_page}' onclick=\"event.preventDefault();var link = jQuery(this);jQuery.post(ajaxurl, {action: 'reset_tour_status', _wpnonce: metaslider_tour_nonce }, function(data) {window.location = link.attr('href');});\">" . __('Take a tour', 'ml-slider') . "</a>";
|
1899 |
-
if (metaslider_is_pro_installed()) {
|
1900 |
-
$upgrade_link = apply_filters('metaslider_hoplink', 'https://www.metaslider.com/upgrade/');
|
1901 |
-
$meta[] = "<a href='{$upgrade_link}' target='_blank'>" . __('Add-ons', 'ml-slider') . "</a>";
|
1902 |
-
$meta[] = "<a href='https://wordpress.org/support/plugin/ml-slider/' target='_blank'>" . __('Support', 'ml-slider') . "</a>";
|
1903 |
-
} else {
|
1904 |
-
$meta[] = "<a href='https://www.metaslider.com/support/' target='_blank'>" . __('Premium Support', 'ml-slider') . "</a>";
|
1905 |
-
}
|
1906 |
-
$meta[] = "<a href='https://www.metaslider.com/documentation/' target='_blank'>" . __('Documentation', 'ml-slider') . "</a>";
|
1907 |
-
$meta[] = "<a href='https://wordpress.org/support/plugin/ml-slider/reviews#new-post' target='_blank' title='" . __('Leave a review', 'ml-slider') . "'><i class='ml-stars'><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg></i></a>";
|
1908 |
-
}
|
1909 |
-
return $meta;
|
1910 |
-
}
|
1911 |
-
|
1912 |
-
/**
|
1913 |
-
* Adds styles to admin head to allow for stars animation and coloring
|
1914 |
-
*/
|
1915 |
-
public function add_star_styles() {
|
1916 |
-
if (metaslider_is_on_admin_page('plugins.php')) {?>
|
1917 |
-
<style>
|
1918 |
-
.ml-stars{display:inline-block;color:#ffb900;position:relative;top:3px}
|
1919 |
-
.ml-stars svg{fill:#ffb900}
|
1920 |
-
.ml-stars svg:hover{fill:#ffb900}
|
1921 |
-
.ml-stars svg:hover ~ svg{fill:none}
|
1922 |
-
</style>
|
1923 |
-
<?php }
|
1924 |
-
}
|
1925 |
-
|
1926 |
-
/**
|
1927 |
-
* Add nonce to activation page
|
1928 |
-
*/
|
1929 |
-
public function add_tour_nonce_to_activation_page() {
|
1930 |
-
if (metaslider_is_on_admin_page('plugins.php')) {?>
|
1931 |
-
<script>
|
1932 |
-
var metaslider_tour_nonce = "<?php echo wp_create_nonce('metaslider_tour_nonce'); ?>";
|
1933 |
-
</script>
|
1934 |
-
<?php }
|
1935 |
-
}
|
1936 |
-
|
1937 |
-
/**
|
1938 |
-
* Upgrade To Pro Button.
|
1939 |
-
*/
|
1940 |
-
public function upgrade_to_pro_top_button() {
|
1941 |
-
$text = __('Upgrade Now', "ml-slider");
|
1942 |
-
$link = metaslider_get_upgrade_link();
|
1943 |
-
$upgrade_text = __("Get The Pro Pack Today!", "ml-slider");
|
1944 |
-
return "<a target='_blank' title='{$upgrade_text}' class='ml-has-icon ml-hanging-button' href='{$link}'><i class='brand-color'><svg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg></i><span>{$text}</span></a>";
|
1945 |
-
}
|
1946 |
-
|
1947 |
-
/**
|
1948 |
-
* Toggle Layout Buttons.
|
1949 |
-
* TODO: Re work this to allow for a third view style
|
1950 |
-
*/
|
1951 |
-
public function toggle_layout_button() {
|
1952 |
-
|
1953 |
-
// Don't show this if there are no slideshows
|
1954 |
-
if (!count($this->all_meta_sliders())) {
|
1955 |
-
return '';
|
1956 |
-
}
|
1957 |
-
|
1958 |
-
$view = ('tabs' == $this->get_view()) ? 'tabs' : 'dropdown';
|
1959 |
-
$view_opposite = ('dropdown' == $this->get_view()) ? 'tabs' : 'dropdown';
|
1960 |
-
$view_text = ($this->get_view() == 'tabs') ? __("Switch to Dropdown view", "ml-slider") : __("Switch to Tab view", "ml-slider");
|
1961 |
-
return "<a class='ml-has-icon ml-hanging-button' title='" . $view_text . "'
|
1962 |
-
href='" . admin_url( "admin-post.php?action=metaslider_switch_view&view=".$view_opposite) . "'><i><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"17\" height=\"17\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-shuffle\"><polyline points=\"16 3 21 3 21 8\"/><line x1=\"4\" y1=\"20\" x2=\"21\" y2=\"3\"/><polyline points=\"21 16 21 21 16 21\"/><line x1=\"15\" y1=\"15\" x2=\"21\" y2=\"21\"/><line x1=\"4\" y1=\"4\" x2=\"9\" y2=\"9\"/></svg></i><span>" . __("Layout", "ml-slider") . "</span></a>";
|
1963 |
-
}
|
1964 |
-
|
1965 |
-
/**
|
1966 |
-
* Support and Docs Button
|
1967 |
-
*/
|
1968 |
-
public function documentation_button() {
|
1969 |
-
return "<a class='ml-has-icon ml-hanging-button' target='_blank' title='" . __('View The Documentation', 'ml-slider') . "' href='https://www.metaslider.com/documentation/'><i><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"17\" height=\"17\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-book\"><path d=\"M4 19.5A2.5 2.5 0 0 1 6.5 17H20\"/><path d=\"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z\"/></svg></i><span>" . __("Documentation", "ml-slider") . "</span></a>";
|
1970 |
-
}
|
1971 |
-
|
1972 |
-
/**
|
1973 |
-
* Add a 'property=stylesheet' attribute to the MetaSlider CSS links for HTML5 validation
|
1974 |
-
*
|
1975 |
-
* @since 3.3.4
|
1976 |
-
* @param string $tag
|
1977 |
-
* @param string $handle
|
1978 |
-
*/
|
1979 |
-
public function add_property_attribute_to_stylesheet_links( $tag, $handle ) {
|
1980 |
-
|
1981 |
-
if ( strpos( $handle, 'metaslider' ) !== FALSE && strpos( $tag, "property='" ) === FALSE ) {
|
1982 |
-
// we're only filtering tags with metaslider in the handle, and links which don't already have a property attribute
|
1983 |
-
$tag = str_replace( "/>", "property='stylesheet' />", $tag );
|
1984 |
-
}
|
1985 |
-
|
1986 |
-
return $tag;
|
1987 |
-
|
1988 |
-
}
|
1989 |
-
|
1990 |
-
}
|
1991 |
-
|
1992 |
-
endif;
|
1993 |
-
|
1994 |
-
add_action( 'plugins_loaded', array( 'MetaSliderPlugin', 'init' ), 10 );
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* MetaSlider. Slideshow plugin for WordPress.
|
4 |
+
*
|
5 |
+
* Plugin Name: MetaSlider
|
6 |
+
* Plugin URI: https://www.metaslider.com
|
7 |
+
* Description: Easy to use slideshow plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides.
|
8 |
+
* Version: 3.6.6
|
9 |
+
* Author: Team Updraft
|
10 |
+
* Author URI: https://www.metaslider.com
|
11 |
+
* License: GPL-2.0+
|
12 |
+
* Copyright: 2017 Simba Hosting Ltd
|
13 |
+
*
|
14 |
+
* Text Domain: ml-slider
|
15 |
+
* Domain Path: /languages
|
16 |
+
*/
|
17 |
+
|
18 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
19 |
+
exit; // disable direct access
|
20 |
+
}
|
21 |
+
|
22 |
+
if ( ! class_exists( 'MetaSliderPlugin' ) ) :
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Register the plugin.
|
26 |
+
*
|
27 |
+
* Display the administration panel, insert JavaScript etc.
|
28 |
+
*/
|
29 |
+
class MetaSliderPlugin {
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @var string
|
33 |
+
*/
|
34 |
+
public $version = '3.6.6';
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @var string The lowest tier price for upgrades
|
38 |
+
*/
|
39 |
+
public $pro_price = '39';
|
40 |
+
|
41 |
+
/**
|
42 |
+
* @var MetaSlider
|
43 |
+
*/
|
44 |
+
public $slider = null;
|
45 |
+
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Init
|
49 |
+
*/
|
50 |
+
public static function init() {
|
51 |
+
|
52 |
+
$metaslider = new self();
|
53 |
+
|
54 |
+
}
|
55 |
+
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Constructor
|
59 |
+
*/
|
60 |
+
public function __construct() {
|
61 |
+
$this->define_constants();
|
62 |
+
$this->includes();
|
63 |
+
$this->setup_actions();
|
64 |
+
$this->setup_filters();
|
65 |
+
$this->setup_shortcode();
|
66 |
+
$this->register_slide_types();
|
67 |
+
$this->admin = new MetaSlider_Admin_Pages($this);
|
68 |
+
}
|
69 |
+
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Define MetaSlider constants
|
73 |
+
*/
|
74 |
+
private function define_constants() {
|
75 |
+
define('METASLIDER_VERSION', $this->version);
|
76 |
+
define('METASLIDER_BASE_URL', trailingslashit(plugins_url('ml-slider')));
|
77 |
+
define('METASLIDER_ASSETS_URL', trailingslashit(METASLIDER_BASE_URL . 'assets'));
|
78 |
+
define('METASLIDER_ADMIN_URL', trailingslashit(METASLIDER_BASE_URL . 'admin'));
|
79 |
+
define('METASLIDER_PATH', plugin_dir_path(__FILE__));
|
80 |
+
define('METASLIDER_PRO_PRICE', $this->pro_price);
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* All MetaSlider classes
|
85 |
+
*/
|
86 |
+
private function plugin_classes() {
|
87 |
+
return array(
|
88 |
+
'metaslider' => METASLIDER_PATH . 'inc/slider/metaslider.class.php',
|
89 |
+
'metacoinslider' => METASLIDER_PATH . 'inc/slider/metaslider.coin.class.php',
|
90 |
+
'metaflexslider' => METASLIDER_PATH . 'inc/slider/metaslider.flex.class.php',
|
91 |
+
'metanivoslider' => METASLIDER_PATH . 'inc/slider/metaslider.nivo.class.php',
|
92 |
+
'metaresponsiveslider' => METASLIDER_PATH . 'inc/slider/metaslider.responsive.class.php',
|
93 |
+
'metaslide' => METASLIDER_PATH . 'inc/slide/metaslide.class.php',
|
94 |
+
'metaimageslide' => METASLIDER_PATH . 'inc/slide/metaslide.image.class.php',
|
95 |
+
'metasliderimagehelper' => METASLIDER_PATH . 'inc/metaslider.imagehelper.class.php',
|
96 |
+
'metaslidersystemcheck' => METASLIDER_PATH . 'inc/metaslider.systemcheck.class.php',
|
97 |
+
'metaslider_widget' => METASLIDER_PATH . 'inc/metaslider.widget.class.php',
|
98 |
+
'simple_html_dom' => METASLIDER_PATH . 'inc/simple_html_dom.php',
|
99 |
+
'metaslider_notices' => METASLIDER_PATH . 'admin/Notices.php',
|
100 |
+
'metaslider_admin_pages' => METASLIDER_PATH . 'admin/Pages.php',
|
101 |
+
'metaslider_tour' => METASLIDER_PATH . 'admin/Tour.php'
|
102 |
+
);
|
103 |
+
}
|
104 |
+
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Load required classes
|
108 |
+
*/
|
109 |
+
private function includes() {
|
110 |
+
require_once(METASLIDER_PATH . 'admin/lib/helpers.php');
|
111 |
+
$autoload_is_disabled = defined( 'METASLIDER_AUTOLOAD_CLASSES' ) && METASLIDER_AUTOLOAD_CLASSES === false;
|
112 |
+
|
113 |
+
if ( function_exists( "spl_autoload_register" ) && ! ( $autoload_is_disabled ) ) {
|
114 |
+
|
115 |
+
// >= PHP 5.2 - Use auto loading
|
116 |
+
if ( function_exists( "__autoload" ) ) {
|
117 |
+
spl_autoload_register( "__autoload" );
|
118 |
+
}
|
119 |
+
|
120 |
+
spl_autoload_register( array( $this, 'autoload' ) );
|
121 |
+
|
122 |
+
} else {
|
123 |
+
|
124 |
+
// < PHP5.2 - Require all classes
|
125 |
+
foreach ( $this->plugin_classes() as $id => $path ) {
|
126 |
+
if ( is_readable( $path ) && ! class_exists( $id ) ) {
|
127 |
+
require_once( $path );
|
128 |
+
}
|
129 |
+
}
|
130 |
+
|
131 |
+
}
|
132 |
+
|
133 |
+
}
|
134 |
+
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Autoload MetaSlider classes to reduce memory consumption
|
138 |
+
*/
|
139 |
+
public function autoload( $class ) {
|
140 |
+
|
141 |
+
$classes = $this->plugin_classes();
|
142 |
+
|
143 |
+
$class_name = strtolower( $class );
|
144 |
+
|
145 |
+
if ( isset( $classes[$class_name] ) && is_readable( $classes[$class_name] ) ) {
|
146 |
+
require_once( $classes[$class_name] );
|
147 |
+
}
|
148 |
+
|
149 |
+
}
|
150 |
+
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Register the [metaslider] shortcode.
|
154 |
+
*/
|
155 |
+
private function setup_shortcode() {
|
156 |
+
|
157 |
+
add_shortcode( 'metaslider', array( $this, 'register_shortcode' ) );
|
158 |
+
add_shortcode( 'ml-slider', array( $this, 'register_shortcode' ) ); // backwards compatibility
|
159 |
+
|
160 |
+
}
|
161 |
+
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Hook MetaSlider into WordPress
|
165 |
+
*/
|
166 |
+
private function setup_actions() {
|
167 |
+
add_action('admin_menu', array($this, 'register_admin_pages'), 9553);
|
168 |
+
add_action('init', array($this, 'register_post_types'));
|
169 |
+
add_action('init', array($this, 'register_taxonomy'));
|
170 |
+
add_action('init', array($this, 'load_plugin_textdomain'));
|
171 |
+
add_action('admin_footer', array($this, 'admin_footer'), 11);
|
172 |
+
add_action('widgets_init', array($this, 'register_metaslider_widget'));
|
173 |
+
|
174 |
+
add_action('admin_post_metaslider_preview', array($this, 'do_preview'));
|
175 |
+
add_action('admin_post_metaslider_switch_view', array($this, 'switch_view'));
|
176 |
+
add_action('admin_post_metaslider_delete_slide', array($this, 'delete_slide'));
|
177 |
+
add_action('admin_post_metaslider_delete_slider', array($this, 'delete_slider'));
|
178 |
+
add_action('admin_post_metaslider_create_slider', array($this, 'create_slider'));
|
179 |
+
add_action('admin_post_metaslider_update_slider', array($this, 'update_slider'));
|
180 |
+
|
181 |
+
add_action('media_upload_vimeo', array($this, 'upgrade_to_pro_tab'));
|
182 |
+
add_action('media_upload_youtube', array($this, 'upgrade_to_pro_tab'));
|
183 |
+
add_action('media_upload_post_feed', array($this, 'upgrade_to_pro_tab'));
|
184 |
+
add_action('media_upload_layer', array($this, 'upgrade_to_pro_tab'));
|
185 |
+
|
186 |
+
// TODO: Refactor to Slide class object
|
187 |
+
add_action('wp_ajax_delete_slide', array($this, 'ajax_delete_slide'));
|
188 |
+
add_action('wp_ajax_undelete_slide', array($this, 'ajax_undelete_slide'));
|
189 |
+
|
190 |
+
// TODO: Make this work
|
191 |
+
// register_activation_hook(plugin_basename(__FILE__), array($this, 'after_activation'));
|
192 |
+
}
|
193 |
+
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Hook MetaSlider into WordPress
|
197 |
+
*/
|
198 |
+
private function setup_filters() {
|
199 |
+
add_filter('media_upload_tabs', array($this, 'custom_media_upload_tab_name'), 998);
|
200 |
+
add_filter('media_view_strings', array($this, 'custom_media_uploader_tabs'), 5);
|
201 |
+
add_filter('media_buttons_context', array($this, 'insert_metaslider_button'));
|
202 |
+
add_filter("plugin_row_meta", array($this, 'get_extra_meta_links'), 10, 4);
|
203 |
+
add_action('admin_head', array($this, 'add_star_styles'));
|
204 |
+
add_action('admin_head', array($this, 'add_tour_nonce_to_activation_page'));
|
205 |
+
|
206 |
+
// html5 compatibility for stylesheets enqueued within <body>
|
207 |
+
add_filter('style_loader_tag', array($this, 'add_property_attribute_to_stylesheet_links'), 11, 2);
|
208 |
+
}
|
209 |
+
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Register MetaSlider widget
|
213 |
+
*/
|
214 |
+
public function register_metaslider_widget() {
|
215 |
+
register_widget('MetaSlider_Widget');
|
216 |
+
}
|
217 |
+
|
218 |
+
|
219 |
+
/**
|
220 |
+
* Register ML Slider post type
|
221 |
+
*/
|
222 |
+
public function register_post_types() {
|
223 |
+
|
224 |
+
$show_ui = false;
|
225 |
+
|
226 |
+
$capability = apply_filters( 'metaslider_capability', 'edit_others_posts' );
|
227 |
+
|
228 |
+
if ( is_admin() && current_user_can( $capability ) && ( isset($_GET['show_ui']) || defined("METASLIDER_DEBUG") && METASLIDER_DEBUG ) ) {
|
229 |
+
$show_ui = true;
|
230 |
+
}
|
231 |
+
|
232 |
+
register_post_type( 'ml-slider', array(
|
233 |
+
'query_var' => false,
|
234 |
+
'rewrite' => false,
|
235 |
+
'public' => false,
|
236 |
+
'exclude_from_search' => true,
|
237 |
+
'publicly_queryable' => false,
|
238 |
+
'show_in_nav_menus' => false,
|
239 |
+
'show_ui' => $show_ui,
|
240 |
+
'labels' => array(
|
241 |
+
'name' => 'MetaSlider'
|
242 |
+
)
|
243 |
+
)
|
244 |
+
);
|
245 |
+
|
246 |
+
register_post_type( 'ml-slide', array(
|
247 |
+
'query_var' => false,
|
248 |
+
'rewrite' => false,
|
249 |
+
'public' => false,
|
250 |
+
'exclude_from_search' => true,
|
251 |
+
'publicly_queryable' => false,
|
252 |
+
'show_in_nav_menus' => false,
|
253 |
+
'show_ui' => $show_ui,
|
254 |
+
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt'),
|
255 |
+
'labels' => array(
|
256 |
+
'name' => 'Meta Slides'
|
257 |
+
)
|
258 |
+
)
|
259 |
+
);
|
260 |
+
|
261 |
+
}
|
262 |
+
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Register taxonomy to store slider => slides relationship
|
266 |
+
*/
|
267 |
+
public function register_taxonomy() {
|
268 |
+
|
269 |
+
$show_ui = false;
|
270 |
+
|
271 |
+
$capability = apply_filters( 'metaslider_capability', 'edit_others_posts' );
|
272 |
+
|
273 |
+
if (is_admin() && current_user_can( $capability ) && ( isset($_GET['show_ui']) || defined("METASLIDER_DEBUG") && METASLIDER_DEBUG ) ) {
|
274 |
+
$show_ui = true;
|
275 |
+
}
|
276 |
+
|
277 |
+
register_taxonomy( 'ml-slider', array('attachment', 'ml-slide'), array(
|
278 |
+
'hierarchical' => true,
|
279 |
+
'public' => false,
|
280 |
+
'query_var' => false,
|
281 |
+
'rewrite' => false,
|
282 |
+
'show_ui' => $show_ui,
|
283 |
+
'label' => "Slider"
|
284 |
+
)
|
285 |
+
);
|
286 |
+
|
287 |
+
}
|
288 |
+
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Register our slide types
|
292 |
+
*/
|
293 |
+
private function register_slide_types() {
|
294 |
+
|
295 |
+
$image = new MetaImageSlide();
|
296 |
+
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Add the menu pages
|
301 |
+
*/
|
302 |
+
public function register_admin_pages() {
|
303 |
+
if (metaslider_is_pro_active()) {
|
304 |
+
$this->admin->add_page('MetaSlider Pro', 'metaslider');
|
305 |
+
} else {
|
306 |
+
$this->admin->add_page('MetaSlider');
|
307 |
+
}
|
308 |
+
|
309 |
+
if (metaslider_sees_upgrade_page()) {
|
310 |
+
$this->admin->add_page(__('Add-ons', 'ml-slider'), 'upgrade', 'metaslider');
|
311 |
+
}
|
312 |
+
}
|
313 |
+
|
314 |
+
/**
|
315 |
+
* Shortcode used to display slideshow
|
316 |
+
*
|
317 |
+
* @return string HTML output of the shortcode
|
318 |
+
*/
|
319 |
+
public function register_shortcode( $atts ) {
|
320 |
+
|
321 |
+
extract( shortcode_atts( array(
|
322 |
+
'id' => false,
|
323 |
+
'restrict_to' => false
|
324 |
+
), $atts, 'metaslider' ) );
|
325 |
+
|
326 |
+
|
327 |
+
if ( ! $id ) {
|
328 |
+
return false;
|
329 |
+
}
|
330 |
+
|
331 |
+
// handle [metaslider id=123 restrict_to=home]
|
332 |
+
if ($restrict_to && $restrict_to == 'home' && ! is_front_page()) {
|
333 |
+
return;
|
334 |
+
}
|
335 |
+
|
336 |
+
if ($restrict_to && $restrict_to != 'home' && ! is_page( $restrict_to ) ) {
|
337 |
+
return;
|
338 |
+
}
|
339 |
+
|
340 |
+
// we have an ID to work with
|
341 |
+
$slider = get_post( $id );
|
342 |
+
|
343 |
+
// check the slider is published and the ID is correct
|
344 |
+
if ( ! $slider || $slider->post_status != 'publish' || $slider->post_type != 'ml-slider' ) {
|
345 |
+
return "<!-- MetaSlider {$atts['id']} not found -->";
|
346 |
+
}
|
347 |
+
|
348 |
+
// lets go
|
349 |
+
$this->set_slider( $id, $atts );
|
350 |
+
$this->slider->enqueue_scripts();
|
351 |
+
|
352 |
+
return $this->slider->render_public_slides();
|
353 |
+
|
354 |
+
}
|
355 |
+
|
356 |
+
/**
|
357 |
+
* Set first activation option to database
|
358 |
+
*/
|
359 |
+
public function after_activation() {
|
360 |
+
|
361 |
+
// Set date showing the first activation and redirect
|
362 |
+
if (!get_option('ms_was_installed_on')) {
|
363 |
+
update_option('ms_was_installed_on', time());
|
364 |
+
}
|
365 |
+
}
|
366 |
+
|
367 |
+
/**
|
368 |
+
* Initialise translations
|
369 |
+
*/
|
370 |
+
public function load_plugin_textdomain() {
|
371 |
+
|
372 |
+
load_plugin_textdomain( 'ml-slider', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
373 |
+
|
374 |
+
}
|
375 |
+
|
376 |
+
|
377 |
+
/**
|
378 |
+
* Outputs a blank page containing a slideshow preview (for use in the 'Preview' iFrame)
|
379 |
+
*/
|
380 |
+
public function do_preview() {
|
381 |
+
|
382 |
+
remove_action('wp_footer', 'wp_admin_bar_render', 1000);
|
383 |
+
|
384 |
+
if ( isset( $_GET['slider_id'] ) && absint( $_GET['slider_id'] ) > 0 ) {
|
385 |
+
$id = absint( $_GET['slider_id'] );
|
386 |
+
|
387 |
+
?>
|
388 |
+
<!DOCTYPE html>
|
389 |
+
<html>
|
390 |
+
<head>
|
391 |
+
<style type='text/css'>
|
392 |
+
body, html {
|
393 |
+
overflow: hidden;
|
394 |
+
margin: 0;
|
395 |
+
padding: 0;
|
396 |
+
}
|
397 |
+
</style>
|
398 |
+
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
399 |
+
<meta http-equiv="Pragma" content="no-cache" />
|
400 |
+
<meta http-equiv="Expires" content="0" />
|
401 |
+
</head>
|
402 |
+
<body>
|
403 |
+
<?php echo do_shortcode("[metaslider id={$id}]"); ?>
|
404 |
+
<?php wp_footer(); ?>
|
405 |
+
</body>
|
406 |
+
</html>
|
407 |
+
<?php
|
408 |
+
}
|
409 |
+
|
410 |
+
die();
|
411 |
+
|
412 |
+
}
|
413 |
+
|
414 |
+
|
415 |
+
/**
|
416 |
+
* Check our WordPress installation is compatible with MetaSlider
|
417 |
+
*/
|
418 |
+
public function do_system_check() {
|
419 |
+
|
420 |
+
$systemCheck = new MetaSliderSystemCheck();
|
421 |
+
$systemCheck->check();
|
422 |
+
|
423 |
+
}
|
424 |
+
|
425 |
+
|
426 |
+
/**
|
427 |
+
* Update the tab options in the media manager
|
428 |
+
*/
|
429 |
+
public function custom_media_uploader_tabs( $strings ) {
|
430 |
+
|
431 |
+
//update strings
|
432 |
+
if ( ( isset( $_GET['page'] ) && $_GET['page'] == 'metaslider' ) ) {
|
433 |
+
$strings['insertMediaTitle'] = __( "Image", "ml-slider" );
|
434 |
+
$strings['insertIntoPost'] = __( "Add to slideshow", "ml-slider" );
|
435 |
+
// remove options
|
436 |
+
|
437 |
+
$strings_to_remove = array(
|
438 |
+
'createVideoPlaylistTitle',
|
439 |
+
'createGalleryTitle',
|
440 |
+
'insertFromUrlTitle',
|
441 |
+
'createPlaylistTitle'
|
442 |
+
);
|
443 |
+
|
444 |
+
foreach ($strings_to_remove as $string) {
|
445 |
+
if (isset($strings[$string])) {
|
446 |
+
unset($strings[$string]);
|
447 |
+
}
|
448 |
+
}
|
449 |
+
}
|
450 |
+
|
451 |
+
return $strings;
|
452 |
+
|
453 |
+
}
|
454 |
+
|
455 |
+
|
456 |
+
/**
|
457 |
+
* Add extra tabs to the default wordpress Media Manager iframe
|
458 |
+
*
|
459 |
+
* @var array existing media manager tabs
|
460 |
+
*/
|
461 |
+
public function custom_media_upload_tab_name( $tabs ) {
|
462 |
+
|
463 |
+
$metaslider_tabs = array( 'post_feed', 'layer', 'youtube', 'vimeo' );
|
464 |
+
|
465 |
+
// restrict our tab changes to the MetaSlider plugin page
|
466 |
+
if ( ( isset( $_GET['page'] ) && $_GET['page'] == 'metaslider' ) || ( isset( $_GET['tab'] ) && in_array( $_GET['tab'], $metaslider_tabs ) ) ) {
|
467 |
+
$newtabs = array();
|
468 |
+
|
469 |
+
if ( function_exists( 'is_plugin_active' ) && ! is_plugin_active( 'ml-slider-pro/ml-slider-pro.php' ) ) {
|
470 |
+
$newtabs = array(
|
471 |
+
'post_feed' => __( "Post Feed", "metaslider" ),
|
472 |
+
'vimeo' => __( "Vimeo", "metaslider" ),
|
473 |
+
'youtube' => __( "YouTube", "metaslider" ),
|
474 |
+
'layer' => __( "Layer Slide", "metaslider" )
|
475 |
+
);
|
476 |
+
}
|
477 |
+
|
478 |
+
if ( isset( $tabs['nextgen'] ) )
|
479 |
+
unset( $tabs['nextgen'] );
|
480 |
+
|
481 |
+
|
482 |
+
if ( is_array( $tabs ) ) {
|
483 |
+
return array_merge( $tabs, $newtabs );
|
484 |
+
} else {
|
485 |
+
return $newtabs;
|
486 |
+
}
|
487 |
+
|
488 |
+
}
|
489 |
+
|
490 |
+
return $tabs;
|
491 |
+
|
492 |
+
|
493 |
+
}
|
494 |
+
|
495 |
+
|
496 |
+
/**
|
497 |
+
* Set the current slider
|
498 |
+
*/
|
499 |
+
public function set_slider( $id, $shortcode_settings = array() ) {
|
500 |
+
|
501 |
+
$type = 'flex';
|
502 |
+
|
503 |
+
if ( isset( $shortcode_settings['type'] ) ) {
|
504 |
+
$type = $shortcode_settings['type'];
|
505 |
+
} else if ( $settings = get_post_meta( $id, 'ml-slider_settings', true ) ) {
|
506 |
+
if ( is_array( $settings ) && isset( $settings['type'] ) ) {
|
507 |
+
$type = $settings['type'];
|
508 |
+
}
|
509 |
+
}
|
510 |
+
|
511 |
+
if ( ! in_array( $type, array( 'flex', 'coin', 'nivo', 'responsive' ) ) ) {
|
512 |
+
$type = 'flex';
|
513 |
+
}
|
514 |
+
|
515 |
+
$this->slider = $this->load_slider( $type, $id, $shortcode_settings );
|
516 |
+
|
517 |
+
}
|
518 |
+
|
519 |
+
|
520 |
+
/**
|
521 |
+
* Create a new slider based on the sliders type setting
|
522 |
+
*/
|
523 |
+
private function load_slider( $type, $id, $shortcode_settings ) {
|
524 |
+
|
525 |
+
switch ( $type ) {
|
526 |
+
case( 'coin' ):
|
527 |
+
return new MetaCoinSlider( $id, $shortcode_settings );
|
528 |
+
case( 'flex' ):
|
529 |
+
return new MetaFlexSlider( $id, $shortcode_settings );
|
530 |
+
case( 'nivo' ):
|
531 |
+
return new MetaNivoSlider( $id, $shortcode_settings );
|
532 |
+
case( 'responsive' ):
|
533 |
+
return new MetaResponsiveSlider( $id, $shortcode_settings );
|
534 |
+
default:
|
535 |
+
return new MetaFlexSlider( $id, $shortcode_settings );
|
536 |
+
|
537 |
+
}
|
538 |
+
}
|
539 |
+
|
540 |
+
|
541 |
+
/**
|
542 |
+
*
|
543 |
+
*/
|
544 |
+
public function update_slider() {
|
545 |
+
|
546 |
+
check_admin_referer( "metaslider_update_slider" );
|
547 |
+
|
548 |
+
$capability = apply_filters( 'metaslider_capability', 'edit_others_posts' );
|
549 |
+
|
550 |
+
if ( ! current_user_can( $capability ) ) {
|
551 |
+
return;
|
552 |
+
}
|
553 |
+
|
554 |
+
$slider_id = absint( $_POST['slider_id'] );
|
555 |
+
|
556 |
+
if ( ! $slider_id ) {
|
557 |
+
return;
|
558 |
+
}
|
559 |
+
|
560 |
+
// update settings
|
561 |
+
if ( isset( $_POST['settings'] ) ) {
|
562 |
+
|
563 |
+
$new_settings = $_POST['settings'];
|
564 |
+
|
565 |
+
$old_settings = get_post_meta( $slider_id, 'ml-slider_settings', true );
|
566 |
+
|
567 |
+
// convert submitted checkbox values from 'on' or 'off' to boolean values
|
568 |
+
$checkboxes = apply_filters( "metaslider_checkbox_settings", array( 'noConflict', 'fullWidth', 'hoverPause', 'links', 'reverse', 'random', 'printCss', 'printJs', 'smoothHeight', 'center', 'carouselMode', 'autoPlay' ) );
|
569 |
+
|
570 |
+
foreach ( $checkboxes as $checkbox ) {
|
571 |
+
if ( isset( $new_settings[$checkbox] ) && $new_settings[$checkbox] == 'on' ) {
|
572 |
+
$new_settings[$checkbox] = "true";
|
573 |
+
} else {
|
574 |
+
$new_settings[$checkbox] = "false";
|
575 |
+
}
|
576 |
+
}
|
577 |
+
|
578 |
+
$settings = array_merge( (array)$old_settings, $new_settings );
|
579 |
+
|
580 |
+
// update the slider settings
|
581 |
+
update_post_meta( $slider_id, 'ml-slider_settings', $settings );
|
582 |
+
|
583 |
+
}
|
584 |
+
|
585 |
+
// update slideshow title
|
586 |
+
if ( isset( $_POST['title'] ) ) {
|
587 |
+
|
588 |
+
$slide = array(
|
589 |
+
'ID' => $slider_id,
|
590 |
+
'post_title' => esc_html( $_POST['title'] )
|
591 |
+
);
|
592 |
+
|
593 |
+
wp_update_post( $slide );
|
594 |
+
|
595 |
+
}
|
596 |
+
|
597 |
+
// update individual slides
|
598 |
+
if ( isset( $_POST['attachment'] ) ) {
|
599 |
+
|
600 |
+
foreach ( $_POST['attachment'] as $slide_id => $fields ) {
|
601 |
+
do_action( "metaslider_save_{$fields['type']}_slide", $slide_id, $slider_id, $fields );
|
602 |
+
}
|
603 |
+
|
604 |
+
}
|
605 |
+
|
606 |
+
}
|
607 |
+
|
608 |
+
/**
|
609 |
+
* Delete a slide via ajax.
|
610 |
+
* @return string Returns the status of the request
|
611 |
+
*/
|
612 |
+
public function ajax_undelete_slide() {
|
613 |
+
if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'metaslider_undelete_slide')) {
|
614 |
+
return wp_send_json_error(array(
|
615 |
+
'message' => __('The security check failed. Please refresh the page and try again.', 'ml-slider')
|
616 |
+
), 401);
|
617 |
+
}
|
618 |
+
|
619 |
+
$result = $this->undelete_slide(absint($_POST['slide_id']), absint($_POST['slider_id']));
|
620 |
+
|
621 |
+
if (is_wp_error($result)) {
|
622 |
+
return wp_send_json_error(array(
|
623 |
+
'message' => $result->get_error_message()
|
624 |
+
), 409);
|
625 |
+
}
|
626 |
+
|
627 |
+
return wp_send_json_success(array(
|
628 |
+
'message' => __('The slide was successfully restored', 'ml-slider'),
|
629 |
+
), 200);
|
630 |
+
}
|
631 |
+
|
632 |
+
/**
|
633 |
+
* Undeletes a slide.
|
634 |
+
* @param int $slide_id The ID of the slide
|
635 |
+
* @param int $slider_id The ID of the slider (for legacy purposes)
|
636 |
+
* @return mixed
|
637 |
+
*/
|
638 |
+
public function undelete_slide($slide_id, $slider_id) {
|
639 |
+
if ('ml-slide' === get_post_type($slide_id)) {
|
640 |
+
return wp_update_post(array(
|
641 |
+
'ID' => $slide_id,
|
642 |
+
'post_status' => 'publish'
|
643 |
+
), new WP_Error('update_failed', __('The attempt to restore the slide failed.', 'ml-slider'), array('status' => 409)));
|
644 |
+
}
|
645 |
+
|
646 |
+
// Legacy: This removes the relationship between the slider and slide
|
647 |
+
// This restores the relationship between a slide and slider.
|
648 |
+
// If using a newer version, this relationship is never lost on delete.
|
649 |
+
|
650 |
+
// Get the slider's term and apply it to the slide.
|
651 |
+
$term = get_term_by('name', $slider_id, 'ml-slider');
|
652 |
+
return wp_set_object_terms($slide_id, $term->term_id, 'ml-slider');
|
653 |
+
}
|
654 |
+
|
655 |
+
/**
|
656 |
+
* Delete a slide via ajax.
|
657 |
+
*/
|
658 |
+
public function ajax_delete_slide() {
|
659 |
+
if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'metaslider_delete_slide')) {
|
660 |
+
return wp_send_json_error(array(
|
661 |
+
'message' => __('The security check failed. Please refresh the page and try again.', 'ml-slider')
|
662 |
+
), 401);
|
663 |
+
}
|
664 |
+
|
665 |
+
$result = $this->delete_slide(absint($_POST['slide_id']), absint($_POST['slider_id']));
|
666 |
+
|
667 |
+
if (is_wp_error($result)) {
|
668 |
+
return wp_send_json_error(array(
|
669 |
+
'message' => $result->get_error_message()
|
670 |
+
), 409);
|
671 |
+
}
|
672 |
+
|
673 |
+
return wp_send_json_success(array(
|
674 |
+
'message' => __('The slide was successfully trashed', 'ml-slider'),
|
675 |
+
), 200);
|
676 |
+
}
|
677 |
+
|
678 |
+
/**
|
679 |
+
* Delete a slide by either trashing it or for
|
680 |
+
* legacy reasons removing the taxonomy relationship.
|
681 |
+
* @param int $slide_id
|
682 |
+
* @param int $slider_id
|
683 |
+
* @return mixed Will return the terms or WP_Error
|
684 |
+
*/
|
685 |
+
public function delete_slide($slide_id, $slider_id) {
|
686 |
+
if ('ml-slide' === get_post_type($slide_id)) {
|
687 |
+
return wp_update_post(array(
|
688 |
+
'ID' => $slide_id,
|
689 |
+
'post_status' => 'trash'
|
690 |
+
), new WP_Error('update_failed', 'The attempt to delete the slide failed.', array('status' => 409)));
|
691 |
+
}
|
692 |
+
|
693 |
+
// Legacy: This removes the relationship between the slider and slide
|
694 |
+
/* A slider with ID 216 might have a term_id of 7
|
695 |
+
* A slide with ID 217 could have a term_taxonomy_id of 7
|
696 |
+
* Multiple slides would have this term_taxonomy_id of 7 */
|
697 |
+
|
698 |
+
// This returns the term_taxonomy_id (7 from example)
|
699 |
+
$current_terms = wp_get_object_terms($slide_id, 'ml-slider', array('fields' => 'ids'));
|
700 |
+
|
701 |
+
// This returns the term object, named after the slider ID
|
702 |
+
// The $term->term_id would be 7 in the example above
|
703 |
+
// It also includes the count of slides attached to the slider
|
704 |
+
$term = get_term_by('name', $slider_id, 'ml-slider');
|
705 |
+
|
706 |
+
// I'm not sure why this is here. It seems this is only useful if
|
707 |
+
// a slide was attached to multiple sliders. A slide should only
|
708 |
+
// have one $current_terms (7 above)
|
709 |
+
$new_terms = array();
|
710 |
+
foreach ($current_terms as $current_term) {
|
711 |
+
if ($current_term != $term->term_id) {
|
712 |
+
$new_terms[] = absint($current_term);
|
713 |
+
}
|
714 |
+
}
|
715 |
+
|
716 |
+
// This only works becasue $new_terms is an empty array,
|
717 |
+
// which deletes the relationship. I'm leaving the loop above
|
718 |
+
// in case it's here for some legacy reason I'm unaware of.
|
719 |
+
return wp_set_object_terms($slide_id, $new_terms, 'ml-slider');
|
720 |
+
}
|
721 |
+
|
722 |
+
|
723 |
+
/**
|
724 |
+
* Delete a slider (send it to trash)
|
725 |
+
*/
|
726 |
+
public function delete_slider() {
|
727 |
+
|
728 |
+
// check nonce
|
729 |
+
check_admin_referer( "metaslider_delete_slider" );
|
730 |
+
|
731 |
+
$capability = apply_filters( 'metaslider_capability', 'edit_others_posts' );
|
732 |
+
|
733 |
+
if ( ! current_user_can( $capability ) ) {
|
734 |
+
return;
|
735 |
+
}
|
736 |
+
|
737 |
+
$slider_id = absint( $_GET['slider_id'] );
|
738 |
+
|
739 |
+
if ( get_post_type( $slider_id ) != 'ml-slider' ) {
|
740 |
+
wp_redirect( admin_url( "admin.php?page=metaslider" ) );
|
741 |
+
wp_die();
|
742 |
+
}
|
743 |
+
|
744 |
+
// send the post to trash
|
745 |
+
$id = wp_update_post( array(
|
746 |
+
'ID' => $slider_id,
|
747 |
+
'post_status' => 'trash'
|
748 |
+
)
|
749 |
+
);
|
750 |
+
|
751 |
+
$this->delete_all_slides_from_slider($slider_id);
|
752 |
+
|
753 |
+
$slider_id = $this->find_slider( 'modified', 'DESC' );
|
754 |
+
|
755 |
+
wp_redirect( admin_url( "admin.php?page=metaslider&id={$slider_id}" ) );
|
756 |
+
|
757 |
+
}
|
758 |
+
|
759 |
+
|
760 |
+
/**
|
761 |
+
* Trashes all new format slides for a given slideshow ID
|
762 |
+
*
|
763 |
+
* @param int $slider_id
|
764 |
+
* @return int - The ID of the slideshow from which the slides were removed
|
765 |
+
*/
|
766 |
+
private function delete_all_slides_from_slider($slider_id) {
|
767 |
+
// find slides and trash them
|
768 |
+
$args = array(
|
769 |
+
'force_no_custom_order' => true,
|
770 |
+
'orderby' => 'menu_order',
|
771 |
+
'order' => 'ASC',
|
772 |
+
'post_type' => array('ml-slide'),
|
773 |
+
'post_status' => array('publish'),
|
774 |
+
'lang' => '', // polylang, ingore language filter
|
775 |
+
'suppress_filters' => 1, // wpml, ignore language filter
|
776 |
+
'posts_per_page' => -1,
|
777 |
+
'tax_query' => array(
|
778 |
+
array(
|
779 |
+
'taxonomy' => 'ml-slider',
|
780 |
+
'field' => 'slug',
|
781 |
+
'terms' => $slider_id
|
782 |
+
)
|
783 |
+
)
|
784 |
+
);
|
785 |
+
|
786 |
+
$query = new WP_Query( $args );
|
787 |
+
|
788 |
+
while ( $query->have_posts() ) {
|
789 |
+
$query->next_post();
|
790 |
+
$id = $query->post->ID;
|
791 |
+
|
792 |
+
$id = wp_update_post( array(
|
793 |
+
'ID' => $id,
|
794 |
+
'post_status' => 'trash'
|
795 |
+
)
|
796 |
+
);
|
797 |
+
}
|
798 |
+
|
799 |
+
return $slider_id;
|
800 |
+
}
|
801 |
+
|
802 |
+
|
803 |
+
/**
|
804 |
+
*
|
805 |
+
*/
|
806 |
+
public function switch_view() {
|
807 |
+
global $user_ID;
|
808 |
+
|
809 |
+
$view = $_GET['view'];
|
810 |
+
|
811 |
+
$allowed_views = array('tabs', 'dropdown');
|
812 |
+
|
813 |
+
if ( ! in_array( $view, $allowed_views ) ) {
|
814 |
+
return;
|
815 |
+
}
|
816 |
+
|
817 |
+
delete_user_meta( $user_ID, "metaslider_view" );
|
818 |
+
|
819 |
+
if ( $view == 'dropdown' ) {
|
820 |
+
add_user_meta( $user_ID, "metaslider_view", "dropdown");
|
821 |
+
}
|
822 |
+
|
823 |
+
wp_redirect( admin_url( "admin.php?page=metaslider" ) );
|
824 |
+
|
825 |
+
}
|
826 |
+
|
827 |
+
|
828 |
+
/**
|
829 |
+
* Create a new slider
|
830 |
+
*/
|
831 |
+
public function create_slider() {
|
832 |
+
|
833 |
+
// check nonce
|
834 |
+
check_admin_referer( "metaslider_create_slider" );
|
835 |
+
|
836 |
+
$capability = apply_filters( 'metaslider_capability', 'edit_others_posts' );
|
837 |
+
|
838 |
+
if ( ! current_user_can( $capability ) ) {
|
839 |
+
return;
|
840 |
+
}
|
841 |
+
|
842 |
+
$defaults = array();
|
843 |
+
|
844 |
+
// if possible, take a copy of the last edited slider settings in place of default settings
|
845 |
+
if ( $last_modified = $this->find_slider( 'modified', 'DESC' ) ) {
|
846 |
+
$defaults = get_post_meta( $last_modified, 'ml-slider_settings', true );
|
847 |
+
}
|
848 |
+
|
849 |
+
// insert the post
|
850 |
+
$id = wp_insert_post( array(
|
851 |
+
'post_title' => __("New Slideshow", "ml-slider"),
|
852 |
+
'post_status' => 'publish',
|
853 |
+
'post_type' => 'ml-slider'
|
854 |
+
)
|
855 |
+
);
|
856 |
+
|
857 |
+
// use the default settings if we can't find anything more suitable.
|
858 |
+
if ( empty( $defaults ) ) {
|
859 |
+
$slider = new MetaSlider( $id, array() );
|
860 |
+
$defaults = $slider->get_default_parameters();
|
861 |
+
}
|
862 |
+
|
863 |
+
// insert the post meta
|
864 |
+
add_post_meta( $id, 'ml-slider_settings', $defaults, true );
|
865 |
+
|
866 |
+
// create the taxonomy term, the term is the ID of the slider itself
|
867 |
+
wp_insert_term( $id, 'ml-slider' );
|
868 |
+
|
869 |
+
wp_redirect( admin_url( "admin.php?page=metaslider&id={$id}" ) );
|
870 |
+
|
871 |
+
}
|
872 |
+
|
873 |
+
|
874 |
+
|
875 |
+
/**
|
876 |
+
* Find a single slider ID. For example, last edited, or first published.
|
877 |
+
*
|
878 |
+
* @param string $orderby field to order.
|
879 |
+
* @param string $order direction (ASC or DESC).
|
880 |
+
* @return int slider ID.
|
881 |
+
*/
|
882 |
+
private function find_slider( $orderby, $order ) {
|
883 |
+
|
884 |
+
$args = array(
|
885 |
+
'force_no_custom_order' => true,
|
886 |
+
'post_type' => 'ml-slider',
|
887 |
+
'num_posts' => 1,
|
888 |
+
'post_status' => 'publish',
|
889 |
+
'suppress_filters' => 1, // wpml, ignore language filter
|
890 |
+
'orderby' => $orderby,
|
891 |
+
'order' => $order
|
892 |
+
);
|
893 |
+
|
894 |
+
$the_query = new WP_Query( $args );
|
895 |
+
|
896 |
+
while ( $the_query->have_posts() ) {
|
897 |
+
$the_query->the_post();
|
898 |
+
return $the_query->post->ID;
|
899 |
+
}
|
900 |
+
|
901 |
+
wp_reset_query();
|
902 |
+
|
903 |
+
return false;
|
904 |
+
|
905 |
+
}
|
906 |
+
|
907 |
+
|
908 |
+
/**
|
909 |
+
* Get sliders. Returns a nicely formatted array of currently
|
910 |
+
* published sliders.
|
911 |
+
*
|
912 |
+
* @param string $sort_key
|
913 |
+
* @return array all published sliders
|
914 |
+
*/
|
915 |
+
public function all_meta_sliders( $sort_key = 'date' ) {
|
916 |
+
|
917 |
+
$sliders = array();
|
918 |
+
|
919 |
+
// list the tabs
|
920 |
+
$args = array(
|
921 |
+
'post_type' => 'ml-slider',
|
922 |
+
'post_status' => 'publish',
|
923 |
+
'orderby' => $sort_key,
|
924 |
+
'suppress_filters' => 1, // wpml, ignore language filter
|
925 |
+
'order' => 'ASC',
|
926 |
+
'posts_per_page' => -1
|
927 |
+
);
|
928 |
+
|
929 |
+
$args = apply_filters( 'metaslider_all_meta_sliders_args', $args );
|
930 |
+
|
931 |
+
// WP_Query causes issues with other plugins using admin_footer to insert scripts
|
932 |
+
// use get_posts instead
|
933 |
+
$all_sliders = get_posts( $args );
|
934 |
+
|
935 |
+
foreach( $all_sliders as $slideshow ) {
|
936 |
+
|
937 |
+
$active = $this->slider && ( $this->slider->id == $slideshow->ID ) ? true : false;
|
938 |
+
|
939 |
+
$sliders[] = array(
|
940 |
+
'active' => $active,
|
941 |
+
'title' => $slideshow->post_title,
|
942 |
+
'id' => $slideshow->ID
|
943 |
+
);
|
944 |
+
|
945 |
+
}
|
946 |
+
|
947 |
+
return $sliders;
|
948 |
+
|
949 |
+
}
|
950 |
+
|
951 |
+
|
952 |
+
/**
|
953 |
+
* Compare array values
|
954 |
+
*
|
955 |
+
* @param array $elem1
|
956 |
+
* @param array $elem2
|
957 |
+
* @return bool
|
958 |
+
*/
|
959 |
+
private function compare_elems( $elem1, $elem2 ) {
|
960 |
+
|
961 |
+
return $elem1['priority'] > $elem2['priority'];
|
962 |
+
|
963 |
+
}
|
964 |
+
|
965 |
+
|
966 |
+
/**
|
967 |
+
*
|
968 |
+
* @param array $aFields - array of field to render
|
969 |
+
* @return string
|
970 |
+
*/
|
971 |
+
public function build_settings_rows( $aFields ) {
|
972 |
+
|
973 |
+
// order the fields by priority
|
974 |
+
uasort( $aFields, array( $this, "compare_elems" ) );
|
975 |
+
|
976 |
+
$return = "";
|
977 |
+
|
978 |
+
// loop through the array and build the settings HTML
|
979 |
+
foreach ( $aFields as $id => $row ) {
|
980 |
+
// checkbox input type
|
981 |
+
if ( $row['type'] == 'checkbox' ) {
|
982 |
+
$return .= "<tr><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='checkbox' name='settings[{$id}]' {$row['checked']} />";
|
983 |
+
|
984 |
+
if ( isset( $row['after'] ) ) {
|
985 |
+
$return .= "<span class='after'>{$row['after']}</span>";
|
986 |
+
}
|
987 |
+
|
988 |
+
$return .= "</td></tr>";
|
989 |
+
}
|
990 |
+
|
991 |
+
// navigation row
|
992 |
+
if ( $row['type'] == 'navigation' ) {
|
993 |
+
$navigation_row = "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><ul>";
|
994 |
+
|
995 |
+
foreach ( $row['options'] as $k => $v ) {
|
996 |
+
$tease = isset($v['addon_required']) ? 'disabled' : '';
|
997 |
+
|
998 |
+
if ( $row['value'] === true && $k === 'true' ) {
|
999 |
+
$checked = checked( true, true, false );
|
1000 |
+
} else if ( $row['value'] === false && $k === 'false' ) {
|
1001 |
+
$checked = checked( true, true, false );
|
1002 |
+
} else {
|
1003 |
+
$checked = checked( $k, $row['value'], false );
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
$disabled = $k == 'thumbnails' ? 'disabled' : '';
|
1007 |
+
$navigation_row .= "<li><label class='{$tease}'><input {$tease} type='radio' name='settings[{$id}]' value='{$k}' {$checked} {$disabled}/>{$v['label']}</label>";
|
1008 |
+
|
1009 |
+
if (isset($v['addon_required']) && $v['addon_required']) {
|
1010 |
+
$navigation_row .= sprintf(" <a target='_blank' class='get-addon' href='%s' title='%s'>%s</a>", metaslider_get_upgrade_link(), __('Get the add-on pack today!', 'ml-slider'), __('Learn More', 'ml-slider'));
|
1011 |
+
}
|
1012 |
+
|
1013 |
+
$navigation_row .= "</li>";
|
1014 |
+
}
|
1015 |
+
|
1016 |
+
$navigation_row .= "</ul></td></tr>";
|
1017 |
+
|
1018 |
+
$return .= apply_filters( 'metaslider_navigation_options', $navigation_row, $this->slider );
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
// navigation row
|
1022 |
+
if ( $row['type'] == 'radio' ) {
|
1023 |
+
$navigation_row = "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><ul>";
|
1024 |
+
|
1025 |
+
foreach ( $row['options'] as $k => $v ) {
|
1026 |
+
$checked = checked( $k, $row['value'], false );
|
1027 |
+
$class = isset( $v['class'] ) ? $v['class'] : "";
|
1028 |
+
$navigation_row .= "<li><label><input type='radio' name='settings[{$id}]' value='{$k}' {$checked} class='radio {$class}'/>{$v['label']}</label></li>";
|
1029 |
+
}
|
1030 |
+
|
1031 |
+
$navigation_row .= "</ul></td></tr>";
|
1032 |
+
|
1033 |
+
$return .= apply_filters( 'metaslider_navigation_options', $navigation_row, $this->slider );
|
1034 |
+
}
|
1035 |
+
|
1036 |
+
// header/divider row
|
1037 |
+
if ( $row['type'] == 'divider' ) {
|
1038 |
+
$return .= "<tr class='{$row['type']}'><td colspan='2' class='divider'><b>{$row['value']}</b></td></tr>";
|
1039 |
+
}
|
1040 |
+
|
1041 |
+
// slideshow select row
|
1042 |
+
if ( $row['type'] == 'slider-lib' ) {
|
1043 |
+
$return .= "<tr class='{$row['type']}'><td colspan='2' class='slider-lib-row'>";
|
1044 |
+
|
1045 |
+
foreach ( $row['options'] as $k => $v ) {
|
1046 |
+
$checked = checked( $k, $row['value'], false );
|
1047 |
+
$return .= "<input class='select-slider' id='{$k}' rel='{$k}' type='radio' name='settings[type]' value='{$k}' {$checked} />
|
1048 |
+
<label tabindex='0' for='{$k}'>{$v['label']}</label>";
|
1049 |
+
}
|
1050 |
+
|
1051 |
+
$return .= "</td></tr>";
|
1052 |
+
}
|
1053 |
+
|
1054 |
+
// number input type
|
1055 |
+
if ( $row['type'] == 'number' ) {
|
1056 |
+
$return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='number' min='{$row['min']}' max='{$row['max']}' step='{$row['step']}' name='settings[{$id}]' value='" . absint( $row['value'] ) . "' /><span class='after'>{$row['after']}</span></td></tr>";
|
1057 |
+
}
|
1058 |
+
|
1059 |
+
// select drop down
|
1060 |
+
if ( $row['type'] == 'select' ) {
|
1061 |
+
$return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><select class='option {$row['class']} {$id}' name='settings[{$id}]'>";
|
1062 |
+
foreach ( $row['options'] as $k => $v ) {
|
1063 |
+
$selected = selected( $k, $row['value'], false );
|
1064 |
+
$return .= "<option class='{$v['class']}' value='{$k}' {$selected}>{$v['label']}</option>";
|
1065 |
+
}
|
1066 |
+
$return .= "</select></td></tr>";
|
1067 |
+
}
|
1068 |
+
|
1069 |
+
// theme drop down
|
1070 |
+
if ( $row['type'] == 'theme' ) {
|
1071 |
+
$return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><select class='option {$row['class']} {$id}' name='settings[{$id}]'>";
|
1072 |
+
$themes = "";
|
1073 |
+
|
1074 |
+
foreach ( $row['options'] as $k => $v ) {
|
1075 |
+
$selected = selected( $k, $row['value'], false );
|
1076 |
+
$themes .= "<option class='{$v['class']}' value='{$k}' {$selected}>{$v['label']}</option>";
|
1077 |
+
}
|
1078 |
+
|
1079 |
+
$return .= apply_filters( 'metaslider_get_available_themes', $themes, $this->slider->get_setting( 'theme' ) );
|
1080 |
+
|
1081 |
+
$return .= "</select></td></tr>";
|
1082 |
+
}
|
1083 |
+
|
1084 |
+
// text input type
|
1085 |
+
if ( $row['type'] == 'text' ) {
|
1086 |
+
$return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='text' name='settings[{$id}]' value='" . esc_attr( $row['value'] ) . "' /></td></tr>";
|
1087 |
+
}
|
1088 |
+
|
1089 |
+
// text input type
|
1090 |
+
if ( $row['type'] == 'textarea' ) {
|
1091 |
+
$return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\" colspan='2'>{$row['label']}</td></tr><tr><td colspan='2'><textarea class='option {$row['class']} {$id}' name='settings[{$id}]' />{$row['value']}</textarea></td></tr>";
|
1092 |
+
}
|
1093 |
+
|
1094 |
+
// text input type
|
1095 |
+
if ( $row['type'] == 'title' ) {
|
1096 |
+
$return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='text' name='{$id}' value='" . esc_attr( $row['value'] ) . "' /></td></tr>";
|
1097 |
+
}
|
1098 |
+
}
|
1099 |
+
|
1100 |
+
return $return;
|
1101 |
+
|
1102 |
+
}
|
1103 |
+
|
1104 |
+
|
1105 |
+
/**
|
1106 |
+
* Return an indexed array of all easing options
|
1107 |
+
*
|
1108 |
+
* @return array
|
1109 |
+
*/
|
1110 |
+
private function get_easing_options() {
|
1111 |
+
|
1112 |
+
$options = array(
|
1113 |
+
'linear', 'swing', 'jswing', 'easeInQuad', 'easeOutQuad', 'easeInOutQuad',
|
1114 |
+
'easeInCubic', 'easeOutCubic', 'easeInOutCubic', 'easeInQuart',
|
1115 |
+
'easeOutQuart', 'easeInOutQuart', 'easeInQuint', 'easeOutQuint',
|
1116 |
+
'easeInOutQuint', 'easeInSine', 'easeOutSine', 'easeInOutSine',
|
1117 |
+
'easeInExpo', 'easeOutExpo', 'easeInOutExpo', 'easeInCirc', 'easeOutCirc',
|
1118 |
+
'easeInOutCirc', 'easeInElastic', 'easeOutElastic', 'easeInOutElastic',
|
1119 |
+
'easeInBack', 'easeOutBack', 'easeInOutBack', 'easeInBounce', 'easeOutBounce',
|
1120 |
+
'easeInOutBounce'
|
1121 |
+
);
|
1122 |
+
|
1123 |
+
foreach ( $options as $option ) {
|
1124 |
+
$return[$option] = array(
|
1125 |
+
'label' => ucfirst( preg_replace( '/(\w+)([A-Z])/U', '\\1 \\2', $option ) ),
|
1126 |
+
'class' => ''
|
1127 |
+
);
|
1128 |
+
}
|
1129 |
+
|
1130 |
+
return $return;
|
1131 |
+
|
1132 |
+
}
|
1133 |
+
|
1134 |
+
/**
|
1135 |
+
* Output the slideshow selector.
|
1136 |
+
*
|
1137 |
+
* Show tabs or a dropdown list depending on the users saved preference.
|
1138 |
+
*/
|
1139 |
+
public function print_slideshow_selector() {
|
1140 |
+
global $user_ID;
|
1141 |
+
|
1142 |
+
// First check if we have any slideshows yet
|
1143 |
+
if ($tabs = $this->all_meta_sliders()) {
|
1144 |
+
|
1145 |
+
// Next check if they have the tabs view selected
|
1146 |
+
if ('tabs' == $this->get_view()) {
|
1147 |
+
|
1148 |
+
// Render the tabs
|
1149 |
+
echo "<div class='nav-tab-wrapper'>";
|
1150 |
+
foreach ($tabs as $tab) {
|
1151 |
+
if ( $tab['active'] ) {
|
1152 |
+
echo "<div class='nav-tab nav-tab-active'><input class='no_last_pass' type='text' name='title' value='" . esc_attr($tab['title']) . "'></div>";
|
1153 |
+
} else {
|
1154 |
+
echo "<a href='?page=metaslider&id={$tab['id']}' title= '" . esc_attr($tab['title']) . "' class='nav-tab'>" . esc_html( $tab['title'] ) . "</a>";
|
1155 |
+
}
|
1156 |
+
}
|
1157 |
+
echo $this->get_add_slideshow_button("New", 'nav-tab');
|
1158 |
+
echo "</div>";
|
1159 |
+
|
1160 |
+
// This will render the select dropdown view
|
1161 |
+
// TODO make this resemble the WP Nav menu UI perhaps
|
1162 |
+
} else {
|
1163 |
+
echo "<div class='manage-menus'><label for='select-slideshow' class='selected-menu'>" . __("Select Slideshow", "ml-slider") . ": </label>";
|
1164 |
+
echo "<select name='select-slideshow' onchange='if (this.value) window.location.href=this.value'>";
|
1165 |
+
|
1166 |
+
$tabs = $this->all_meta_sliders('title');
|
1167 |
+
foreach ($tabs as $tab) {
|
1168 |
+
$selected = $tab['active'] ? " selected" : "";
|
1169 |
+
if ($tab['active']) {
|
1170 |
+
$title = $tab['title'];
|
1171 |
+
}
|
1172 |
+
echo "<option value='?page=metaslider&id={$tab['id']}'{$selected}>{$tab['title']}</option>";
|
1173 |
+
}
|
1174 |
+
echo "</select>";
|
1175 |
+
echo "<span class='add-new-menu-action'> " . __( 'or', "ml-slider" ) . " ";
|
1176 |
+
echo "<a href='". wp_nonce_url(admin_url("admin-post.php?action=metaslider_create_slider"), "metaslider_create_slider") ."' id='create_new_tab' class='' title='" . __('Create a New Slideshow', 'ml-slider') . "'>create a new slideshow</a>";
|
1177 |
+
echo "</span></div>";
|
1178 |
+
}
|
1179 |
+
|
1180 |
+
// This section is shown when there are no slideshows
|
1181 |
+
} else {
|
1182 |
+
echo "<div class='nav-tab-wrapper'>";
|
1183 |
+
echo "<div class='fake-tabs nav-tab nav-tab-active'><span class='blurred-out'>" . __('New Slideshow', 'ml-slider') ."</span></div>";
|
1184 |
+
echo $this->get_add_slideshow_button("New", 'nav-tab');
|
1185 |
+
echo "</div>";
|
1186 |
+
}
|
1187 |
+
}
|
1188 |
+
|
1189 |
+
/**
|
1190 |
+
* Return a button to sadd a new slideshow.
|
1191 |
+
*/
|
1192 |
+
protected function get_add_slideshow_button($text = '', $classes = '') {
|
1193 |
+
$add_url = wp_nonce_url(admin_url("admin-post.php?action=metaslider_create_slider"), "metaslider_create_slider");
|
1194 |
+
if ('' == $text) {
|
1195 |
+
$text = __('Add a New Slideshow', 'ml-slider');
|
1196 |
+
}
|
1197 |
+
return "<a href='{$add_url}' id='create_new_tab' class='ml-add-new {$classes}' title='" . __('Add a New Slideshow', 'ml-slider') . "'><i><svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-plus-circle'><circle cx='12' cy='12' r='10'/><line x1='12' y1='8' x2='12' y2='16'/><line x1='8' y1='12' x2='16' y2='12'/></svg></i> {$text}</a>";
|
1198 |
+
}
|
1199 |
+
|
1200 |
+
/**
|
1201 |
+
* Return the users saved view preference.
|
1202 |
+
*/
|
1203 |
+
public function get_view() {
|
1204 |
+
global $user_ID;
|
1205 |
+
|
1206 |
+
if ( get_user_meta( $user_ID, "metaslider_view", true ) ) {
|
1207 |
+
return get_user_meta( $user_ID, "metaslider_view", true );
|
1208 |
+
}
|
1209 |
+
|
1210 |
+
return 'tabs';
|
1211 |
+
}
|
1212 |
+
|
1213 |
+
|
1214 |
+
/**
|
1215 |
+
* Render the admin page (tabs, slides, settings)
|
1216 |
+
*/
|
1217 |
+
public function render_admin_page() {
|
1218 |
+
|
1219 |
+
// Default to the most recently modified slider
|
1220 |
+
$slider_id = $this->find_slider('modified', 'DESC');
|
1221 |
+
|
1222 |
+
// If the id parameter exists, verify and use that.
|
1223 |
+
if (isset($_REQUEST['id']) && $id = $_REQUEST['id']) {
|
1224 |
+
if (in_array(get_post_status(absint($id)), array('publish', 'inherit'))) {
|
1225 |
+
$slider_id = $id;
|
1226 |
+
}
|
1227 |
+
}
|
1228 |
+
|
1229 |
+
// "Set the slider"
|
1230 |
+
// TODO figure out what this does and if it can be better stated
|
1231 |
+
// Perhaps maybe "apply_settings()" or something.
|
1232 |
+
if ($slider_id) {
|
1233 |
+
$this->set_slider($slider_id);
|
1234 |
+
}
|
1235 |
+
|
1236 |
+
echo "<div class='wrap metaslider-ui-top' style='margin-top:0;'>";
|
1237 |
+
echo $this->documentation_button();
|
1238 |
+
echo $this->toggle_layout_button();
|
1239 |
+
|
1240 |
+
if (metaslider_sees_call_to_action()) {
|
1241 |
+
echo $this->upgrade_to_pro_top_button();
|
1242 |
+
}
|
1243 |
+
echo "</div>";
|
1244 |
+
|
1245 |
+
$this->do_system_check();
|
1246 |
+
|
1247 |
+
$slider_id = $this->slider ? $this->slider->id : 0;
|
1248 |
+
|
1249 |
+
?>
|
1250 |
+
|
1251 |
+
<script type='text/javascript'>
|
1252 |
+
var metaslider_slider_id = <?php echo $slider_id; ?>;
|
1253 |
+
</script>
|
1254 |
+
|
1255 |
+
<div class="wrap metaslider metaslider-ui">
|
1256 |
+
<h1 class="wp-heading-inline metaslider-title">
|
1257 |
+
<img width=50 height=50 src="<?php echo METASLIDER_ADMIN_URL ?>images/metaslider_logo_large.png" alt="MetaSlider">
|
1258 |
+
MetaSlider
|
1259 |
+
<?php if (metaslider_is_pro_active()) {
|
1260 |
+
echo ' Pro';
|
1261 |
+
} ?>
|
1262 |
+
</h1>
|
1263 |
+
<?php if (metaslider_sees_notices($this)) {
|
1264 |
+
echo $this->notices->do_notice(false, 'header', true);
|
1265 |
+
} ?>
|
1266 |
+
<form accept-charset="UTF-8" action="<?php echo admin_url( 'admin-post.php'); ?>" method="post">
|
1267 |
+
<input type="hidden" name="action" value="metaslider_update_slider">
|
1268 |
+
<input type="hidden" name="slider_id" value="<?php echo $slider_id; ?>">
|
1269 |
+
<?php wp_nonce_field( 'metaslider_update_slider' ); ?>
|
1270 |
+
|
1271 |
+
<?php $this->print_slideshow_selector(); ?>
|
1272 |
+
|
1273 |
+
<?php if ( ! $this->slider ) return; ?>
|
1274 |
+
|
1275 |
+
<div id='poststuff' class="metaslider-inner wp-clearfix">
|
1276 |
+
<div id='post-body' class='metabox-holder columns-2'>
|
1277 |
+
|
1278 |
+
<div id='post-body-content'>
|
1279 |
+
<div class="left">
|
1280 |
+
|
1281 |
+
<?php do_action( "metaslider_admin_table_before", $this->slider->id ); ?>
|
1282 |
+
|
1283 |
+
<table class="widefat sortable metaslider-slides-container">
|
1284 |
+
<thead>
|
1285 |
+
<tr>
|
1286 |
+
<?php if (metaslider_viewing_trashed_slides($this->slider->id)) {
|
1287 |
+
|
1288 |
+
// If they are on the trash page, show them?>
|
1289 |
+
<th class="trashed-header">
|
1290 |
+
<h3><i><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-trash-2"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg></i> <?php _e('Trashed Slides', 'ml-slider'); ?></h3>
|
1291 |
+
<small> <?php printf(__('<a href="%s">view active</a>', 'ml-slider'), admin_url("?page=metaslider&id={$this->slider->id}")); ?></small>
|
1292 |
+
</th>
|
1293 |
+
<?php } else { ?>
|
1294 |
+
<th class="slider-title" colspan="2">
|
1295 |
+
<h3 class="alignleft"><?php echo get_the_title($this->slider->id) ?></h3>
|
1296 |
+
<input class="metaslider-shortcode" readonly='readonly' onclick="this.select()" type='text' value='[metaslider id=<?php echo $this->slider->id ?>]'>
|
1297 |
+
<?php if (!metaslider_viewing_trashed_slides($this->slider->id)) {
|
1298 |
+
|
1299 |
+
// Remove the actions on trashed view?>
|
1300 |
+
<button class='ml-button ml-has-icon ml-skinless-button alignright add-slide' data-editor='content' title='<?php _e( "Add a New Slide", "ml-slider" ) ?>'>
|
1301 |
+
<i style="top:0;"><svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus-circle"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="16"/><line x1="8" y1="12" x2="16" y2="12"/></svg></i>
|
1302 |
+
<span><?php _e("Add Slide", "ml-slider") ?></span>
|
1303 |
+
</button>
|
1304 |
+
<?php } ?>
|
1305 |
+
<?php do_action( "metaslider_admin_table_header_right", $this->slider->id ); ?>
|
1306 |
+
</th>
|
1307 |
+
<?php } ?>
|
1308 |
+
</tr>
|
1309 |
+
</thead>
|
1310 |
+
|
1311 |
+
<tbody>
|
1312 |
+
<?php
|
1313 |
+
$this->slider->render_admin_slides();
|
1314 |
+
?>
|
1315 |
+
</tbody>
|
1316 |
+
</table>
|
1317 |
+
|
1318 |
+
<?php do_action( "metaslider_admin_table_after", $this->slider->id ); ?>
|
1319 |
+
|
1320 |
+
</div>
|
1321 |
+
</div>
|
1322 |
+
|
1323 |
+
<div id="postbox-container-1" class="postbox-container ml-sidebar metaslider-settings-area">
|
1324 |
+
<div class='right'>
|
1325 |
+
<?php if (metaslider_viewing_trashed_slides($this->slider->id)) {
|
1326 |
+
|
1327 |
+
// Show a notice explaining the trash?>
|
1328 |
+
<div class="ms-postbox trashed-notice">
|
1329 |
+
<div class="notice-info"><?php printf(__('You are viewing slides that have been trashed, which will be automatically deleted in %s days. Click <a href="%s">here</a> to view active slides.', 'ml-slider'), EMPTY_TRASH_DAYS, admin_url("?page=metaslider&id={$this->slider->id}")); ?></div>
|
1330 |
+
|
1331 |
+
<?php // TODO this is a temp fix to avoid a compatability check in pro
|
1332 |
+
echo "<input type='checkbox' style='display:none;' checked class='select-slider' rel='flex'></inpu>";
|
1333 |
+
?>
|
1334 |
+
</div>
|
1335 |
+
<?php } else {?>
|
1336 |
+
<div class="ms-postbox" id="metaslider_configuration">
|
1337 |
+
<div class='configuration metaslider-actions'>
|
1338 |
+
<button class='metaslider-preview ml-button ml-has-icon ml-skinless-button' type='submit' id='ms-preview' title='<?php _e("Preview Slideshow", "ml-slider") ?>' data-slider_id='<?php echo $this->slider->id ?>' data-slider_width='<?php echo $this->slider->get_setting("width"); ?>' data-slider_height='<?php echo $this->slider->get_setting("height") ?>'>
|
1339 |
+
<i><svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg></i>
|
1340 |
+
<span><?php _e("Preview", "ml-slider") ?></span>
|
1341 |
+
</button>
|
1342 |
+
<button class='alignright button button-primary' type='submit' name='save' id='ms-save'>
|
1343 |
+
<?php _e("Save", "ml-slider"); ?>
|
1344 |
+
</button>
|
1345 |
+
<span class="spinner"></span>
|
1346 |
+
</div>
|
1347 |
+
<div class="inside wp-clearfix">
|
1348 |
+
<table class="settings">
|
1349 |
+
<tbody>
|
1350 |
+
<?php
|
1351 |
+
$aFields = array(
|
1352 |
+
'type' => array(
|
1353 |
+
'priority' => 0,
|
1354 |
+
'type' => 'slider-lib',
|
1355 |
+
'value' => $this->slider->get_setting('type'),
|
1356 |
+
'options' => array(
|
1357 |
+
'flex' => array('label' => "FlexSlider"),
|
1358 |
+
'responsive' => array('label' => "R. Slides"),
|
1359 |
+
'nivo' => array('label' => "Nivo Slider"),
|
1360 |
+
'coin' => array('label' => "Coin Slider")
|
1361 |
+
)
|
1362 |
+
),
|
1363 |
+
'width' => array(
|
1364 |
+
'priority' => 10,
|
1365 |
+
'type' => 'number',
|
1366 |
+
'size' => 3,
|
1367 |
+
'min' => 0,
|
1368 |
+
'max' => 9999,
|
1369 |
+
'step' => 1,
|
1370 |
+
'value' => $this->slider->get_setting( 'width' ),
|
1371 |
+
'label' => __( "Width", "ml-slider" ),
|
1372 |
+
'class' => 'coin flex responsive nivo',
|
1373 |
+
'helptext' => __( "Slideshow width", "ml-slider" ),
|
1374 |
+
'after' => __( "px", "ml-slider" )
|
1375 |
+
),
|
1376 |
+
'height' => array(
|
1377 |
+
'priority' => 20,
|
1378 |
+
'type' => 'number',
|
1379 |
+
'size' => 3,
|
1380 |
+
'min' => 0,
|
1381 |
+
'max' => 9999,
|
1382 |
+
'step' => 1,
|
1383 |
+
'value' => $this->slider->get_setting( 'height' ),
|
1384 |
+
'label' => __( "Height", "ml-slider" ),
|
1385 |
+
'class' => 'coin flex responsive nivo',
|
1386 |
+
'helptext' => __( "Slideshow height", "ml-slider" ),
|
1387 |
+
'after' => __( "px", "ml-slider" )
|
1388 |
+
),
|
1389 |
+
'effect' => array(
|
1390 |
+
'priority' => 30,
|
1391 |
+
'type' => 'select',
|
1392 |
+
'value' => $this->slider->get_setting( 'effect' ),
|
1393 |
+
'label' => __( "Effect", "ml-slider" ),
|
1394 |
+
'class' => 'effect coin flex responsive nivo',
|
1395 |
+
'helptext' => __( "Slide transition effect", "ml-slider" ),
|
1396 |
+
'options' => array(
|
1397 |
+
'random' => array( 'class' => 'option coin nivo' , 'label' => __( "Random", "ml-slider" ) ),
|
1398 |
+
'swirl' => array( 'class' => 'option coin', 'label' => __( "Swirl", "ml-slider" ) ),
|
1399 |
+
'rain' => array( 'class' => 'option coin', 'label' => __( "Rain", "ml-slider" ) ),
|
1400 |
+
'straight' => array( 'class' => 'option coin', 'label' => __( "Straight", "ml-slider" ) ),
|
1401 |
+
'sliceDown' => array( 'class' => 'option nivo', 'label' => __( "Slide Down", "ml-slider" ) ),
|
1402 |
+
'sliceUp' => array( 'class' => 'option nivo', 'label' => __( "Slice Up", "ml-slider" ) ),
|
1403 |
+
'sliceUpLeft' => array( 'class' => 'option nivo', 'label' => __( "Slide Up Left", "ml-slider" ) ),
|
1404 |
+
'sliceUpDown' => array( 'class' => 'option nivo', 'label' => __( "Slice Up Down", "ml-slider" ) ),
|
1405 |
+
'slideUpDownLeft' => array( 'class' => 'option nivo', 'label' => __( "Slide Up Down Left", "ml-slider" ) ),
|
1406 |
+
'fold' => array( 'class' => 'option nivo', 'label' => __( "Fold", "ml-slider" ) ),
|
1407 |
+
'fade' => array( 'class' => 'option nivo flex responsive', 'label' => __( "Fade", "ml-slider" ) ),
|
1408 |
+
'slideInRight' => array( 'class' => 'option nivo', 'label' => __( "Slide In Right", "ml-slider" ) ),
|
1409 |
+
'slideInLeft' => array( 'class' => 'option nivo', 'label' => __( "Slide In Left", "ml-slider" ) ),
|
1410 |
+
'boxRandom' => array( 'class' => 'option nivo', 'label' => __( "Box Random", "ml-slider" ) ),
|
1411 |
+
'boxRain' => array( 'class' => 'option nivo', 'label' => __( "Box Rain", "ml-slider" ) ),
|
1412 |
+
'boxRainReverse' => array( 'class' => 'option nivo', 'label' => __( "Box Rain Reverse", "ml-slider" ) ),
|
1413 |
+
'boxRainGrowReverse' => array( 'class' => 'option nivo', 'label' => __( "Box Rain Grow Reverse", "ml-slider" ) ),
|
1414 |
+
'slide' => array( 'class' => 'option flex', 'label' => __( "Slide", "ml-slider" ) )
|
1415 |
+
),
|
1416 |
+
),
|
1417 |
+
'theme' => array(
|
1418 |
+
'priority' => 40,
|
1419 |
+
'type' => 'theme',
|
1420 |
+
'value' => $this->slider->get_setting( 'theme' ),
|
1421 |
+
'label' => __( "Theme", "ml-slider" ),
|
1422 |
+
'class' => 'effect coin flex responsive nivo',
|
1423 |
+
'helptext' => __( "Slideshow theme", "ml-slider" ),
|
1424 |
+
'options' => array(
|
1425 |
+
'default' => array( 'class' => 'option nivo flex coin responsive' , 'label' => __( "Default", "ml-slider" ) ),
|
1426 |
+
'dark' => array( 'class' => 'option nivo', 'label' => __( "Dark (Nivo)", "ml-slider" ) ),
|
1427 |
+
'light' => array( 'class' => 'option nivo', 'label' => __( "Light (Nivo)", "ml-slider" ) ),
|
1428 |
+
'bar' => array( 'class' => 'option nivo', 'label' => __( "Bar (Nivo)", "ml-slider" ) ),
|
1429 |
+
),
|
1430 |
+
),
|
1431 |
+
'links' => array(
|
1432 |
+
'priority' => 50,
|
1433 |
+
'type' => 'checkbox',
|
1434 |
+
'label' => __( "Arrows", "ml-slider" ),
|
1435 |
+
'class' => 'option coin flex nivo responsive',
|
1436 |
+
'checked' => $this->slider->get_setting( 'links' ) == 'true' ? 'checked' : '',
|
1437 |
+
'helptext' => __( "Show the previous/next arrows", "ml-slider" )
|
1438 |
+
),
|
1439 |
+
'navigation' => array(
|
1440 |
+
'priority' => 60,
|
1441 |
+
'type' => 'navigation',
|
1442 |
+
'label' => __("Navigation", "ml-slider"),
|
1443 |
+
'class' => 'option coin flex nivo responsive',
|
1444 |
+
'value' => $this->slider->get_setting('navigation'),
|
1445 |
+
'helptext' => __("Show the slide navigation bullets", "ml-slider"),
|
1446 |
+
'options' => array(
|
1447 |
+
'false' => array('label' => __("Hidden", "ml-slider")),
|
1448 |
+
'true' => array('label' => __("Dots", "ml-slider")),
|
1449 |
+
'thumbs' => array(
|
1450 |
+
'label' => __("Thumbnail", "ml-slider"),
|
1451 |
+
'addon_required' => true
|
1452 |
+
),
|
1453 |
+
'filmstrip' => array(
|
1454 |
+
'label' => __("Filmstrip", "ml-slider"),
|
1455 |
+
'addon_required' => true
|
1456 |
+
),
|
1457 |
+
)
|
1458 |
+
),
|
1459 |
+
);
|
1460 |
+
|
1461 |
+
if ( $this->get_view() == 'dropdown' ) {
|
1462 |
+
$aFields['title'] = array(
|
1463 |
+
'type' => 'title',
|
1464 |
+
'priority' => 5,
|
1465 |
+
'class' => 'option flex nivo responsive coin',
|
1466 |
+
'value' => get_the_title($this->slider->id),
|
1467 |
+
'label' => __( "Title", "ml-slider" ),
|
1468 |
+
'helptext' => __( "Slideshow title", "ml-slider" )
|
1469 |
+
);
|
1470 |
+
}
|
1471 |
+
|
1472 |
+
$aFields = apply_filters( 'metaslider_basic_settings', $aFields, $this->slider );
|
1473 |
+
|
1474 |
+
echo $this->build_settings_rows( $aFields );
|
1475 |
+
?>
|
1476 |
+
</tbody>
|
1477 |
+
</table>
|
1478 |
+
|
1479 |
+
|
1480 |
+
<?php // Show the restore button if there are trashed posts
|
1481 |
+
// Also, render but hide the link in case we want to show
|
1482 |
+
// it when the user deletes their first slide
|
1483 |
+
$count = count(metaslider_has_trashed_slides($this->slider->id));
|
1484 |
+
if (!metaslider_viewing_trashed_slides($this->slider->id)) { ?>
|
1485 |
+
<a <?php echo $count ? '' : "style='display:none;'" ?> class="restore-slide-link" title="<?php _e('View trashed slides', 'ml-slider'); ?>" href="<?php echo admin_url("?page=metaslider&id={$this->slider->id}&show_trashed=true"); ?>">
|
1486 |
+
<i><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-trash-2"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg></i><?php echo __('Trash', 'ml-slider'); if ($count) echo " <span>({$count})</span>";?>
|
1487 |
+
</a>
|
1488 |
+
<?php } ?>
|
1489 |
+
</div>
|
1490 |
+
</div>
|
1491 |
+
|
1492 |
+
<div class="ms-postbox ms-toggle closed" id="metaslider_advanced_settings">
|
1493 |
+
<div class="handlediv" title="Click to toggle"><br></div><h3 class="hndle"><span><?php _e( "Advanced Settings", "ml-slider" ) ?></span></h3>
|
1494 |
+
<div class="inside">
|
1495 |
+
<table>
|
1496 |
+
<tbody>
|
1497 |
+
<?php
|
1498 |
+
$aFields = array(
|
1499 |
+
'fullWidth' => array(
|
1500 |
+
'priority' => 5,
|
1501 |
+
'type' => 'checkbox',
|
1502 |
+
'label' => __( "Stretch", "ml-slider" ),
|
1503 |
+
'class' => 'option flex nivo responsive',
|
1504 |
+
'after' => __( "100% wide output", "ml-slider" ),
|
1505 |
+
'checked' => $this->slider->get_setting( 'fullWidth' ) == 'true' ? 'checked' : '',
|
1506 |
+
'helptext' => __( "Stretch the slideshow output to fill it's parent container", "ml-slider" )
|
1507 |
+
),
|
1508 |
+
'center' => array(
|
1509 |
+
'priority' => 10,
|
1510 |
+
'type' => 'checkbox',
|
1511 |
+
'label' => __( "Center align", "ml-slider" ),
|
1512 |
+
'class' => 'option coin flex nivo responsive',
|
1513 |
+
'checked' => $this->slider->get_setting( 'center' ) == 'true' ? 'checked' : '',
|
1514 |
+
'helptext' => __( "Center align the slideshow", "ml-slider" )
|
1515 |
+
),
|
1516 |
+
'autoPlay' => array(
|
1517 |
+
'priority' => 20,
|
1518 |
+
'type' => 'checkbox',
|
1519 |
+
'label' => __( "Auto play", "ml-slider" ),
|
1520 |
+
'class' => 'option flex nivo responsive',
|
1521 |
+
'checked' => $this->slider->get_setting( 'autoPlay' ) == 'true' ? 'checked' : '',
|
1522 |
+
'helptext' => __( "Transition between slides automatically", "ml-slider" )
|
1523 |
+
),
|
1524 |
+
'smartCrop' => array(
|
1525 |
+
'priority' => 30,
|
1526 |
+
'type' => 'select',
|
1527 |
+
'label' => __( "Image Crop", "ml-slider" ),
|
1528 |
+
'class' => 'option coin flex nivo responsive',
|
1529 |
+
'value' => $this->slider->get_setting( 'smartCrop' ),
|
1530 |
+
'options' => array(
|
1531 |
+
'true' => array( 'label' => __( "Smart Crop", "ml-slider" ), 'class' => '' ),
|
1532 |
+
'false' => array( 'label' => __( "Standard", "ml-slider" ), 'class' => '' ),
|
1533 |
+
'disabled' => array( 'label' => __( "Disabled", "ml-slider" ), 'class' => '' ),
|
1534 |
+
'disabled_pad' => array( 'label' => __( "Disabled (Smart Pad)", "ml-slider" ), 'class' => 'option flex' ),
|
1535 |
+
),
|
1536 |
+
'helptext' => __( "Smart Crop ensures your responsive slides are cropped to a ratio that results in a consistent slideshow size", "ml-slider" )
|
1537 |
+
),
|
1538 |
+
'carouselMode' => array(
|
1539 |
+
'priority' => 40,
|
1540 |
+
'type' => 'checkbox',
|
1541 |
+
'label' => __( "Carousel mode", "ml-slider" ),
|
1542 |
+
'class' => 'option flex showNextWhenChecked',
|
1543 |
+
'checked' => $this->slider->get_setting( 'carouselMode' ) == 'true' ? 'checked' : '',
|
1544 |
+
'helptext' => __( "Display multiple slides at once. Slideshow output will be 100% wide.", "ml-slider" )
|
1545 |
+
),
|
1546 |
+
'carouselMargin' => array(
|
1547 |
+
'priority' => 45,
|
1548 |
+
'min' => 0,
|
1549 |
+
'max' => 9999,
|
1550 |
+
'step' => 1,
|
1551 |
+
'type' => 'number',
|
1552 |
+
'label' => __( "Carousel margin", "ml-slider" ),
|
1553 |
+
'class' => 'option flex',
|
1554 |
+
'value' => $this->slider->get_setting( 'carouselMargin' ),
|
1555 |
+
'helptext' => __( "Pixel margin between slides in carousel.", "ml-slider" ),
|
1556 |
+
'after' => __( "px", "ml-slider" )
|
1557 |
+
),
|
1558 |
+
'random' => array(
|
1559 |
+
'priority' => 50,
|
1560 |
+
'type' => 'checkbox',
|
1561 |
+
'label' => __( "Random", "ml-slider" ),
|
1562 |
+
'class' => 'option coin flex nivo responsive',
|
1563 |
+
'checked' => $this->slider->get_setting( 'random' ) == 'true' ? 'checked' : '',
|
1564 |
+
'helptext' => __( "Randomise the order of the slides", "ml-slider" )
|
1565 |
+
),
|
1566 |
+
'hoverPause' => array(
|
1567 |
+
'priority' => 60,
|
1568 |
+
'type' => 'checkbox',
|
1569 |
+
'label' => __( "Hover pause", "ml-slider" ),
|
1570 |
+
'class' => 'option coin flex nivo responsive',
|
1571 |
+
'checked' => $this->slider->get_setting( 'hoverPause' ) == 'true' ? 'checked' : '',
|
1572 |
+
'helptext' => __( "Pause the slideshow when hovering over slider, then resume when no longer hovering.", "ml-slider" )
|
1573 |
+
),
|
1574 |
+
'reverse' => array(
|
1575 |
+
'priority' => 70,
|
1576 |
+
'type' => 'checkbox',
|
1577 |
+
'label' => __( "Reverse", "ml-slider" ),
|
1578 |
+
'class' => 'option flex',
|
1579 |
+
'checked' => $this->slider->get_setting( 'reverse' ) == 'true' ? 'checked' : '',
|
1580 |
+
'helptext' => __( "Reverse the animation direction", "ml-slider" )
|
1581 |
+
),
|
1582 |
+
'delay' => array(
|
1583 |
+
'priority' => 80,
|
1584 |
+
'type' => 'number',
|
1585 |
+
'size' => 3,
|
1586 |
+
'min' => 500,
|
1587 |
+
'max' => 10000,
|
1588 |
+
'step' => 100,
|
1589 |
+
'value' => $this->slider->get_setting( 'delay' ),
|
1590 |
+
'label' => __( "Slide delay", "ml-slider" ),
|
1591 |
+
'class' => 'option coin flex responsive nivo',
|
1592 |
+
'helptext' => __( "How long to display each slide, in milliseconds", "ml-slider" ),
|
1593 |
+
'after' => __( "ms", "ml-slider" )
|
1594 |
+
),
|
1595 |
+
'animationSpeed' => array(
|
1596 |
+
'priority' => 90,
|
1597 |
+
'type' => 'number',
|
1598 |
+
'size' => 3,
|
1599 |
+
'min' => 0,
|
1600 |
+
'max' => 2000,
|
1601 |
+
'step' => 100,
|
1602 |
+
'value' => $this->slider->get_setting( 'animationSpeed' ),
|
1603 |
+
'label' => __( "Animation speed", "ml-slider" ),
|
1604 |
+
'class' => 'option flex responsive nivo',
|
1605 |
+
'helptext' => __( "Set the speed of animations, in milliseconds", "ml-slider" ),
|
1606 |
+
'after' => __( "ms", "ml-slider" )
|
1607 |
+
),
|
1608 |
+
'slices' => array(
|
1609 |
+
'priority' => 100,
|
1610 |
+
'type' => 'number',
|
1611 |
+
'size' => 3,
|
1612 |
+
'min' => 0,
|
1613 |
+
'max' => 20,
|
1614 |
+
'step' => 1,
|
1615 |
+
'value' => $this->slider->get_setting( 'slices' ),
|
1616 |
+
'label' => __( "Number of slices", "ml-slider" ),
|
1617 |
+
'class' => 'option nivo',
|
1618 |
+
'helptext' => __( "Number of slices", "ml-slider" ),
|
1619 |
+
'after' => __( "ms", "ml-slider" )
|
1620 |
+
),
|
1621 |
+
'spw' => array(
|
1622 |
+
'priority' => 110,
|
1623 |
+
'type' => 'number',
|
1624 |
+
'size' => 3,
|
1625 |
+
'min' => 0,
|
1626 |
+
'max' => 20,
|
1627 |
+
'step' => 1,
|
1628 |
+
'value' => $this->slider->get_setting( 'spw' ),
|
1629 |
+
'label' => __( "Number of squares", "ml-slider" ) . " (" . __( "Width", "ml-slider" ) . ")",
|
1630 |
+
'class' => 'option nivo',
|
1631 |
+
'helptext' => __( "Number of squares", "ml-slider" ),
|
1632 |
+
'after' => ''
|
1633 |
+
),
|
1634 |
+
'sph' => array(
|
1635 |
+
'priority' => 120,
|
1636 |
+
'type' => 'number',
|
1637 |
+
'size' => 3,
|
1638 |
+
'min' => 0,
|
1639 |
+
'max' => 20,
|
1640 |
+
'step' => 1,
|
1641 |
+
'value' => $this->slider->get_setting( 'sph' ),
|
1642 |
+
'label' => __( "Number of squares", "ml-slider" ) . " (" . __( "Height", "ml-slider" ) . ")",
|
1643 |
+
'class' => 'option nivo',
|
1644 |
+
'helptext' => __( "Number of squares", "ml-slider" ),
|
1645 |
+
'after' => ''
|
1646 |
+
),
|
1647 |
+
'direction' => array(
|
1648 |
+
'priority' => 130,
|
1649 |
+
'type' => 'select',
|
1650 |
+
'label' => __( "Slide direction", "ml-slider" ),
|
1651 |
+
'class' => 'option flex',
|
1652 |
+
'helptext' => __( "Select the sliding direction", "ml-slider" ),
|
1653 |
+
'value' => $this->slider->get_setting( 'direction' ),
|
1654 |
+
'options' => array(
|
1655 |
+
'horizontal' => array( 'label' => __( "Horizontal", "ml-slider" ), 'class' => '' ),
|
1656 |
+
'vertical' => array( 'label' => __( "Vertical", "ml-slider" ), 'class' => '' ),
|
1657 |
+
)
|
1658 |
+
),
|
1659 |
+
'easing' => array(
|
1660 |
+
'priority' => 140,
|
1661 |
+
'type' => 'select',
|
1662 |
+
'label' => __( "Easing", "ml-slider" ),
|
1663 |
+
'class' => 'option flex',
|
1664 |
+
'helptext' => __( "Animation easing effect", "ml-slider" ),
|
1665 |
+
'value' => $this->slider->get_setting( 'easing' ),
|
1666 |
+
'options' => $this->get_easing_options()
|
1667 |
+
),
|
1668 |
+
'prevText' => array(
|
1669 |
+
'priority' => 150,
|
1670 |
+
'type' => 'text',
|
1671 |
+
'label' => __( "Previous text", "ml-slider" ),
|
1672 |
+
'class' => 'option coin flex responsive nivo',
|
1673 |
+
'helptext' => __( "Set the text for the 'previous' direction item", "ml-slider" ),
|
1674 |
+
'value' => $this->slider->get_setting( 'prevText' ) == 'false' ? '' : $this->slider->get_setting( 'prevText' )
|
1675 |
+
),
|
1676 |
+
'nextText' => array(
|
1677 |
+
'priority' => 160,
|
1678 |
+
'type' => 'text',
|
1679 |
+
'label' => __( "Next text", "ml-slider" ),
|
1680 |
+
'class' => 'option coin flex responsive nivo',
|
1681 |
+
'helptext' => __( "Set the text for the 'next' direction item", "ml-slider" ),
|
1682 |
+
'value' => $this->slider->get_setting( 'nextText' ) == 'false' ? '' : $this->slider->get_setting( 'nextText' )
|
1683 |
+
),
|
1684 |
+
'sDelay' => array(
|
1685 |
+
'priority' => 170,
|
1686 |
+
'type' => 'number',
|
1687 |
+
'size' => 3,
|
1688 |
+
'min' => 0,
|
1689 |
+
'max' => 500,
|
1690 |
+
'step' => 10,
|
1691 |
+
'value' => $this->slider->get_setting( 'sDelay' ),
|
1692 |
+
'label' => __( "Square delay", "ml-slider" ),
|
1693 |
+
'class' => 'option coin',
|
1694 |
+
'helptext' => __( "Delay between squares in ms", "ml-slider" ),
|
1695 |
+
'after' => __( "ms", "ml-slider" )
|
1696 |
+
),
|
1697 |
+
'opacity' => array(
|
1698 |
+
'priority' => 180,
|
1699 |
+
'type' => 'number',
|
1700 |
+
'size' => 3,
|
1701 |
+
'min' => 0,
|
1702 |
+
'max' => 1,
|
1703 |
+
'step' => 0.1,
|
1704 |
+
'value' => $this->slider->get_setting( 'opacity' ),
|
1705 |
+
'label' => __( "Opacity", "ml-slider" ),
|
1706 |
+
'class' => 'option coin',
|
1707 |
+
'helptext' => __( "Opacity of title and navigation", "ml-slider" ),
|
1708 |
+
'after' => ''
|
1709 |
+
),
|
1710 |
+
'titleSpeed' => array(
|
1711 |
+
'priority' => 190,
|
1712 |
+
'type' => 'number',
|
1713 |
+
'size' => 3,
|
1714 |
+
'min' => 0,
|
1715 |
+
'max' => 10000,
|
1716 |
+
'step' => 100,
|
1717 |
+
'value' => $this->slider->get_setting( 'titleSpeed' ),
|
1718 |
+
'label' => __( "Caption speed", "ml-slider" ),
|
1719 |
+
'class' => 'option coin',
|
1720 |
+
'helptext' => __( "Set the fade in speed of the caption", "ml-slider" ),
|
1721 |
+
'after' => __( "ms", "ml-slider" )
|
1722 |
+
),
|
1723 |
+
'developerOptions' => array(
|
1724 |
+
'priority' => 195,
|
1725 |
+
'type' => 'divider',
|
1726 |
+
'class' => 'option coin flex responsive nivo',
|
1727 |
+
'value' => __( "Developer options", "ml-slider" )
|
1728 |
+
),
|
1729 |
+
'cssClass' => array(
|
1730 |
+
'priority' => 200,
|
1731 |
+
'type' => 'text',
|
1732 |
+
'label' => __( "CSS classes", "ml-slider" ),
|
1733 |
+
'class' => 'option coin flex responsive nivo',
|
1734 |
+
'helptext' => __( "Specify any custom CSS Classes you would like to be added to the slider wrapper", "ml-slider" ),
|
1735 |
+
'value' => $this->slider->get_setting( 'cssClass' ) == 'false' ? '' : $this->slider->get_setting( 'cssClass' )
|
1736 |
+
),
|
1737 |
+
'printCss' => array(
|
1738 |
+
'priority' => 210,
|
1739 |
+
'type' => 'checkbox',
|
1740 |
+
'label' => __( "Print CSS", "ml-slider" ),
|
1741 |
+
'class' => 'option coin flex responsive nivo useWithCaution',
|
1742 |
+
'checked' => $this->slider->get_setting( 'printCss' ) == 'true' ? 'checked' : '',
|
1743 |
+
'helptext' => __( "Uncheck this is you would like to include your own CSS", "ml-slider" )
|
1744 |
+
),
|
1745 |
+
'printJs' => array(
|
1746 |
+
'priority' => 220,
|
1747 |
+
'type' => 'checkbox',
|
1748 |
+
'label' => __( "Print JS", "ml-slider" ),
|
1749 |
+
'class' => 'option coin flex responsive nivo useWithCaution',
|
1750 |
+
'checked' => $this->slider->get_setting( 'printJs' ) == 'true' ? 'checked' : '',
|
1751 |
+
'helptext' => __( "Uncheck this is you would like to include your own Javascript", "ml-slider" )
|
1752 |
+
),
|
1753 |
+
'noConflict' => array(
|
1754 |
+
'priority' => 230,
|
1755 |
+
'type' => 'checkbox',
|
1756 |
+
'label' => __( "No conflict mode", "ml-slider" ),
|
1757 |
+
'class' => 'option flex',
|
1758 |
+
'checked' => $this->slider->get_setting( 'noConflict' ) == 'true' ? 'checked' : '',
|
1759 |
+
'helptext' => __( "Delay adding the flexslider class to the slideshow", "ml-slider" )
|
1760 |
+
),
|
1761 |
+
);
|
1762 |
+
|
1763 |
+
$aFields = apply_filters( 'metaslider_advanced_settings', $aFields, $this->slider );
|
1764 |
+
|
1765 |
+
echo $this->build_settings_rows( $aFields );
|
1766 |
+
?>
|
1767 |
+
</tbody>
|
1768 |
+
</table>
|
1769 |
+
</div>
|
1770 |
+
</div>
|
1771 |
+
|
1772 |
+
<?php $url = wp_nonce_url(admin_url("admin-post.php?action=metaslider_delete_slider&slider_id={$this->slider->id}"), "metaslider_delete_slider"); ?>
|
1773 |
+
|
1774 |
+
<a class='delete-slider alignright ml-has-icon ml-button ml-delete-button' href='<?php echo $url ?>'><i><svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></i><span><?php _e( "Delete Slideshow", "ml-slider" ) ?></span></a>
|
1775 |
+
</div>
|
1776 |
+
<?php } ?>
|
1777 |
+
</div>
|
1778 |
+
</div>
|
1779 |
+
</div>
|
1780 |
+
</form>
|
1781 |
+
</div>
|
1782 |
+
<?php
|
1783 |
+
}
|
1784 |
+
|
1785 |
+
|
1786 |
+
/**
|
1787 |
+
* Append the 'Add Slider' button to selected admin pages
|
1788 |
+
*/
|
1789 |
+
public function insert_metaslider_button( $context ) {
|
1790 |
+
|
1791 |
+
$capability = apply_filters( 'metaslider_capability', 'edit_others_posts' );
|
1792 |
+
|
1793 |
+
if ( ! current_user_can( $capability ) ) {
|
1794 |
+
return $context;
|
1795 |
+
}
|
1796 |
+
|
1797 |
+
global $pagenow;
|
1798 |
+
|
1799 |
+
if ( in_array( $pagenow, array( 'post.php', 'page.php', 'post-new.php', 'post-edit.php' ) ) ) {
|
1800 |
+
$context .= '<a href="#TB_inline?&inlineId=choose-meta-slider" class="thickbox button" title="' .
|
1801 |
+
__( "Select slideshow to insert into post", "ml-slider" ) .
|
1802 |
+
'"><span class="wp-media-buttons-icon" style="background: url(' . METASLIDER_ASSETS_URL .
|
1803 |
+
'/metaslider/matchalabs.png); background-repeat: no-repeat; background-position: left bottom;"></span> ' .
|
1804 |
+
__( "Add slider", "ml-slider" ) . '</a>';
|
1805 |
+
}
|
1806 |
+
|
1807 |
+
return $context;
|
1808 |
+
|
1809 |
+
}
|
1810 |
+
|
1811 |
+
|
1812 |
+
/**
|
1813 |
+
* Append the 'Choose MetaSlider' thickbox content to the bottom of selected admin pages
|
1814 |
+
*/
|
1815 |
+
public function admin_footer() {
|
1816 |
+
|
1817 |
+
global $pagenow;
|
1818 |
+
|
1819 |
+
// Only run in post/page creation and edit screens
|
1820 |
+
if ( in_array( $pagenow, array( 'post.php', 'page.php', 'post-new.php', 'post-edit.php' ) ) ) {
|
1821 |
+
$sliders = $this->all_meta_sliders( 'title' );
|
1822 |
+
?>
|
1823 |
+
|
1824 |
+
<script type="text/javascript">
|
1825 |
+
jQuery(document).ready(function() {
|
1826 |
+
jQuery('#insertMetaSlider').on('click', function() {
|
1827 |
+
var id = jQuery('#metaslider-select option:selected').val();
|
1828 |
+
window.send_to_editor('[metaslider id=' + id + ']');
|
1829 |
+
tb_remove();
|
1830 |
+
})
|
1831 |
+
});
|
1832 |
+
</script>
|
1833 |
+
|
1834 |
+
<div id="choose-meta-slider" style="display: none;">
|
1835 |
+
<div class="wrap">
|
1836 |
+
<?php
|
1837 |
+
if ( count( $sliders ) ) {
|
1838 |
+
echo "<h3 style='margin-bottom: 20px;'>" . __( "Insert MetaSlider", "ml-slider" ) . "</h3>";
|
1839 |
+
echo "<select id='metaslider-select'>";
|
1840 |
+
echo "<option disabled=disabled>" . __( "Choose slideshow", "ml-slider" ) . "</option>";
|
1841 |
+
foreach ( $sliders as $slider ) {
|
1842 |
+
echo "<option value='{$slider['id']}'>{$slider['title']}</option>";
|
1843 |
+
}
|
1844 |
+
echo "</select>";
|
1845 |
+
echo "<button class='button primary' id='insertMetaSlider'>" . __( "Insert slideshow", "ml-slider" ) . "</button>";
|
1846 |
+
} else {
|
1847 |
+
_e( "No slideshows found", "ml-slider" );
|
1848 |
+
}
|
1849 |
+
?>
|
1850 |
+
</div>
|
1851 |
+
</div>
|
1852 |
+
|
1853 |
+
<?php
|
1854 |
+
}
|
1855 |
+
}
|
1856 |
+
|
1857 |
+
|
1858 |
+
/**
|
1859 |
+
* Return the MetaSlider pro upgrade iFrame
|
1860 |
+
*/
|
1861 |
+
public function upgrade_to_pro_tab() {
|
1862 |
+
|
1863 |
+
if ( function_exists( 'is_plugin_active' ) && ! is_plugin_active( 'ml-slider-pro/ml-slider-pro.php' ) ) {
|
1864 |
+
return wp_iframe( array( $this, 'upgrade_to_pro_iframe' ) );
|
1865 |
+
}
|
1866 |
+
|
1867 |
+
}
|
1868 |
+
|
1869 |
+
|
1870 |
+
/**
|
1871 |
+
* Media Manager iframe HTML
|
1872 |
+
*/
|
1873 |
+
public function upgrade_to_pro_iframe() {
|
1874 |
+
|
1875 |
+
wp_enqueue_style('metaslider-admin-styles', METASLIDER_ADMIN_URL . 'assets/css/admin.css', false, METASLIDER_VERSION);
|
1876 |
+
wp_enqueue_script('google-font-api', 'https://fonts.googleapis.com/css?family=PT+Sans:400,700' , false, METASLIDER_VERSION);
|
1877 |
+
|
1878 |
+
$link = apply_filters( 'metaslider_hoplink', 'https://www.metaslider.com/upgrade/' );
|
1879 |
+
$link .= '?utm_source=lite&utm_medium=more-slide-types&utm_campaign=pro';
|
1880 |
+
|
1881 |
+
echo implode("", array(
|
1882 |
+
"<div class='metaslider_pro'>",
|
1883 |
+
"<p>Get the Pro Addon pack to add support for: <b>Post Feed</b> Slides, <b>YouTube</b> Slides, <b>HTML</b> Slides & <b>Vimeo</b> Slides</p>",
|
1884 |
+
"<a class='probutton' href='{$link}' target='_blank'>Get <span class='logo'><strong>Meta</strong>Slider</span><span class='super'>Pro</span></a>",
|
1885 |
+
"<span class='subtext'>Opens in a new window</span>",
|
1886 |
+
"</div>"
|
1887 |
+
));
|
1888 |
+
|
1889 |
+
}
|
1890 |
+
|
1891 |
+
/**
|
1892 |
+
* Adds extra links to the plugin activation page
|
1893 |
+
*/
|
1894 |
+
public function get_extra_meta_links($meta, $file, $data, $status) {
|
1895 |
+
|
1896 |
+
if (plugin_basename(__FILE__) == $file) {
|
1897 |
+
$plugin_page = admin_url('admin.php?page=metaslider');
|
1898 |
+
$meta[] = "<a href='{$plugin_page}' onclick=\"event.preventDefault();var link = jQuery(this);jQuery.post(ajaxurl, {action: 'reset_tour_status', _wpnonce: metaslider_tour_nonce }, function(data) {window.location = link.attr('href');});\">" . __('Take a tour', 'ml-slider') . "</a>";
|
1899 |
+
if (metaslider_is_pro_installed()) {
|
1900 |
+
$upgrade_link = apply_filters('metaslider_hoplink', 'https://www.metaslider.com/upgrade/');
|
1901 |
+
$meta[] = "<a href='{$upgrade_link}' target='_blank'>" . __('Add-ons', 'ml-slider') . "</a>";
|
1902 |
+
$meta[] = "<a href='https://wordpress.org/support/plugin/ml-slider/' target='_blank'>" . __('Support', 'ml-slider') . "</a>";
|
1903 |
+
} else {
|
1904 |
+
$meta[] = "<a href='https://www.metaslider.com/support/' target='_blank'>" . __('Premium Support', 'ml-slider') . "</a>";
|
1905 |
+
}
|
1906 |
+
$meta[] = "<a href='https://www.metaslider.com/documentation/' target='_blank'>" . __('Documentation', 'ml-slider') . "</a>";
|
1907 |
+
$meta[] = "<a href='https://wordpress.org/support/plugin/ml-slider/reviews#new-post' target='_blank' title='" . __('Leave a review', 'ml-slider') . "'><i class='ml-stars'><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg><svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg></i></a>";
|
1908 |
+
}
|
1909 |
+
return $meta;
|
1910 |
+
}
|
1911 |
+
|
1912 |
+
/**
|
1913 |
+
* Adds styles to admin head to allow for stars animation and coloring
|
1914 |
+
*/
|
1915 |
+
public function add_star_styles() {
|
1916 |
+
if (metaslider_is_on_admin_page('plugins.php')) {?>
|
1917 |
+
<style>
|
1918 |
+
.ml-stars{display:inline-block;color:#ffb900;position:relative;top:3px}
|
1919 |
+
.ml-stars svg{fill:#ffb900}
|
1920 |
+
.ml-stars svg:hover{fill:#ffb900}
|
1921 |
+
.ml-stars svg:hover ~ svg{fill:none}
|
1922 |
+
</style>
|
1923 |
+
<?php }
|
1924 |
+
}
|
1925 |
+
|
1926 |
+
/**
|
1927 |
+
* Add nonce to activation page
|
1928 |
+
*/
|
1929 |
+
public function add_tour_nonce_to_activation_page() {
|
1930 |
+
if (metaslider_is_on_admin_page('plugins.php')) {?>
|
1931 |
+
<script>
|
1932 |
+
var metaslider_tour_nonce = "<?php echo wp_create_nonce('metaslider_tour_nonce'); ?>";
|
1933 |
+
</script>
|
1934 |
+
<?php }
|
1935 |
+
}
|
1936 |
+
|
1937 |
+
/**
|
1938 |
+
* Upgrade To Pro Button.
|
1939 |
+
*/
|
1940 |
+
public function upgrade_to_pro_top_button() {
|
1941 |
+
$text = __('Upgrade Now', "ml-slider");
|
1942 |
+
$link = metaslider_get_upgrade_link();
|
1943 |
+
$upgrade_text = __("Get The Pro Pack Today!", "ml-slider");
|
1944 |
+
return "<a target='_blank' title='{$upgrade_text}' class='ml-has-icon ml-hanging-button' href='{$link}'><i class='brand-color'><svg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg></i><span>{$text}</span></a>";
|
1945 |
+
}
|
1946 |
+
|
1947 |
+
/**
|
1948 |
+
* Toggle Layout Buttons.
|
1949 |
+
* TODO: Re work this to allow for a third view style
|
1950 |
+
*/
|
1951 |
+
public function toggle_layout_button() {
|
1952 |
+
|
1953 |
+
// Don't show this if there are no slideshows
|
1954 |
+
if (!count($this->all_meta_sliders())) {
|
1955 |
+
return '';
|
1956 |
+
}
|
1957 |
+
|
1958 |
+
$view = ('tabs' == $this->get_view()) ? 'tabs' : 'dropdown';
|
1959 |
+
$view_opposite = ('dropdown' == $this->get_view()) ? 'tabs' : 'dropdown';
|
1960 |
+
$view_text = ($this->get_view() == 'tabs') ? __("Switch to Dropdown view", "ml-slider") : __("Switch to Tab view", "ml-slider");
|
1961 |
+
return "<a class='ml-has-icon ml-hanging-button' title='" . $view_text . "'
|
1962 |
+
href='" . admin_url( "admin-post.php?action=metaslider_switch_view&view=".$view_opposite) . "'><i><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"17\" height=\"17\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-shuffle\"><polyline points=\"16 3 21 3 21 8\"/><line x1=\"4\" y1=\"20\" x2=\"21\" y2=\"3\"/><polyline points=\"21 16 21 21 16 21\"/><line x1=\"15\" y1=\"15\" x2=\"21\" y2=\"21\"/><line x1=\"4\" y1=\"4\" x2=\"9\" y2=\"9\"/></svg></i><span>" . __("Layout", "ml-slider") . "</span></a>";
|
1963 |
+
}
|
1964 |
+
|
1965 |
+
/**
|
1966 |
+
* Support and Docs Button
|
1967 |
+
*/
|
1968 |
+
public function documentation_button() {
|
1969 |
+
return "<a class='ml-has-icon ml-hanging-button' target='_blank' title='" . __('View The Documentation', 'ml-slider') . "' href='https://www.metaslider.com/documentation/'><i><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"17\" height=\"17\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-book\"><path d=\"M4 19.5A2.5 2.5 0 0 1 6.5 17H20\"/><path d=\"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z\"/></svg></i><span>" . __("Documentation", "ml-slider") . "</span></a>";
|
1970 |
+
}
|
1971 |
+
|
1972 |
+
/**
|
1973 |
+
* Add a 'property=stylesheet' attribute to the MetaSlider CSS links for HTML5 validation
|
1974 |
+
*
|
1975 |
+
* @since 3.3.4
|
1976 |
+
* @param string $tag
|
1977 |
+
* @param string $handle
|
1978 |
+
*/
|
1979 |
+
public function add_property_attribute_to_stylesheet_links( $tag, $handle ) {
|
1980 |
+
|
1981 |
+
if ( strpos( $handle, 'metaslider' ) !== FALSE && strpos( $tag, "property='" ) === FALSE ) {
|
1982 |
+
// we're only filtering tags with metaslider in the handle, and links which don't already have a property attribute
|
1983 |
+
$tag = str_replace( "/>", "property='stylesheet' />", $tag );
|
1984 |
+
}
|
1985 |
+
|
1986 |
+
return $tag;
|
1987 |
+
|
1988 |
+
}
|
1989 |
+
|
1990 |
+
}
|
1991 |
+
|
1992 |
+
endif;
|
1993 |
+
|
1994 |
+
add_action( 'plugins_loaded', array( 'MetaSliderPlugin', 'init' ), 10 );
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: matchalabs, DavidAnderson, dnutbourne, kbat82
|
|
3 |
Tags: wordpress slideshow,seo,slideshow,slider,widget,wordpress slider,image slider,flexslider,flex slider,nivoslider,nivo slider,responsive,responsive slides,coinslider,coin slider,slideshow,carousel,responsive slider,vertical slides
|
4 |
Donate link: https://david.dw-perspective.org.uk/donate
|
5 |
Requires at least: 3.5
|
6 |
-
Stable tag: 3.6.
|
7 |
Tested up to: 4.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -151,6 +151,11 @@ See https://www.metaslider.com/documentation/image-cropping/
|
|
151 |
|
152 |
== Changelog ==
|
153 |
|
|
|
|
|
|
|
|
|
|
|
154 |
= 3.6.5 - 2017/Nov/20 =
|
155 |
|
156 |
* FIX: Fixes issues with bottom margin of slideshow, among other minor tweaks.
|
@@ -610,4 +615,4 @@ More info/Comments: http://www.metaslider.com/coming-soon-meta-slider-2-6-free/
|
|
610 |
* Initial version
|
611 |
|
612 |
== Upgrade Notice ==
|
613 |
-
* 3.6.
|
3 |
Tags: wordpress slideshow,seo,slideshow,slider,widget,wordpress slider,image slider,flexslider,flex slider,nivoslider,nivo slider,responsive,responsive slides,coinslider,coin slider,slideshow,carousel,responsive slider,vertical slides
|
4 |
Donate link: https://david.dw-perspective.org.uk/donate
|
5 |
Requires at least: 3.5
|
6 |
+
Stable tag: 3.6.6
|
7 |
Tested up to: 4.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
151 |
|
152 |
== Changelog ==
|
153 |
|
154 |
+
= 3.6.6 - 2017/Nov/23 =
|
155 |
+
|
156 |
+
* FIX: Fixes FlexSlider bug when resizing slider.
|
157 |
+
* FIX: Updates layout on post feed slides.
|
158 |
+
|
159 |
= 3.6.5 - 2017/Nov/20 =
|
160 |
|
161 |
* FIX: Fixes issues with bottom margin of slideshow, among other minor tweaks.
|
615 |
* Initial version
|
616 |
|
617 |
== Upgrade Notice ==
|
618 |
+
* 3.6.6 : 3.6 series has three new features, three fixes, various smaller tweaks. A recommended update for all. If you have the paid add-on pack, update that to version 2.7.1 or later at the same time.
|