Version Description
Download this release
Release Info
Developer | averta |
Plugin | Master Slider – Responsive Touch Slider |
Version | 2.9.5 |
Comparing to | |
See all releases |
Code changes from version 2.9.0 to 2.9.5
- README.txt +8 -4
- admin/assets/css/msp-general.css +121 -5
- admin/assets/images/thirdparty/phlox-badge.jpg +0 -0
- admin/assets/images/thirdparty/phlox-popup.jpg +0 -0
- admin/includes/msp-admin-functions.php +1 -1
- admin/includes/msp-admin-templates.php +7 -2
- admin/includes/msp-hooks.php +17 -0
- admin/includes/msp-sample-sliders.php +1 -1
- admin/views/index.php +2 -2
- admin/views/slider-dashboard/list-sliders.php +54 -0
- includes/init/define.php +1 -1
- master-slider.php +2 -2
- public/class-master-slider.php +27 -23
README.txt
CHANGED
@@ -5,8 +5,8 @@ License: GPLv3
|
|
5 |
License URI: http://www.gnu.org/licenses/gpl.html
|
6 |
Tags: banner rotator, carousel, content slider, gallery, image slider, responsive slider, showcase, slideshow, swipe, touch slider, video gallery, SEO, vertical slide, HTML5 slider, hardware accelerate, best slider, animation, mobile slider, iOS, android, video slider, youtube slider, horizontal slider, vertical slider, fullwidth slider, fullscreen slider, post slider, photo slider, online album, mobile slider, WordPress slider,wpml, ,ultisite, wistia, woocommerce, product slider, woocommerce slider, portfolio, gallery
|
7 |
Requires at least: 4.0
|
8 |
-
Tested up to: 4.6.
|
9 |
-
Stable tag: 2.9.
|
10 |
|
11 |
The most advanced responsive and HTML5 WordPress slider plugin with touch swipe navigation that works smoothly on desktop and devices.
|
12 |
|
@@ -19,6 +19,8 @@ The most advanced responsive and HTML5 WordPress slider plugin with touch swipe
|
|
19 |
|
20 |
Master Slider is a free responsive image and content slider with super smooth hardware accelerated transitions. It supports touch navigation with pure swipe gesture that you have never experienced before. It's a truly responsive and device friendly slider which works perfectly in all major devices.
|
21 |
|
|
|
|
|
22 |
[youtube https://www.youtube.com/watch?v=nyjpGEHwOn8]
|
23 |
|
24 |
[Watch all video tutorials](http://avt.li/msfvids)
|
@@ -227,6 +229,9 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/master-sl
|
|
227 |
|
228 |
== Changelog ==
|
229 |
|
|
|
|
|
|
|
230 |
= Version 2.9.0 / (19.8.2016) =
|
231 |
- [Improvement]: Better compatibility with Legacy WordPress themes
|
232 |
- [Fix]: Minor bugs fixes
|
@@ -409,6 +414,5 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/master-sl
|
|
409 |
|
410 |
== Upgrade Notice ==
|
411 |
|
412 |
-
= Version 2.9.
|
413 |
-
- [Improvement]: Better compatibility with Legacy WordPress themes
|
414 |
- [Fix]: Minor bugs fixes
|
5 |
License URI: http://www.gnu.org/licenses/gpl.html
|
6 |
Tags: banner rotator, carousel, content slider, gallery, image slider, responsive slider, showcase, slideshow, swipe, touch slider, video gallery, SEO, vertical slide, HTML5 slider, hardware accelerate, best slider, animation, mobile slider, iOS, android, video slider, youtube slider, horizontal slider, vertical slider, fullwidth slider, fullscreen slider, post slider, photo slider, online album, mobile slider, WordPress slider,wpml, ,ultisite, wistia, woocommerce, product slider, woocommerce slider, portfolio, gallery
|
7 |
Requires at least: 4.0
|
8 |
+
Tested up to: 4.6.1
|
9 |
+
Stable tag: 2.9.5
|
10 |
|
11 |
The most advanced responsive and HTML5 WordPress slider plugin with touch swipe navigation that works smoothly on desktop and devices.
|
12 |
|
19 |
|
20 |
Master Slider is a free responsive image and content slider with super smooth hardware accelerated transitions. It supports touch navigation with pure swipe gesture that you have never experienced before. It's a truly responsive and device friendly slider which works perfectly in all major devices.
|
21 |
|
22 |
+
>Looking for a perfect free theme for Master Slider? [Get Phlox theme for free](http://avt.li/msphpp "Phlox theme - Free Minimal and Responsive WordPress Theme")
|
23 |
+
|
24 |
[youtube https://www.youtube.com/watch?v=nyjpGEHwOn8]
|
25 |
|
26 |
[Watch all video tutorials](http://avt.li/msfvids)
|
229 |
|
230 |
== Changelog ==
|
231 |
|
232 |
+
= Version 2.9.5 / (21.9.2016) =
|
233 |
+
- [Fix]: Minor bugs fixes
|
234 |
+
|
235 |
= Version 2.9.0 / (19.8.2016) =
|
236 |
- [Improvement]: Better compatibility with Legacy WordPress themes
|
237 |
- [Fix]: Minor bugs fixes
|
414 |
|
415 |
== Upgrade Notice ==
|
416 |
|
417 |
+
= Version 2.9.5 / (21.9.2016) =
|
|
|
418 |
- [Fix]: Minor bugs fixes
|
admin/assets/css/msp-general.css
CHANGED
@@ -592,12 +592,17 @@ tbody .latest-updates {
|
|
592 |
/** other **/
|
593 |
.update-nag { display:none; }
|
594 |
|
|
|
595 |
#contextual-help-link-wrap {
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
|
|
|
|
|
|
|
|
601 |
}
|
602 |
|
603 |
#screen-meta-links .screen-meta-toggle {
|
@@ -637,3 +642,114 @@ tbody .latest-updates {
|
|
637 |
background-color: #ffb8bd;
|
638 |
color: #333;
|
639 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
592 |
/** other **/
|
593 |
.update-nag { display:none; }
|
594 |
|
595 |
+
|
596 |
#contextual-help-link-wrap {
|
597 |
+
right:10px;
|
598 |
+
border: none;
|
599 |
+
box-shadow: none;
|
600 |
+
background: url(../images/help.png) no-repeat 2px 2px;
|
601 |
+
z-index:3;
|
602 |
+
}
|
603 |
+
|
604 |
+
.master-list #contextual-help-link-wrap{
|
605 |
+
right: 240px;
|
606 |
}
|
607 |
|
608 |
#screen-meta-links .screen-meta-toggle {
|
642 |
background-color: #ffb8bd;
|
643 |
color: #333;
|
644 |
}
|
645 |
+
|
646 |
+
|
647 |
+
/* Modal page */
|
648 |
+
|
649 |
+
.aux-smd-modal {
|
650 |
+
position: fixed;
|
651 |
+
top: 50%;
|
652 |
+
left: 50%;
|
653 |
+
width: 50%;
|
654 |
+
max-width: 100%;
|
655 |
+
min-width: 320px;
|
656 |
+
width: auto;
|
657 |
+
height: auto;
|
658 |
+
z-index: 10200;
|
659 |
+
visibility: hidden;
|
660 |
+
opacity: 0;
|
661 |
+
-webkit-backface-visibility: hidden;
|
662 |
+
backface-visibility: hidden;
|
663 |
+
-webkit-transform: translateX(-50%) translateY(-50%);
|
664 |
+
transform: translateX(-50%) translateY(-50%);
|
665 |
+
-webkit-transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
666 |
+
transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
667 |
+
}
|
668 |
+
|
669 |
+
.aux-smd-modal.aux-smd-show {
|
670 |
+
opacity: 1;
|
671 |
+
visibility: visible;
|
672 |
+
}
|
673 |
+
|
674 |
+
.aux-smd-overlay {
|
675 |
+
position: fixed;
|
676 |
+
width: 100%;
|
677 |
+
height: 100%;
|
678 |
+
visibility: hidden;
|
679 |
+
top: 0;
|
680 |
+
left: 0;
|
681 |
+
z-index: 10100;
|
682 |
+
opacity: 0;
|
683 |
+
background: rgba(0, 0, 0, 0.7);
|
684 |
+
-webkit-transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
685 |
+
transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
686 |
+
}
|
687 |
+
|
688 |
+
.aux-smd-modal.aux-smd-show ~ .aux-smd-overlay {
|
689 |
+
opacity: 1;
|
690 |
+
visibility: visible;
|
691 |
+
}
|
692 |
+
|
693 |
+
.aux-smd-no-scroll {
|
694 |
+
overflow: hidden;
|
695 |
+
}
|
696 |
+
|
697 |
+
.aux-smd-close {
|
698 |
+
position: absolute;
|
699 |
+
top: 25px;
|
700 |
+
right: 25px;
|
701 |
+
display: inline-block;
|
702 |
+
width: 25px;
|
703 |
+
height: 25px;
|
704 |
+
}
|
705 |
+
|
706 |
+
.msp-ad-btns-container {
|
707 |
+
display: inline-block;
|
708 |
+
width: 100%;
|
709 |
+
text-align: center;
|
710 |
+
position: relative;
|
711 |
+
bottom: 450px;
|
712 |
+
}
|
713 |
+
|
714 |
+
.msp-ad-btn {
|
715 |
+
padding: 12px 0;
|
716 |
+
text-decoration: none;
|
717 |
+
font-size: 13px;
|
718 |
+
border-radius: 30px;
|
719 |
+
width: 145px;
|
720 |
+
display: inline-block;
|
721 |
+
}
|
722 |
+
.msp-ad-btn:hover {
|
723 |
+
text-decoration: underline;;
|
724 |
+
}
|
725 |
+
|
726 |
+
.aux-md-get-now,
|
727 |
+
.aux-md-get-now:hover {
|
728 |
+
background: #3d3d3d;
|
729 |
+
color: #fff;
|
730 |
+
margin-right: 5px;
|
731 |
+
}
|
732 |
+
.aux-md-try-later,
|
733 |
+
.aux-md-try-later:hover {
|
734 |
+
background: #fff;
|
735 |
+
color: #3d3d3d;
|
736 |
+
}
|
737 |
+
|
738 |
+
.msp-logo {
|
739 |
+
position:relative;
|
740 |
+
}
|
741 |
+
|
742 |
+
/* Only add badge on sliders list page */
|
743 |
+
.master-list .msp-phlox-badge {
|
744 |
+
position:absolute;
|
745 |
+
width: 225px;
|
746 |
+
height: 80px;
|
747 |
+
top: 0;
|
748 |
+
right: 0;
|
749 |
+
}
|
750 |
+
.master-list .msp-phlox-badge a{
|
751 |
+
display:block;
|
752 |
+
}
|
753 |
+
.master-list .msp-logo .msp-phlox-badge img {
|
754 |
+
margin:0;
|
755 |
+
}
|
admin/assets/images/thirdparty/phlox-badge.jpg
ADDED
Binary file
|
admin/assets/images/thirdparty/phlox-popup.jpg
ADDED
Binary file
|
admin/includes/msp-admin-functions.php
CHANGED
@@ -137,7 +137,7 @@ if ( ! function_exists( 'axpp' ) ) {
|
|
137 |
} elseif ( $dump ) {
|
138 |
echo '<pre>'; var_dump( $expression ); echo '</pre>';
|
139 |
} else {
|
140 |
-
echo '<pre>'; print_r ( $expression ); echo '</pre>';
|
141 |
}
|
142 |
return true;
|
143 |
}
|
137 |
} elseif ( $dump ) {
|
138 |
echo '<pre>'; var_dump( $expression ); echo '</pre>';
|
139 |
} else {
|
140 |
+
echo '<pre style="margin-left:170px;">'; print_r ( $expression ); echo '</pre>';
|
141 |
}
|
142 |
return true;
|
143 |
}
|
admin/includes/msp-admin-templates.php
CHANGED
@@ -5,12 +5,17 @@ function msp_get_panel_header(){
|
|
5 |
<div id="msp-header">
|
6 |
<div class="msp-logo">
|
7 |
<a href="<?php echo admin_url( 'admin.php?page='.MSWP_SLUG ); ?>">
|
8 |
-
<img src="<?php echo MSWP_AVERTA_ADMIN_URL; ?>/views/slider-panel/images/masterslider.gif"
|
9 |
</a>
|
|
|
|
|
|
|
|
|
|
|
10 |
</div>
|
11 |
<?php if( isset( $_GET['action'] ) && 'edit' == $_GET['action'] ) { ?>
|
12 |
<a class="upgrade-pro" href="http://avt.li/mslpan" title="<?php _e( "Upgrade to PRO version to unlock more features. Click to see the list of features." ); ?>" target="_blank"><?php _e( "Upgrade to PRO Version", 'master-slider' ); ?></a>
|
13 |
<?php } ?>
|
14 |
</div>
|
15 |
<?php
|
16 |
-
}
|
5 |
<div id="msp-header">
|
6 |
<div class="msp-logo">
|
7 |
<a href="<?php echo admin_url( 'admin.php?page='.MSWP_SLUG ); ?>">
|
8 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL; ?>/views/slider-panel/images/masterslider.gif" />
|
9 |
</a>
|
10 |
+
<div class="msp-phlox-badge">
|
11 |
+
<a href="http://avt.li/phmsltbtn" target="_blank">
|
12 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL; ?>/assets/images/thirdparty/phlox-badge.jpg" />
|
13 |
+
</a>
|
14 |
+
</div>
|
15 |
</div>
|
16 |
<?php if( isset( $_GET['action'] ) && 'edit' == $_GET['action'] ) { ?>
|
17 |
<a class="upgrade-pro" href="http://avt.li/mslpan" title="<?php _e( "Upgrade to PRO version to unlock more features. Click to see the list of features." ); ?>" target="_blank"><?php _e( "Upgrade to PRO Version", 'master-slider' ); ?></a>
|
18 |
<?php } ?>
|
19 |
</div>
|
20 |
<?php
|
21 |
+
}
|
admin/includes/msp-hooks.php
CHANGED
@@ -106,6 +106,23 @@ function msp_request_remote_sample_sliders( $force_to_fetch = false ) {
|
|
106 |
}
|
107 |
|
108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
/**
|
110 |
* Function to show premium sliders in "premium sliders" section
|
111 |
*/
|
106 |
}
|
107 |
|
108 |
|
109 |
+
/**
|
110 |
+
* Adds Master Slider specific classes to admin body
|
111 |
+
* @param string $classes The CSS classes for admin body
|
112 |
+
* @return string The CSS classes for admin body
|
113 |
+
*/
|
114 |
+
function msp_add_master_admin_class( $classes ){
|
115 |
+
if( ! empty( $_GET['page'] ) && MSWP_SLUG == $_GET['page'] ){
|
116 |
+
$classes .= ' msp';
|
117 |
+
}
|
118 |
+
if( empty( $_GET['slider_id'] ) ){
|
119 |
+
$classes .= ' master-list';
|
120 |
+
}
|
121 |
+
return $classes;
|
122 |
+
}
|
123 |
+
add_filter( 'admin_body_class', 'msp_add_master_admin_class' );
|
124 |
+
|
125 |
+
|
126 |
/**
|
127 |
* Function to show premium sliders in "premium sliders" section
|
128 |
*/
|
admin/includes/msp-sample-sliders.php
CHANGED
@@ -15,7 +15,7 @@ function msp_get_slider_starter_sections () {
|
|
15 |
),
|
16 |
array(
|
17 |
'id' => 'masterslider_pro_custom_samples1',
|
18 |
-
'title' => __( 'Sample Sliders for PRO version (Upgrade to unlock
|
19 |
'desc' => ''
|
20 |
)
|
21 |
);
|
15 |
),
|
16 |
array(
|
17 |
'id' => 'masterslider_pro_custom_samples1',
|
18 |
+
'title' => sprintf( __( 'Sample Sliders for PRO version %s', 'master-slider' ), '( <a href="http://avt.li/msfunlock" target="_blank">'. __( 'Upgrade to unlock', 'master-slider' ) .'</a> )' ),
|
19 |
'desc' => ''
|
20 |
)
|
21 |
);
|
admin/views/index.php
CHANGED
@@ -10,9 +10,9 @@
|
|
10 |
*/
|
11 |
|
12 |
$msp_nonce = wp_create_nonce( 'msp_panel' );
|
13 |
-
$action
|
14 |
$slider_id = isset( $_REQUEST['slider_id'] ) ? $_REQUEST['slider_id'] : '';
|
15 |
-
$do
|
16 |
|
17 |
|
18 |
function msp_thankyou_footer() {
|
10 |
*/
|
11 |
|
12 |
$msp_nonce = wp_create_nonce( 'msp_panel' );
|
13 |
+
$action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
|
14 |
$slider_id = isset( $_REQUEST['slider_id'] ) ? $_REQUEST['slider_id'] : '';
|
15 |
+
$do = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
|
16 |
|
17 |
|
18 |
function msp_thankyou_footer() {
|
admin/views/slider-dashboard/list-sliders.php
CHANGED
@@ -168,3 +168,57 @@ if( current_user_can( 'create_masterslider' ) ) { ?>
|
|
168 |
|
169 |
<?php } ?>
|
170 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
|
169 |
<?php } ?>
|
170 |
|
171 |
+
<?php
|
172 |
+
if( isset( $_GET['dismiss_phlox_notice'] ) && $_GET['dismiss_phlox_notice'] == 1 ){
|
173 |
+
set_transient( 'masterslider_display_phlox_notice', 1, 3 * DAY_IN_SECONDS );
|
174 |
+
}
|
175 |
+
if( false === get_transient( 'masterslider_display_phlox_notice' ) ) {
|
176 |
+
set_transient( 'masterslider_display_phlox_notice', 1, 5 * YEAR_IN_SECONDS );
|
177 |
+
?>
|
178 |
+
|
179 |
+
<div id="smd-modal-1" class="aux-smd-modal aux-smd-show">
|
180 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL; ?>/assets/images/thirdparty/phlox-popup.jpg" />
|
181 |
+
<a href="#" class="aux-smd-close" title="Close"></a>
|
182 |
+
<div class="msp-ad-btns-container">
|
183 |
+
<a href="http://avt.li/phmslpu" class="msp-ad-btn aux-md-get-now">Get it Now</a>
|
184 |
+
<a href="?page=master-slider&dismiss_phlox_notice=1" class="msp-ad-btn aux-md-try-later">Remind Me Later</a>
|
185 |
+
</div>
|
186 |
+
</div>
|
187 |
+
|
188 |
+
<div class="aux-smd-overlay"></div>
|
189 |
+
|
190 |
+
<script>
|
191 |
+
(function($, window, document, undefined){
|
192 |
+
"use strict";
|
193 |
+
|
194 |
+
$(function(){
|
195 |
+
var $open = $('.aux-smd-open'),
|
196 |
+
$close = $('.aux-smd-close'),
|
197 |
+
$modal = $('.aux-smd-modal');
|
198 |
+
|
199 |
+
if( ! $modal.length ){
|
200 |
+
return false;
|
201 |
+
}
|
202 |
+
|
203 |
+
if( $('.aux-smd-modal.aux-smd-show').length ){
|
204 |
+
$('body').addClass('aux-smd-no-scroll');
|
205 |
+
}
|
206 |
+
|
207 |
+
$open.on( 'click', function(e){
|
208 |
+
e.preventDefault();
|
209 |
+
$modal.addClass( 'aux-smd-show' );
|
210 |
+
$('body').addClass('aux-smd-no-scroll');
|
211 |
+
});
|
212 |
+
|
213 |
+
$close.on( 'click', function(e){
|
214 |
+
e.preventDefault();
|
215 |
+
$modal.removeClass( 'aux-smd-show' );
|
216 |
+
$('body').removeClass('aux-smd-no-scroll');
|
217 |
+
});
|
218 |
+
|
219 |
+
});
|
220 |
+
|
221 |
+
})(jQuery, window, document);
|
222 |
+
</script>
|
223 |
+
|
224 |
+
<?php } ?>
|
includes/init/define.php
CHANGED
@@ -5,7 +5,7 @@ if ( ! defined('ABSPATH') ) {
|
|
5 |
die();
|
6 |
}
|
7 |
|
8 |
-
define( 'MSWP_AVERTA_VERSION' , '2.9.
|
9 |
|
10 |
define( 'MSWP_SLUG' , 'master-slider' );
|
11 |
define( 'MSWP_TEXT_DOMAIN' , 'masterslider' );
|
5 |
die();
|
6 |
}
|
7 |
|
8 |
+
define( 'MSWP_AVERTA_VERSION' , '2.9.5' );
|
9 |
|
10 |
define( 'MSWP_SLUG' , 'master-slider' );
|
11 |
define( 'MSWP_TEXT_DOMAIN' , 'masterslider' );
|
master-slider.php
CHANGED
@@ -11,13 +11,13 @@
|
|
11 |
* Plugin Name: Master Slider
|
12 |
* Plugin URI: https://wordpress.org/plugins/master-slider/
|
13 |
* Description: Master Slider is the most advanced responsive HTML5 WordPress slider plugin with touch swipe navigation that works smoothly on devices too.
|
14 |
-
* Version: 2.9.
|
15 |
* Author: averta
|
16 |
* Author URI: http://averta.net
|
17 |
* Text Domain: master-slider
|
18 |
* License URI: license.txt
|
19 |
* Domain Path: /languages
|
20 |
-
* Tested up to: 4.6.
|
21 |
*/
|
22 |
|
23 |
// If this file is called directly, abort.
|
11 |
* Plugin Name: Master Slider
|
12 |
* Plugin URI: https://wordpress.org/plugins/master-slider/
|
13 |
* Description: Master Slider is the most advanced responsive HTML5 WordPress slider plugin with touch swipe navigation that works smoothly on devices too.
|
14 |
+
* Version: 2.9.5
|
15 |
* Author: averta
|
16 |
* Author URI: http://averta.net
|
17 |
* Text Domain: master-slider
|
18 |
* License URI: license.txt
|
19 |
* Domain Path: /languages
|
20 |
+
* Tested up to: 4.6.1
|
21 |
*/
|
22 |
|
23 |
// If this file is called directly, abort.
|
public/class-master-slider.php
CHANGED
@@ -58,25 +58,25 @@ class Master_Slider {
|
|
58 |
|
59 |
|
60 |
/**
|
61 |
-
*
|
62 |
* @return [type] [description]
|
63 |
*/
|
64 |
private function includes() {
|
65 |
|
66 |
// load common functionalities
|
67 |
include_once( MSWP_AVERTA_INC_DIR . '/index.php' );
|
68 |
-
|
69 |
|
70 |
// Dashboard and Administrative Functionality
|
71 |
if ( is_admin() ) {
|
72 |
|
73 |
-
// Load AJAX spesific codes on demand
|
74 |
if ( defined('DOING_AJAX') && DOING_AJAX ){
|
75 |
include_once( MSWP_AVERTA_ADMIN_DIR . '/includes/classes/class-msp-admin-ajax.php');
|
76 |
include_once( MSWP_AVERTA_ADMIN_DIR . '/includes/msp-admin-functions.php');
|
77 |
}
|
78 |
-
|
79 |
-
// Load admin spesific codes
|
80 |
else {
|
81 |
$this->admin = include( MSWP_AVERTA_ADMIN_DIR . '/class-master-slider-admin.php' );
|
82 |
}
|
@@ -92,7 +92,7 @@ class Master_Slider {
|
|
92 |
|
93 |
/**
|
94 |
* Init Masterslider when WordPress Initialises.
|
95 |
-
*
|
96 |
* @return void
|
97 |
*/
|
98 |
public function init(){
|
@@ -100,8 +100,12 @@ class Master_Slider {
|
|
100 |
// Before init action
|
101 |
do_action( 'before_masterslider_init' );
|
102 |
|
103 |
-
//
|
104 |
-
$
|
|
|
|
|
|
|
|
|
105 |
|
106 |
// Init action
|
107 |
do_action( 'masterslider_init' );
|
@@ -121,7 +125,7 @@ class Master_Slider {
|
|
121 |
if ( null == self::$instance ) {
|
122 |
self::$instance = new self;
|
123 |
}
|
124 |
-
|
125 |
return self::$instance;
|
126 |
}
|
127 |
|
@@ -136,7 +140,7 @@ class Master_Slider {
|
|
136 |
* activated on an individual blog.
|
137 |
*/
|
138 |
public static function activate( $network_wide ) {
|
139 |
-
|
140 |
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
141 |
|
142 |
if ( $network_wide ) {
|
@@ -159,7 +163,7 @@ class Master_Slider {
|
|
159 |
} else {
|
160 |
self::single_activate();
|
161 |
}
|
162 |
-
|
163 |
}
|
164 |
|
165 |
/**
|
@@ -273,11 +277,11 @@ class Master_Slider {
|
|
273 |
$roles = array( 'administrator', 'editor' );
|
274 |
|
275 |
foreach ( $roles as $role ) {
|
276 |
-
if( ! $role = get_role( $role ) )
|
277 |
continue;
|
278 |
-
$role->add_cap( 'access_masterslider' );
|
279 |
-
$role->add_cap( 'publish_masterslider' );
|
280 |
-
$role->add_cap( 'delete_masterslider' );
|
281 |
$role->add_cap( 'create_masterslider' );
|
282 |
$role->add_cap( 'export_masterslider' );
|
283 |
$role->add_cap( 'duplicate_masterslider' );
|
@@ -294,7 +298,7 @@ class Master_Slider {
|
|
294 |
* @since 1.0.0
|
295 |
*/
|
296 |
public static function set_default_options( $force_update = false ){
|
297 |
-
|
298 |
}
|
299 |
|
300 |
|
@@ -323,29 +327,29 @@ class Master_Slider {
|
|
323 |
|
324 |
endif;
|
325 |
|
326 |
-
function MSP(){ return Master_Slider::get_instance(); }
|
327 |
MSP();
|
328 |
|
329 |
|
330 |
class MSP_AttachmentFields {
|
331 |
-
|
332 |
private $fields = array();
|
333 |
-
|
334 |
function __construct($fields = null) {
|
335 |
if(isset($fields) && is_array($fields))
|
336 |
$this->$fields = $fields;
|
337 |
}
|
338 |
-
|
339 |
public function add($field){
|
340 |
if(is_array($field))
|
341 |
$this->fields[] = $field;
|
342 |
}
|
343 |
-
|
344 |
public function init(){
|
345 |
add_filter( 'attachment_fields_to_edit', array( $this, 'addFields' ), 11, 2 );
|
346 |
add_filter( 'attachment_fields_to_save', array( $this, 'saveFields' ), 11, 2 );
|
347 |
}
|
348 |
-
|
349 |
public function addFields( $form_fields, $post ){
|
350 |
|
351 |
$form_fields['image_rating'] = array(
|
@@ -364,7 +368,7 @@ class MSP_AttachmentFields {
|
|
364 |
|
365 |
return $form_fields;
|
366 |
}
|
367 |
-
|
368 |
public function saveFields($post, $attachment) {
|
369 |
return $post;
|
370 |
}
|
58 |
|
59 |
|
60 |
/**
|
61 |
+
*
|
62 |
* @return [type] [description]
|
63 |
*/
|
64 |
private function includes() {
|
65 |
|
66 |
// load common functionalities
|
67 |
include_once( MSWP_AVERTA_INC_DIR . '/index.php' );
|
68 |
+
|
69 |
|
70 |
// Dashboard and Administrative Functionality
|
71 |
if ( is_admin() ) {
|
72 |
|
73 |
+
// Load AJAX spesific codes on demand
|
74 |
if ( defined('DOING_AJAX') && DOING_AJAX ){
|
75 |
include_once( MSWP_AVERTA_ADMIN_DIR . '/includes/classes/class-msp-admin-ajax.php');
|
76 |
include_once( MSWP_AVERTA_ADMIN_DIR . '/includes/msp-admin-functions.php');
|
77 |
}
|
78 |
+
|
79 |
+
// Load admin spesific codes
|
80 |
else {
|
81 |
$this->admin = include( MSWP_AVERTA_ADMIN_DIR . '/class-master-slider-admin.php' );
|
82 |
}
|
92 |
|
93 |
/**
|
94 |
* Init Masterslider when WordPress Initialises.
|
95 |
+
*
|
96 |
* @return void
|
97 |
*/
|
98 |
public function init(){
|
100 |
// Before init action
|
101 |
do_action( 'before_masterslider_init' );
|
102 |
|
103 |
+
// @Deprecate WP Version 5.0
|
104 |
+
global $wp_version;
|
105 |
+
if ( version_compare( $wp_version, '4.6', '<' ) ) {
|
106 |
+
// Load plugin text domain
|
107 |
+
$this->load_plugin_textdomain();
|
108 |
+
}
|
109 |
|
110 |
// Init action
|
111 |
do_action( 'masterslider_init' );
|
125 |
if ( null == self::$instance ) {
|
126 |
self::$instance = new self;
|
127 |
}
|
128 |
+
|
129 |
return self::$instance;
|
130 |
}
|
131 |
|
140 |
* activated on an individual blog.
|
141 |
*/
|
142 |
public static function activate( $network_wide ) {
|
143 |
+
|
144 |
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
145 |
|
146 |
if ( $network_wide ) {
|
163 |
} else {
|
164 |
self::single_activate();
|
165 |
}
|
166 |
+
|
167 |
}
|
168 |
|
169 |
/**
|
277 |
$roles = array( 'administrator', 'editor' );
|
278 |
|
279 |
foreach ( $roles as $role ) {
|
280 |
+
if( ! $role = get_role( $role ) )
|
281 |
continue;
|
282 |
+
$role->add_cap( 'access_masterslider' );
|
283 |
+
$role->add_cap( 'publish_masterslider' );
|
284 |
+
$role->add_cap( 'delete_masterslider' );
|
285 |
$role->add_cap( 'create_masterslider' );
|
286 |
$role->add_cap( 'export_masterslider' );
|
287 |
$role->add_cap( 'duplicate_masterslider' );
|
298 |
* @since 1.0.0
|
299 |
*/
|
300 |
public static function set_default_options( $force_update = false ){
|
301 |
+
|
302 |
}
|
303 |
|
304 |
|
327 |
|
328 |
endif;
|
329 |
|
330 |
+
function MSP(){ return Master_Slider::get_instance(); }
|
331 |
MSP();
|
332 |
|
333 |
|
334 |
class MSP_AttachmentFields {
|
335 |
+
|
336 |
private $fields = array();
|
337 |
+
|
338 |
function __construct($fields = null) {
|
339 |
if(isset($fields) && is_array($fields))
|
340 |
$this->$fields = $fields;
|
341 |
}
|
342 |
+
|
343 |
public function add($field){
|
344 |
if(is_array($field))
|
345 |
$this->fields[] = $field;
|
346 |
}
|
347 |
+
|
348 |
public function init(){
|
349 |
add_filter( 'attachment_fields_to_edit', array( $this, 'addFields' ), 11, 2 );
|
350 |
add_filter( 'attachment_fields_to_save', array( $this, 'saveFields' ), 11, 2 );
|
351 |
}
|
352 |
+
|
353 |
public function addFields( $form_fields, $post ){
|
354 |
|
355 |
$form_fields['image_rating'] = array(
|
368 |
|
369 |
return $form_fields;
|
370 |
}
|
371 |
+
|
372 |
public function saveFields($post, $attachment) {
|
373 |
return $post;
|
374 |
}
|