MetaSlider - Version 2.7.2

Version Description

[25/03/14] =

  • Fix: Only apply carousel margin to slides
  • Fix: Enqueue Easing library when carousel mode is enabled, regardless of effect selection
  • Fix: Thumbnail margin when theme has #content div
Download this release

Release Info

Developer matchalabs
Plugin Icon 128x128 MetaSlider
Version 2.7.2
Comparing to
See all releases

Code changes from version 2.6.3 to 2.7.2

assets/metaslider/admin.css CHANGED
@@ -31,17 +31,6 @@
31
box-shadow: inherit;
32
}
33
34
- .resize_overlay {
35
- position: absolute;
36
- width: inherit;
37
- background: transparent url(resizing.gif) no-repeat;
38
- width: 16px;
39
- height: 11px;
40
- top: 3px;
41
- left: 3px;
42
- z-index: 9999;
43
- }
44
-
45
.media-frame-menu .media-menu > a.disabled {
46
display: block;
47
position: relative;
@@ -689,7 +678,7 @@ input[type=radio]:checked + label {
689
690
.metaslider .nav-tab-active {
691
background: transparent;
692
- padding: 9px 13px 8px;
693
border-bottom: 1px solid #f1f1f1;
694
margin-top: auto;
695
position: relative;
@@ -697,15 +686,24 @@ input[type=radio]:checked + label {
697
}
698
699
.metaslider .nav-tab-active input {
700
- padding: 0 13px 0 0;
701
margin: 0;
702
border: 0;
703
width: 100px;
704
font-size: 13px;
705
- background: transparent url(edit.png) no-repeat center right;
706
box-shadow: none;
707
}
708
709
.metaslider .warning {
710
background-color: #ffebe8;
711
border: 1px solid #c00;
31
box-shadow: inherit;
32
}
33
34
.media-frame-menu .media-menu > a.disabled {
35
display: block;
36
position: relative;
678
679
.metaslider .nav-tab-active {
680
background: transparent;
681
+ padding: 6px 6px 5px;
682
border-bottom: 1px solid #f1f1f1;
683
margin-top: auto;
684
position: relative;
686
}
687
688
.metaslider .nav-tab-active input {
689
+ min-width: 100px;
690
+ padding: 3px 13px 3px 5px;
691
margin: 0;
692
border: 0;
693
width: 100px;
694
font-size: 13px;
695
+ background: transparent;
696
box-shadow: none;
697
}
698
699
+ .metaslider .nav-tab-active input:hover,
700
+ .metaslider .nav-tab-active input:focus {
701
+ -webkit-box-shadow: inset 2px 2px 2px 0px #dddddd;
702
+ -moz-box-shadow: inset 2px 2px 2px 0px #dddddd;
703
+ box-shadow: inset 2px 2px 2px 0px #dddddd;
704
+ background: white url(edit.png) no-repeat 98% center;
705
+ }
706
+
707
.metaslider .warning {
708
background-color: #ffebe8;
709
border: 1px solid #c00;
assets/metaslider/admin.js CHANGED
@@ -1,13 +1,16 @@
1
jQuery(document).ready(function($) {
2
3
- jQuery("#screen-options-link-wrap").appendTo('#screen-meta-links').show();
4
5
// Enable the correct options for this slider type
6
var switchType = function(slider) {
7
jQuery('.metaslider .option:not(.' + slider + ')').attr('disabled', 'disabled').parents('tr').hide();
8
jQuery('.metaslider .option.' + slider).removeAttr('disabled').parents('tr').show();
9
- jQuery('.metaslider .radio:not(.' + slider + ')').attr('disabled', 'disabled');
10
- jQuery('.metaslider .radio.' + slider).removeAttr('disabled');
11
12
// make sure that the selected option is available for this slider type
13
if (jQuery('.effect option:selected').attr('disabled') === 'disabled') {
@@ -21,15 +24,29 @@ jQuery(document).ready(function($) {
21
};
22
23
// enable the correct options on page load
24
- switchType(jQuery('.metaslider .select-slider:checked').attr('rel'));
25
26
// handle slide libary switching
27
- jQuery('.metaslider .select-slider').on('click', function() {
28
- switchType(jQuery(this).attr('rel'));
29
});
30
31
// return a helper with preserved width of cells
32
- var helper = function(e, ui) {
33
ui.children().each(function() {
34
jQuery(this).width(jQuery(this).width());
35
});
@@ -38,42 +55,39 @@ jQuery(document).ready(function($) {
38
39
// drag and drop slides, update the slide order on drop
40
jQuery(".metaslider .left table tbody").sortable({
41
- helper: helper,
42
- handle: 'td.col-1',
43
stop: function() {
44
- jQuery(".metaslider .left table").trigger('updateSlideOrder');
45
}
46
});
47
48
// bind an event to the slides table to update the menu order of each slide
49
- jQuery('.metaslider .left table').live('updateSlideOrder', function(event) {
50
- jQuery('tr', this).each(function() {
51
- jQuery('input.menu_order', jQuery(this)).val(jQuery(this).index());
52
});
53
});
54
55
// bind an event to the slides table to update the menu order of each slide
56
- jQuery('.metaslider .left table').live('resizeSlides', function(event) {
57
- var slideshow_width = jQuery('input.width').val();
58
- var slideshow_height = jQuery('input.height').val();
59
60
jQuery("tr.slide input[name='resize_slide_id']", this).each(function() {
61
$this = jQuery(this);
62
63
- var thumb_width = $this.attr('data-width');
64
- var thumb_height = $this.attr('data-height');
65
66
if ((thumb_width != slideshow_width || thumb_height != slideshow_height)) {
67
- $this.attr('data-width', slideshow_width);
68
- $this.attr('data-height', slideshow_height);
69
-
70
- var resizing = jQuery('<div class="resize_overlay" />');
71
- $this.parent().parent().children('.col-1').children('.thumb').append(resizing);
72
73
var data = {
74
- action: 'resize_image_slide',
75
slider_id: window.parent.metaslider_slider_id,
76
- slide_id: $this.attr('data-slide_id'),
77
_wpnonce: metaslider.resize_nonce
78
};
79
@@ -86,23 +100,25 @@ jQuery(document).ready(function($) {
86
if (console && console.log) {
87
console.log(data);
88
}
89
-
90
- resizing.remove();
91
}
92
});
93
}
94
});
95
});
96
97
// show the confirm dialogue
98
- jQuery(".confirm").on('click', function() {
99
return confirm(metaslider.confirm);
100
});
101
102
- $('.useWithCaution').on('change', function(){
103
if(!this.checked) {
104
- alert(metaslider.useWithCaution);
105
- return true;
106
}
107
});
108
@@ -115,21 +131,6 @@ jQuery(document).ready(function($) {
115
this.select();
116
});
117
118
- // show the spinner while slides are being added
119
- function checkPendingRequest() {
120
- if (jQuery.active > 0) {
121
- jQuery(".metaslider .spinner").show();
122
- jQuery(".metaslider input[type=submit]").attr('disabled', 'disabled');
123
- } else {
124
- jQuery(".metaslider .spinner").hide();
125
- jQuery(".metaslider input[type=submit]").removeAttr('disabled');
126
- }
127
-
128
- setTimeout(checkPendingRequest, 1000);
129
- }
130
-
131
- checkPendingRequest();
132
-
133
// return lightbox width
134
var getLightboxWidth = function() {
135
var width = parseInt(jQuery('input.width').val(), 10);
@@ -171,21 +172,24 @@ jQuery(document).ready(function($) {
171
}
172
173
jQuery(".metaslider .ms-toggle .hndle, .metaslider .ms-toggle .handlediv").on('click', function() {
174
- $(this).parent().toggleClass('closed');
175
});
176
177
- jQuery('.metaslider').on('click', 'ul.tabs li', function() {
178
- var tab = $(this);
179
tab.parent().parent().children('.tabs-content').children('div.tab').hide();
180
tab.parent().parent().children('.tabs-content').children('div.'+tab.attr('rel')).show();
181
- tab.siblings().removeClass('selected');
182
- tab.addClass('selected');
183
});
184
185
// AJAX save & preview
186
- jQuery(".metaslider form").find("input[type=submit]").on('click', function(e) {
187
e.preventDefault();
188
189
// update slide order
190
jQuery(".metaslider .left table").trigger('updateSlideOrder');
191
@@ -194,12 +198,9 @@ jQuery(document).ready(function($) {
194
// get some values from elements on the page:
195
var the_form = jQuery(this).parents("form");
196
var data = the_form.serialize();
197
- var url = the_form.attr('action');
198
var button = e.target;
199
200
- jQuery(".metaslider .spinner").show();
201
- jQuery(".metaslider input[type=submit]").attr('disabled', 'disabled');
202
-
203
jQuery.ajax({
204
type: "POST",
205
data : data,
@@ -207,20 +208,21 @@ jQuery(document).ready(function($) {
207
url: url,
208
success: function(data) {
209
var response = jQuery(data);
210
- jQuery(".metaslider .left table").trigger('resizeSlides');
211
212
jQuery("button[data-thumb]", response).each(function() {
213
var $this = jQuery(this);
214
- var editor_id = $this.attr('data-editor_id');
215
jQuery("button[data-editor_id=" + editor_id + "]")
216
- .attr('data-thumb', $this.attr('data-thumb'))
217
- .attr('data-width', $this.attr('data-width'))
218
- .attr('data-height', $this.attr('data-height'));
219
});
220
221
fixIE10PlaceholderText();
222
223
- if (button.id === 'ms-preview') {
224
jQuery.colorbox({
225
iframe: true,
226
href: metaslider.iframeurl + "?slider_id=" + jQuery(button).data("slider_id"),
1
jQuery(document).ready(function($) {
2
3
+ jQuery("#screen-options-link-wrap").appendTo("#screen-meta-links").show();
4
5
// Enable the correct options for this slider type
6
var switchType = function(slider) {
7
jQuery('.metaslider .option:not(.' + slider + ')').attr('disabled', 'disabled').parents('tr').hide();
8
jQuery('.metaslider .option.' + slider).removeAttr('disabled').parents('tr').show();
9
+ jQuery('.metaslider input.radio:not(.' + slider + ')').attr('disabled', 'disabled');
10
+ jQuery('.metaslider input.radio.' + slider).removeAttr('disabled');
11
+
12
+ jQuery('.metaslider .showNextWhenChecked:visible').parent().parent().next('tr').hide();
13
+ jQuery('.metaslider .showNextWhenChecked:visible:checked').parent().parent().next('tr').show();
14
15
// make sure that the selected option is available for this slider type
16
if (jQuery('.effect option:selected').attr('disabled') === 'disabled') {
24
};
25
26
// enable the correct options on page load
27
+ switchType(jQuery(".metaslider .select-slider:checked").attr("rel"));
28
+
29
+ var toggleNextRow = function(checkbox) {
30
+ if(checkbox.is(':checked')){
31
+ checkbox.parent().parent().next("tr").show();
32
+ } else {
33
+ checkbox.parent().parent().next("tr").hide();
34
+ }
35
+ }
36
+
37
+ toggleNextRow(jQuery(".metaslider .showNextWhenChecked"));
38
+
39
+ jQuery(".metaslider .showNextWhenChecked").on("change", function() {
40
+ toggleNextRow(jQuery(this));
41
+ });
42
43
// handle slide libary switching
44
+ jQuery(".metaslider .select-slider").on("click", function() {
45
+ switchType(jQuery(this).attr("rel"));
46
});
47
48
// return a helper with preserved width of cells
49
+ var metaslider_sortable_helper = function(e, ui) {
50
ui.children().each(function() {
51
jQuery(this).width(jQuery(this).width());
52
});
55
56
// drag and drop slides, update the slide order on drop
57
jQuery(".metaslider .left table tbody").sortable({
58
+ helper: metaslider_sortable_helper,
59
+ handle: "td.col-1",
60
stop: function() {
61
+ jQuery(".metaslider .left table").trigger("updateSlideOrder");
62
}
63
});
64
65
// bind an event to the slides table to update the menu order of each slide
66
+ jQuery(".metaslider .left table").live("updateSlideOrder", function(event) {
67
+ jQuery("tr", this).each(function() {
68
+ jQuery("input.menu_order", jQuery(this)).val(jQuery(this).index());
69
});
70
});
71
72
// bind an event to the slides table to update the menu order of each slide
73
+ jQuery(".metaslider .left table").live("resizeSlides", function(event) {
74
+ var slideshow_width = jQuery("input.width").val();
75
+ var slideshow_height = jQuery("input.height").val();
76
77
jQuery("tr.slide input[name='resize_slide_id']", this).each(function() {
78
$this = jQuery(this);
79
80
+ var thumb_width = $this.attr("data-width");
81
+ var thumb_height = $this.attr("data-height");
82
83
if ((thumb_width != slideshow_width || thumb_height != slideshow_height)) {
84
+ $this.attr("data-width", slideshow_width);
85
+ $this.attr("data-height", slideshow_height);
86
87
var data = {
88
+ action: "resize_image_slide",
89
slider_id: window.parent.metaslider_slider_id,
90
+ slide_id: $this.attr("data-slide_id"),
91
_wpnonce: metaslider.resize_nonce
92
};
93
100
if (console && console.log) {
101
console.log(data);
102
}
103
}
104
});
105
}
106
});
107
});
108
109
+ jQuery(document).ajaxStop(function() {
110
+ jQuery(".metaslider .spinner").hide();
111
+ jQuery(".metaslider input[type=submit]").removeAttr("disabled");
112
+ });
113
+
114
// show the confirm dialogue
115
+ jQuery(".confirm").on("click", function() {
116
return confirm(metaslider.confirm);
117
});
118
119
+ jQuery(".useWithCaution").on("change", function(){
120
if(!this.checked) {
121
+ return alert(metaslider.useWithCaution);
122
}
123
});
124
131
this.select();
132
});
133
134
// return lightbox width
135
var getLightboxWidth = function() {
136
var width = parseInt(jQuery('input.width').val(), 10);
172
}
173
174
jQuery(".metaslider .ms-toggle .hndle, .metaslider .ms-toggle .handlediv").on('click', function() {
175
+ jQuery(this).parent().toggleClass('closed');
176
});
177
178
+ jQuery(".metaslider").on('click', 'ul.tabs li', function() {
179
+ var tab = jQuery(this);
180
tab.parent().parent().children('.tabs-content').children('div.tab').hide();
181
tab.parent().parent().children('.tabs-content').children('div.'+tab.attr('rel')).show();
182
+ tab.siblings().removeClass("selected");
183
+ tab.addClass("selected");
184
});
185
186
// AJAX save & preview
187
+ jQuery(".metaslider form").find("input[type=submit]").on("click", function(e) {
188
e.preventDefault();
189
190
+ jQuery(".metaslider .spinner").show();
191
+ jQuery(".metaslider input[type=submit]").attr("disabled", "disabled");
192
+
193
// update slide order
194
jQuery(".metaslider .left table").trigger('updateSlideOrder');
195
198
// get some values from elements on the page:
199
var the_form = jQuery(this).parents("form");
200
var data = the_form.serialize();
201
+ var url = the_form.attr("action");
202
var button = e.target;
203
204
jQuery.ajax({
205
type: "POST",
206
data : data,
208
url: url,
209
success: function(data) {
210
var response = jQuery(data);
211
+
212
+ jQuery(".metaslider .left table").trigger("resizeSlides");
213
214
jQuery("button[data-thumb]", response).each(function() {
215
var $this = jQuery(this);
216
+ var editor_id = $this.attr("data-editor_id");
217
jQuery("button[data-editor_id=" + editor_id + "]")
218
+ .attr("data-thumb", $this.attr("data-thumb"))
219
+ .attr("data-width", $this.attr("data-width"))
220
+ .attr("data-height", $this.attr("data-height"));
221
});
222
223
fixIE10PlaceholderText();
224
225
+ if (button.id === "ms-preview") {
226
jQuery.colorbox({
227
iframe: true,
228
href: metaslider.iframeurl + "?slider_id=" + jQuery(button).data("slider_id"),
assets/metaslider/image/image.js CHANGED
@@ -4,7 +4,7 @@
4
(function ($) {
5
$(function () {
6
var file_frame;
7
-
8
jQuery('.metaslider .add-slide').on('click', function(event){
9
event.preventDefault();
10
@@ -23,6 +23,10 @@
23
24
// When an image is selected, run a callback.
25
file_frame.on('insert', function() {
26
var selection = file_frame.state().get('selection');
27
var slide_ids = [];
28
4
(function ($) {
5
$(function () {
6
var file_frame;
7
+
8
jQuery('.metaslider .add-slide').on('click', function(event){
9
event.preventDefault();
10
23
24
// When an image is selected, run a callback.
25
file_frame.on('insert', function() {
26
+
27
+ jQuery(".metaslider .spinner").show();
28
+ jQuery(".metaslider input[type=submit]").attr('disabled', 'disabled');
29
+
30
var selection = file_frame.state().get('selection');
31
var slide_ids = [];
32
assets/metaslider/public.css CHANGED
@@ -8,6 +8,7 @@
8
/* general resets */
9
.metaslider {
10
position: relative;
11
}
12
.metaslider.nav-hidden .flexslider {
13
margin-bottom: 0;
@@ -23,6 +24,7 @@
23
.metaslider img {
24
height: auto;
25
padding: 0;
26
}
27
28
.metaslider .theme-default .nivoSlider {
@@ -57,36 +59,39 @@
57
}
58
59
/** quick resets **/
60
.article .metaslider ol,
61
.art-article .metaslider img,
62
#widgets .metaslider ul,
63
#widgets .metaslider ol,
64
#content .metaslider ul,
65
#content .metaslider ol,
66
#content .metaslider li,
67
- .entry .metaslider ul,
68
- .entry .metaslider ol,
69
.entry-content .metaslider ul,
70
.entry-content .metaslider ol,
71
- .entry-content .metaslider img
72
.metaslider .flexslider ul,
73
.metaslider .flexslider .slides li,
74
.metaslider .flexslider .slides ul,
75
.metaslider .flexslider .slides ol,
76
.metaslider .flexslider .flex-direction-nav,
77
.metaslider .flexslider .flex-direction-nav li,
78
- .entry-content .metaslider .flexslider ol.flex-control-nav
79
- {
80
border: 0;
81
- border-top: 0;
82
- border-right: 0;
83
- border-bottom: 0;
84
- border-left: 0;
85
margin: 0;
86
- margin-top: 0;
87
- margin-right: 0;
88
- margin-bottom: 0;
89
- margin-left: 0;
90
list-style-type: none;
91
list-style: none;
92
padding: 0;
8
/* general resets */
9
.metaslider {
10
position: relative;
11
+ z-index: 0;
12
}
13
.metaslider.nav-hidden .flexslider {
14
margin-bottom: 0;
24
.metaslider img {
25
height: auto;
26
padding: 0;
27
+ margin: 0;
28
}
29
30
.metaslider .theme-default .nivoSlider {
59
}
60
61
/** quick resets **/
62
+ .article .metaslider ul,
63
.article .metaslider ol,
64
+ .article .metaslider li,
65
+ .article .metaslider img,
66
+ .art-article .metaslider ul,
67
+ .art-article .metaslider ol,
68
+ .art-article .metaslider li,
69
.art-article .metaslider img,
70
#widgets .metaslider ul,
71
#widgets .metaslider ol,
72
+ #widgets .metaslider li,
73
+ #widgets .metaslider img,
74
+ .entry .metaslider ul,
75
+ .entry .metaslider ol,
76
+ .entry .metaslider li,
77
+ .entry .metaslider img,
78
#content .metaslider ul,
79
#content .metaslider ol,
80
#content .metaslider li,
81
+ #content .metaslider img,
82
.entry-content .metaslider ul,
83
.entry-content .metaslider ol,
84
+ .entry-content .metaslider li,
85
+ .entry-content .metaslider img,
86
.metaslider .flexslider ul,
87
.metaslider .flexslider .slides li,
88
.metaslider .flexslider .slides ul,
89
.metaslider .flexslider .slides ol,
90
.metaslider .flexslider .flex-direction-nav,
91
.metaslider .flexslider .flex-direction-nav li,
92
+ *[class*='-article'] .metaslider img {
93
border: 0;
94
margin: 0;
95
list-style-type: none;
96
list-style: none;
97
padding: 0;
assets/metaslider/resizing.gif DELETED
Binary file
assets/sliders/flexslider/flexslider.css CHANGED
@@ -9,7 +9,7 @@
9
* Contributing author: Tyler Smith (@mbmufffin)
10
*/
11
12
-
13
/* Browser Resets */
14
.flex-container a:active,
15
.flexslider a:active,
@@ -17,18 +17,18 @@
17
.flexslider a:focus {outline: none;}
18
.slides,
19
.flex-control-nav,
20
- .flex-direction-nav {margin: 0; padding: 0; list-style: none;}
21
22
/* FlexSlider Necessary Styles
23
- *********************************/
24
.flexslider {margin: 0; padding: 0;}
25
.flexslider .slides > li {display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */
26
.flexslider .slides img {width: 100%; display: block;}
27
.flex-pauseplay span {text-transform: capitalize;}
28
29
/* Clearfix for the .slides element */
30
- .slides:after {content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;}
31
- html[xmlns] .slides {display: block;}
32
* html .slides {height: 1%;}
33
34
/* No JavaScript Fallback */
@@ -75,8 +75,6 @@ html[xmlns] .slides {display: block;}
75
.flex-direction-nav .flex-next {opacity: 1; right: 0;}
76
}
77
78
-
79
-
80
/** Custom Meta Slider CSS **/
81
.flexslider {
82
background: none;
@@ -93,11 +91,11 @@ html[xmlns] .slides {display: block;}
93
line-height: 11px;
94
}
95
96
-
97
/** move margin from list items to anchors */
98
.flex-control-nav li {
99
margin: 0;
100
}
101
.flex-control-nav li a {
102
margin: 0 6px;
103
padding: 0;
@@ -129,12 +127,23 @@ html[xmlns] .slides {display: block;}
129
.metaslider .flexslider.filmstrip {
130
margin-top: 10px;
131
}
132
.metaslider .flexslider.filmstrip .slides li {
133
cursor: pointer;
134
opacity: 0.5;
135
}
136
.metaslider .flexslider.filmstrip .slides li.flex-active-slide,
137
.metaslider .flexslider.filmstrip .slides li:hover,
138
.metaslider .flexslider.filmstrip .slides li:focus {
139
opacity: 1.0 !important;
140
- }
9
* Contributing author: Tyler Smith (@mbmufffin)
10
*/
11
12
+
13
/* Browser Resets */
14
.flex-container a:active,
15
.flexslider a:active,
17
.flexslider a:focus {outline: none;}
18
.slides,
19
.flex-control-nav,
20
+ .flex-direction-nav {margin: 0; padding: 0; list-style: none;}
21
22
/* FlexSlider Necessary Styles
23
+ *********************************/
24
.flexslider {margin: 0; padding: 0;}
25
.flexslider .slides > li {display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */
26
.flexslider .slides img {width: 100%; display: block;}
27
.flex-pauseplay span {text-transform: capitalize;}
28
29
/* Clearfix for the .slides element */
30
+ .slides:after {content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;}
31
+ html[xmlns] .slides {display: block;}
32
* html .slides {height: 1%;}
33
34
/* No JavaScript Fallback */
75
.flex-direction-nav .flex-next {opacity: 1; right: 0;}
76
}
77
78
/** Custom Meta Slider CSS **/
79
.flexslider {
80
background: none;
91
line-height: 11px;
92
}
93
94
/** move margin from list items to anchors */
95
.flex-control-nav li {
96
margin: 0;
97
}
98
+
99
.flex-control-nav li a {
100
margin: 0 6px;
101
padding: 0;
127
.metaslider .flexslider.filmstrip {
128
margin-top: 10px;
129
}
130
+
131
.metaslider .flexslider.filmstrip .slides li {
132
cursor: pointer;
133
opacity: 0.5;
134
}
135
+
136
.metaslider .flexslider.filmstrip .slides li.flex-active-slide,
137
.metaslider .flexslider.filmstrip .slides li:hover,
138
.metaslider .flexslider.filmstrip .slides li:focus {
139
opacity: 1.0 !important;
140
+ }
141
+
142
+ .metaslider .flex-control-thumbs li {
143
+ width: auto;
144
+ }
145
+
146
+ .metaslider ol.flex-control-thumbs img,
147
+ #content .metaslider ol.flex-control-thumbs img {
148
+ margin: 10px 5px 0;
149
+ }
assets/sliders/nivoslider/themes/bar/bar.css CHANGED
@@ -88,12 +88,12 @@ Supports Thumbs: false
88
}
89
.theme-bar a.nivo-nextNav { right: -50px; }
90
.theme-bar a.nivo-prevNav { left: -50px; }
91
- .theme-bar:hover a.nivo-nextNav {
92
- right: 15px;
93
opacity: 1;
94
}
95
- .theme-bar:hover a.nivo-prevNav {
96
- left: 15px;
97
opacity: 1;
98
}
99
.theme-bar .nivo-directionNav a:hover { color: #ddd; }
@@ -127,6 +127,5 @@ Supports Thumbs: false
127
}
128
.theme-bar .nivo-controlNav.nivo-thumbs-enabled img {
129
display: block;
130
- width: 120px;
131
height: auto;
132
}
88
}
89
.theme-bar a.nivo-nextNav { right: -50px; }
90
.theme-bar a.nivo-prevNav { left: -50px; }
91
+ .theme-bar:hover a.nivo-nextNav {
92
+ right: 15px;
93
opacity: 1;
94
}
95
+ .theme-bar:hover a.nivo-prevNav {
96
+ left: 15px;
97
opacity: 1;
98
}
99
.theme-bar .nivo-directionNav a:hover { color: #ddd; }
127
}
128
.theme-bar .nivo-controlNav.nivo-thumbs-enabled img {
129
display: block;
130
height: auto;
131
}
assets/sliders/nivoslider/themes/dark/dark.css CHANGED
@@ -97,6 +97,5 @@ Supports Thumbs: true
97
}
98
.theme-dark .nivo-controlNav.nivo-thumbs-enabled img {
99
display: block;
100
- width: 120px;
101
height: auto;
102
}
97
}
98
.theme-dark .nivo-controlNav.nivo-thumbs-enabled img {
99
display: block;
100
height: auto;
101
}
assets/sliders/nivoslider/themes/light/light.css CHANGED
@@ -97,6 +97,5 @@ Supports Thumbs: true
97
}
98
.theme-light .nivo-controlNav.nivo-thumbs-enabled img {
99
display: block;
100
- width: 120px;
101
height: auto;
102
}
97
}
98
.theme-light .nivo-controlNav.nivo-thumbs-enabled img {
99
display: block;
100
height: auto;
101
}
inc/metaslider.imagehelper.class.php CHANGED
@@ -14,7 +14,7 @@ class MetaSliderImageHelper {
14
15
/**
16
* Constructor
17
- *
18
* @param integer $slide_id
19
* @param integer $width - required width of image
20
* @param integer $height - required height of image
@@ -34,11 +34,11 @@ class MetaSliderImageHelper {
34
35
/**
36
* Return the crop dimensions.
37
- *
38
* Smart Crop: If the image is smaller than the container width or height, then return
39
- * dimensions that respect the container size ratio. This ensures image displays in a
40
* sane manner in responsive sliders
41
- *
42
* @param integer $image_width
43
* @param integer $image_height
44
* @return array image dimensions
@@ -157,56 +157,43 @@ class MetaSliderImageHelper {
157
158
/**
159
* Return the image URL, crop the image to the correct dimensions if required
160
- *
161
* @return string resized image URL
162
*/
163
function get_image_url() {
164
// Get the image file path
165
if (!strlen($this->path)) {
166
- return $this->url;
167
- }
168
-
169
- // if the file exists, just return it without going any further
170
- $dest_file_name = $this->get_destination_file_name(array(
171
- 'width' => $this->container_width,
172
- 'height' => $this->container_height
173
- )
174
- );
175
-
176
- if (file_exists($dest_file_name)) {
177
- return str_replace(basename($this->url), basename($dest_file_name), $this->url);
178
}
179
180
- // file doesn't exist, detect required size
181
$orig_size = $this->get_original_image_dimensions();
182
183
- // bail out if we can't find the image dimensions
184
if ($orig_size == false) {
185
- return $this->url;
186
}
187
188
- // required size
189
$dest_size = $this->get_crop_dimensions($orig_size['width'], $orig_size['height']);
190
191
- // check if a resize is needed
192
if ($orig_size['width'] == $dest_size['width'] && $orig_size['height'] == $dest_size['height']) {
193
- return $this->url;
194
}
195
196
$dest_file_name = $this->get_destination_file_name($dest_size);
197
198
- if (file_exists($dest_file_name))
199
- {
200
// good. no need for resize, just return the URL
201
$dest_url = str_replace(basename($this->url), basename($dest_file_name), $this->url);
202
- }
203
- else if ($this->use_image_editor)
204
- {
205
// resize, assuming we're allowed to use the image editor
206
$dest_url = $this->resize_image($orig_size, $dest_size, $dest_file_name);
207
}
208
- else
209
- {
210
// fall back to the full URL
211
$dest_url = $this->url;
212
}
@@ -218,9 +205,9 @@ class MetaSliderImageHelper {
218
219
/**
220
* Get the image dimensions for the original image.
221
- *
222
* Fall back to using the WP_Image_Editor if the size is not stored in metadata
223
- *
224
* @return array
225
*/
226
private function get_original_image_dimensions() {
@@ -236,7 +223,7 @@ class MetaSliderImageHelper {
236
if ($this->use_image_editor) {
237
// get the size from the image itself
238
$image = wp_get_image_editor($this->path);
239
-
240
if (!is_wp_error($image)) {
241
$size = $image->get_size();
242
return $size;
@@ -248,9 +235,9 @@ class MetaSliderImageHelper {
248
249
/**
250
* Return the file name for the required image size
251
- *
252
* @param array $dest_size image dimensions (width/height) in pixels
253
- * @return string
254
*/
255
private function get_destination_file_name($dest_size) {
256
$info = pathinfo($this->path);
@@ -264,7 +251,7 @@ class MetaSliderImageHelper {
264
265
/**
266
* Use WP_Image_Editor to create a resized image and return the URL for that image
267
- *
268
* @param array $orig_size
269
* @param array $dest_size
270
* @return string
@@ -277,14 +264,10 @@ class MetaSliderImageHelper {
277
if (is_wp_error($image)) {
278
if (is_admin()) {
279
echo '<div id="message" class="error">';
280
- echo "<p><strong>ERROR</strong> " . $image->get_error_message() . " Check <a href='http://codex.wordpress.org/Changing_File_Permissions' target='_blank'>file permissions</a></p>";
281
- echo "<button class='toggle'>Show Details</button>";
282
- echo "<div class='message' style='display: none;'><br />Slide ID: {$this->id}<pre>";
283
- var_dump($image);
284
- echo "</pre></div>";
285
echo "</div>";
286
}
287
-
288
return $this->url;
289
}
290
14
15
/**
16
* Constructor
17
+ *
18
* @param integer $slide_id
19
* @param integer $width - required width of image
20
* @param integer $height - required height of image
34
35
/**
36
* Return the crop dimensions.
37
+ *
38
* Smart Crop: If the image is smaller than the container width or height, then return
39
+ * dimensions that respect the container size ratio. This ensures image displays in a
40
* sane manner in responsive sliders
41
+ *
42
* @param integer $image_width
43
* @param integer $image_height
44
* @return array image dimensions
157
158
/**
159
* Return the image URL, crop the image to the correct dimensions if required
160
+ *
161
* @return string resized image URL
162
*/
163
function get_image_url() {
164
// Get the image file path
165
if (!strlen($this->path)) {
166
+ return apply_filters('metaslider_resized_image_url', $this->url, $this->url);
167
}
168
169
+ // get the full image size dimensions
170
$orig_size = $this->get_original_image_dimensions();
171
172
+ // bail out if we can't find the image dimensions, return the full URL
173
if ($orig_size == false) {
174
+ return apply_filters('metaslider_resized_image_url', $this->url, $this->url);
175
}
176
177
+ // get our crop dimensions (this is the size we want to display)
178
$dest_size = $this->get_crop_dimensions($orig_size['width'], $orig_size['height']);
179
180
+ // if the full size is the same as the required size, return the full URL
181
if ($orig_size['width'] == $dest_size['width'] && $orig_size['height'] == $dest_size['height']) {
182
+ return apply_filters('metaslider_resized_image_url', $this->url, $this->url);
183
}
184
185
+ // construct the file name
186
$dest_file_name = $this->get_destination_file_name($dest_size);
187
188
+ if (file_exists($dest_file_name)) {
189
// good. no need for resize, just return the URL
190
$dest_url = str_replace(basename($this->url), basename($dest_file_name), $this->url);
191
+ }
192
+ else if ($this->use_image_editor) {
193
// resize, assuming we're allowed to use the image editor
194
$dest_url = $this->resize_image($orig_size, $dest_size, $dest_file_name);
195
}
196
+ else {
197
// fall back to the full URL
198
$dest_url = $this->url;
199
}
205
206
/**
207
* Get the image dimensions for the original image.
208
+ *
209
* Fall back to using the WP_Image_Editor if the size is not stored in metadata
210
+ *
211
* @return array
212
*/
213
private function get_original_image_dimensions() {
223
if ($this->use_image_editor) {
224
// get the size from the image itself
225
$image = wp_get_image_editor($this->path);
226
+
227
if (!is_wp_error($image)) {
228
$size = $image->get_size();
229
return $size;
235
236
/**
237
* Return the file name for the required image size
238
+ *
239
* @param array $dest_size image dimensions (width/height) in pixels
240
+ * @return string
241
*/
242
private function get_destination_file_name($dest_size) {
243
$info = pathinfo($this->path);
251
252
/**
253
* Use WP_Image_Editor to create a resized image and return the URL for that image
254
+ *
255
* @param array $orig_size
256
* @param array $dest_size
257
* @return string
264
if (is_wp_error($image)) {
265
if (is_admin()) {
266
echo '<div id="message" class="error">';
267
+ echo "<p><strong>ERROR</strong> Slide ID: {$this->id} - <i>" . $image->get_error_message() . "</i></p>";
268
echo "</div>";
269
}
270
+
271
return $this->url;
272
}
273
inc/slide/metaslide.image.class.php CHANGED
@@ -44,7 +44,7 @@ class MetaImageSlide extends MetaSlide {
44
$this->settings['width'] = 0;
45
$this->settings['height'] = 0;
46
47
- echo $this->get_admin_slide();
48
}
49
}
50
}
@@ -69,8 +69,8 @@ class MetaImageSlide extends MetaSlide {
69
// create a copy of the correct sized image
70
$imageHelper = new MetaSliderImageHelper(
71
$slide_id,
72
- $settings['width'],
73
- $settings['height'],
74
isset($settings['smartCrop']) ? $settings['smartCrop'] : 'false',
75
$this->use_wp_image_editor()
76
);
@@ -84,7 +84,7 @@ class MetaImageSlide extends MetaSlide {
84
85
/**
86
* Return the HTML used to display this slide in the admin screen
87
- *
88
* @return string slide html
89
*/
90
protected function get_admin_slide() {
@@ -118,7 +118,7 @@ class MetaImageSlide extends MetaSlide {
118
$row .= " <li class='selected' rel='tab-1'>" . __("General", "metaslider") . "</li>";
119
$row .= " <li rel='tab-2'>" . __("SEO", "metaslider") . "</li>";
120
$row .= " </ul>";
121
- $row .= " <div class='tabs-content'>";
122
$row .= " <div class='tab tab-1'>";
123
if (!$this->is_valid_image()) {
124
$row .= "<div class='warning'>" . __('Warning: Image data does not exist. Please re-upload the image.') . "</div>";
@@ -168,7 +168,7 @@ class MetaImageSlide extends MetaSlide {
168
169
/**
170
* Returns the HTML for the public slide
171
- *
172
* @return string slide html
173
*/
174
protected function get_public_slide() {
@@ -176,8 +176,8 @@ class MetaImageSlide extends MetaSlide {
176
// disable wp_image_editor if metadata does not exist for the slide
177
$imageHelper = new MetaSliderImageHelper(
178
$this->slide->ID,
179
- $this->settings['width'],
180
- $this->settings['height'],
181
isset($this->settings['smartCrop']) ? $this->settings['smartCrop'] : 'false',
182
$this->use_wp_image_editor()
183
);
@@ -189,14 +189,14 @@ class MetaImageSlide extends MetaSlide {
189
'id' => $this->slide->ID,
190
'url' => __(get_post_meta($this->slide->ID, 'ml-slider_url', true)),
191
'title' => __(get_post_meta($this->slide->ID, 'ml-slider_title', true)),
192
- 'target' => get_post_meta($this->slide->ID, 'ml-slider_new_window', true) ? '_blank' : '_self',
193
'src' => $thumb,
194
'thumb' => $thumb, // backwards compatibility with Vantage
195
'width' => $this->settings['width'],
196
'height' => $this->settings['height'],
197
'alt' => __(get_post_meta($this->slide->ID, '_wp_attachment_image_alt', true)),
198
- 'caption' => __(html_entity_decode($this->slide->post_excerpt, ENT_NOQUOTES, 'UTF-8')),
199
- 'caption_raw' => __($this->slide->post_excerpt),
200
'class' => "slider-{$this->slider->ID} slide-{$this->slide->ID}",
201
'rel' => "",
202
'data-thumb' => ""
@@ -226,7 +226,7 @@ class MetaImageSlide extends MetaSlide {
226
227
/**
228
* Generate nivo slider markup
229
- *
230
* @return string slide html
231
*/
232
private function get_nivo_slider_markup($slide) {
@@ -258,7 +258,7 @@ class MetaImageSlide extends MetaSlide {
258
259
/**
260
* Generate flex slider markup
261
- *
262
* @return string slide html
263
*/
264
private function get_flex_slider_markup($slide) {
@@ -289,7 +289,7 @@ class MetaImageSlide extends MetaSlide {
289
}
290
291
$thumb = isset($slide['data-thumb']) && strlen($slide['data-thumb']) ? " data-thumb=\"{$slide['data-thumb']}\"" : "";
292
-
293
$html = '<li style="display: none;"' . $thumb . '>' . $html . '</li>';
294
295
return apply_filters('metaslider_image_flex_slider_markup', $html, $slide, $this->settings);
@@ -297,7 +297,7 @@ class MetaImageSlide extends MetaSlide {
297
298
/**
299
* Generate coin slider markup
300
- *
301
* @return string slide html
302
*/
303
private function get_coin_slider_markup($slide) {
@@ -329,7 +329,7 @@ class MetaImageSlide extends MetaSlide {
329
330
/**
331
* Generate responsive slides markup
332
- *
333
* @return string slide html
334
*/
335
private function get_responsive_slides_markup($slide) {
44
$this->settings['width'] = 0;
45
$this->settings['height'] = 0;
46
47
+ echo $this->get_admin_slide();
48
}
49
}
50
}
69
// create a copy of the correct sized image
70
$imageHelper = new MetaSliderImageHelper(
71
$slide_id,
72
+ $settings['width'],
73
+ $settings['height'],
74
isset($settings['smartCrop']) ? $settings['smartCrop'] : 'false',
75
$this->use_wp_image_editor()
76
);
84
85
/**
86
* Return the HTML used to display this slide in the admin screen
87
+ *
88
* @return string slide html
89
*/
90
protected function get_admin_slide() {
118
$row .= " <li class='selected' rel='tab-1'>" . __("General", "metaslider") . "</li>";
119
$row .= " <li rel='tab-2'>" . __("SEO", "metaslider") . "</li>";
120
$row .= " </ul>";
121
+ $row .= " <div class='tabs-content'>";
122
$row .= " <div class='tab tab-1'>";
123
if (!$this->is_valid_image()) {
124
$row .= "<div class='warning'>" . __('Warning: Image data does not exist. Please re-upload the image.') . "</div>";
168
169
/**
170
* Returns the HTML for the public slide
171
+ *
172
* @return string slide html
173
*/
174
protected function get_public_slide() {
176
// disable wp_image_editor if metadata does not exist for the slide
177
$imageHelper = new MetaSliderImageHelper(
178
$this->slide->ID,
179
+ $this->settings['width'],
180
+ $this->settings['height'],
181
isset($this->settings['smartCrop']) ? $this->settings['smartCrop'] : 'false',
182
$this->use_wp_image_editor()
183
);
189
'id' => $this->slide->ID,
190
'url' => __(get_post_meta($this->slide->ID, 'ml-slider_url', true)),
191
'title' => __(get_post_meta($this->slide->ID, 'ml-slider_title', true)),
192
+ 'target' => get_post_meta($this->slide->ID, 'ml-slider_new_window', true) ? '_blank' : '_self',
193
'src' => $thumb,
194
'thumb' => $thumb, // backwards compatibility with Vantage
195
'width' => $this->settings['width'],
196
'height' => $this->settings['height'],
197
'alt' => __(get_post_meta($this->slide->ID, '_wp_attachment_image_alt', true)),
198
+ 'caption' => __(html_entity_decode(do_shortcode($this->slide->post_excerpt), ENT_NOQUOTES, 'UTF-8')),
199
+ 'caption_raw' => __(do_shortcode($this->slide->post_excerpt)),
200
'class' => "slider-{$this->slider->ID} slide-{$this->slide->ID}",
201
'rel' => "",
202
'data-thumb' => ""
226
227
/**
228
* Generate nivo slider markup
229
+ *
230
* @return string slide html
231
*/
232
private function get_nivo_slider_markup($slide) {
258
259
/**
260
* Generate flex slider markup
261
+ *
262
* @return string slide html
263
*/
264
private function get_flex_slider_markup($slide) {
289
}
290
291
$thumb = isset($slide['data-thumb']) && strlen($slide['data-thumb']) ? " data-thumb=\"{$slide['data-thumb']}\"" : "";
292
+
293
$html = '<li style="display: none;"' . $thumb . '>' . $html . '</li>';
294
295
return apply_filters('metaslider_image_flex_slider_markup', $html, $slide, $this->settings);
297
298
/**
299
* Generate coin slider markup
300
+ *
301
* @return string slide html
302
*/
303
private function get_coin_slider_markup($slide) {
329
330
/**
331
* Generate responsive slides markup
332
+ *
333
* @return string slide html
334
*/
335
private function get_responsive_slides_markup($slide) {
inc/slider/metaslider.class.php CHANGED
@@ -108,6 +108,7 @@ class MetaSlider {
108
'center' => false,
109
'smartCrop' => true,
110
'carouselMode' => false,
111
'easing' => 'linear',
112
'autoPlay' => true,
113
'thumb_width' => 150,
108
'center' => false,
109
'smartCrop' => true,
110
'carouselMode' => false,
111
+ 'carouselMargin' => 5,
112
'easing' => 'linear',
113
'autoPlay' => true,
114
'thumb_width' => 150,
inc/slider/metaslider.flex.class.php CHANGED
@@ -7,7 +7,6 @@ class MetaFlexSlider extends MetaSlider {
7
protected $js_function = 'flexslider';
8
protected $js_path = 'sliders/flexslider/jquery.flexslider-min.js';
9
protected $css_path = 'sliders/flexslider/flexslider.css';
10
- protected $carousel_item_margin = 5;
11
12
/**
13
* Constructor
@@ -18,11 +17,9 @@ class MetaFlexSlider extends MetaSlider {
18
parent::__construct($id, $shortcode_settings);
19
20
add_filter('metaslider_flex_slider_parameters', array($this, 'enable_carousel_mode'), 10, 2);
21
- add_filter('metaslider_flex_slider_parameters', array($this, 'enable_easing'), 10, 2);
22
add_filter('metaslider_css', array($this, 'get_carousel_css'), 11, 3);
23
add_filter('metaslider_css_classes', array($this, 'remove_bottom_margin'), 11, 3);
24
-
25
- $this->carousel_item_margin = apply_filters('metaslider_carousel_margin', $this->carousel_item_margin, $id);
26
}
27
28
/**
@@ -39,7 +36,7 @@ class MetaFlexSlider extends MetaSlider {
39
$options["animation"] = "'slide'";
40
$options["direction"] = "'horizontal'";
41
$options["minItems"] = 1;
42
- $options["itemMargin"] = $this->carousel_item_margin;
43
}
44
45
unset($options["carouselMode"]);
@@ -58,13 +55,17 @@ class MetaFlexSlider extends MetaSlider {
58
* @param integer $slider_id
59
* @return array $options
60
*/
61
- public function enable_easing($options, $slider_id) {
62
if (isset($options["easing"])) {
63
$options['useCSS'] = 'false';
64
}
65
66
// we don't want this filter hanging around if there's more than one slideshow on the page
67
- remove_filter('metaslider_flex_slider_parameters', array($this, 'enable_easing'), 10, 2);
68
69
return $options;
70
}
@@ -98,7 +99,8 @@ class MetaFlexSlider extends MetaSlider {
98
*/
99
public function get_carousel_css($css, $settings, $slider_id) {
100
if (isset($settings["carouselMode"]) && $settings['carouselMode'] == 'true') {
101
- $css .= "\n #metaslider_{$slider_id}.flexslider li {margin-right: {$this->carousel_item_margin}px;}";
102
}
103
104
// we don't want this filter hanging around if there's more than one slideshow on the page
@@ -143,7 +145,7 @@ class MetaFlexSlider extends MetaSlider {
143
public function enqueue_scripts() {
144
parent::enqueue_scripts();
145
146
- if ($this->get_setting('printJs') == 'true') {
147
wp_enqueue_script('metaslider-easing', METASLIDER_ASSETS_URL . 'easing/jQuery.easing.min.js', array('jquery'), METASLIDER_VERSION);
148
}
149
}
7
protected $js_function = 'flexslider';
8
protected $js_path = 'sliders/flexslider/jquery.flexslider-min.js';
9
protected $css_path = 'sliders/flexslider/flexslider.css';
10
11
/**
12
* Constructor
17
parent::__construct($id, $shortcode_settings);
18
19
add_filter('metaslider_flex_slider_parameters', array($this, 'enable_carousel_mode'), 10, 2);
20
+ add_filter('metaslider_flex_slider_parameters', array($this, 'manage_easing'), 10, 2);
21
add_filter('metaslider_css', array($this, 'get_carousel_css'), 11, 3);
22
add_filter('metaslider_css_classes', array($this, 'remove_bottom_margin'), 11, 3);
23
}
24
25
/**
36
$options["animation"] = "'slide'";
37
$options["direction"] = "'horizontal'";
38
$options["minItems"] = 1;
39
+ $options["itemMargin"] = apply_filters('metaslider_carousel_margin', $this->get_setting('carouselMargin'), $slider_id);
40
}
41
42
unset($options["carouselMode"]);
55
* @param integer $slider_id
56
* @return array $options
57
*/
58
+ public function manage_easing($options, $slider_id) {
59
if (isset($options["easing"])) {
60
$options['useCSS'] = 'false';
61
}
62
63
+ if ($options["animation"] == '"fade"') {
64
+ unset($options['easing']);
65
+ }
66
+
67
// we don't want this filter hanging around if there's more than one slideshow on the page
68
+ remove_filter('metaslider_flex_slider_parameters', array($this, 'manage_easing'), 10, 2);
69
70
return $options;
71
}
99
*/
100
public function get_carousel_css($css, $settings, $slider_id) {
101
if (isset($settings["carouselMode"]) && $settings['carouselMode'] == 'true') {
102
+ $margin = apply_filters('metaslider_carousel_margin', $this->get_setting('carouselMargin'), $slider_id);
103
+ $css .= "\n #metaslider_{$slider_id}.flexslider .slides li {margin-right: {$margin}px !important;}";
104
}
105
106
// we don't want this filter hanging around if there's more than one slideshow on the page
145
public function enqueue_scripts() {
146
parent::enqueue_scripts();
147
148
+ if ($this->get_setting('printJs') == 'true' && ($this->get_setting('effect') == 'slide' || $this->get_setting('carouselMode') == 'true')) {
149
wp_enqueue_script('metaslider-easing', METASLIDER_ASSETS_URL . 'easing/jQuery.easing.min.js', array('jquery'), METASLIDER_VERSION);
150
}
151
}
languages/metaslider-hr_HR.mo ADDED
Binary file
languages/metaslider-hr_HR.po ADDED
@@ -0,0 +1,603 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: metaslider\n"
4
+ "POT-Creation-Date: 2013-12-16 17:31-0000\n"
5
+ "PO-Revision-Date: 2014-03-03 20:37+0100\n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: \n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Generator: Poedit 1.6.4\n"
12
+ "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
15
+ "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
16
+ "Language: hr_HR\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
+ "X-Poedit-SearchPath-1: ..\n"
19
+
20
+ #: ../ml-slider.php:102
21
+ msgid "Go Pro"
22
+ msgstr "Postani Pro"
23
+
24
+ #: ../ml-slider.php:156
25
+ msgid "Image"
26
+ msgstr "Slika"
27
+
28
+ #: ../ml-slider.php:157
29
+ msgid "Add to slider"
30
+ msgstr "Dodaj u Slider"
31
+
32
+ #: ../ml-slider.php:177
33
+ msgid "Post Feed"
34
+ msgstr "Objave postova"
35
+
36
+ #: ../ml-slider.php:178
37
+ msgid "Vimeo"
38
+ msgstr "Vimeo"
39
+
40
+ #: ../ml-slider.php:179
41
+ msgid "YouTube"
42
+ msgstr "Youtube"
43
+
44
+ #: ../ml-slider.php:180
45
+ msgid "Layer Slide"
46
+ msgstr "Layer Slide"
47
+
48
+ #: ../ml-slider.php:235 ../inc/slide/metaslide.image.class.php:103
49
+ msgid "URL"
50
+ msgstr "URL"
51
+
52
+ #: ../ml-slider.php:236 ../inc/slide/metaslide.image.class.php:101
53
+ msgid "Caption"
54
+ msgstr "Natpis"
55
+
56
+ #: ../ml-slider.php:237 ../inc/slide/metaslide.image.class.php:102
57
+ msgid "New Window"
58
+ msgstr "Novi prozor"
59
+
60
+ #: ../ml-slider.php:238
61
+ msgid "Are you sure?"
62
+ msgstr "Jeste li sigurni?"
63
+
64
+ #: ../ml-slider.php:242
65
+ msgid ""
66
+ "Caution: This setting is for advanced developers only. If you're unsure, "
67
+ "leave it checked."
68
+ msgstr ""
69
+ "Oprez: Ova postavka je samo za napredne korisnike. Ako niste sigurni, "
70
+ "ostavite je označeno."
71
+
72
+ #: ../ml-slider.php:278
73
+ msgid "Upgrade to Pro $19"
74
+ msgstr "Nadogradite na Pro $19"
75
+
76
+ #: ../ml-slider.php:294
77
+ msgid "Documentation"
78
+ msgstr "Dokumentacija"
79
+
80
+ #: ../ml-slider.php:430
81
+ msgid "New Slider"
82
+ msgstr "Novi Slider"
83
+
84
+ #: ../ml-slider.php:692
85
+ msgid "New slideshow created. Click 'Add Slide' to get started!"
86
+ msgstr ""
87
+ "Napravili ste novi slideshow. Kliknite \"Dodaj Slide\" da biste počeli!"
88
+
89
+ #: ../ml-slider.php:709
90
+ msgid "or"
91
+ msgstr "ili"
92
+
93
+ #: ../ml-slider.php:710
94
+ msgid "Add New Slideshow"
95
+ msgstr "Dodaj novi Slideshow"
96
+
97
+ #: ../ml-slider.php:726
98
+ msgid "Create your first slideshow"
99
+ msgstr "Napravite Vaš prvi slideshow"
100
+
101
+ #: ../ml-slider.php:744
102
+ msgid "Settings"
103
+ msgstr "Postavke"
104
+
105
+ #: ../ml-slider.php:745
106
+ msgid "Save"
107
+ msgstr "Spremi"
108
+
109
+ #: ../ml-slider.php:746
110
+ msgid "Save & Preview"
111
+ msgstr "Spremi i pregledaj"
112
+
113
+ #: ../ml-slider.php:759
114
+ msgid "Flex Slider"
115
+ msgstr "Flex Slider"
116
+
117
+ #: ../ml-slider.php:760
118
+ msgid "Responsive"
119
+ msgstr "Responsive"
120
+
121
+ #: ../ml-slider.php:761
122
+ msgid "Nivo Slider"
123
+ msgstr "Nivo Slider"
124
+
125
+ #: ../ml-slider.php:762
126
+ msgid "Coin Slider"
127
+ msgstr "Coin Slider"
128
+
129
+ #: ../ml-slider.php:773 ../ml-slider.php:995
130
+ msgid "Width"
131
+ msgstr "Širina"
132
+
133
+ #: ../ml-slider.php:775
134
+ msgid "Slideshow width"
135
+ msgstr "Širina Slideshowa"
136
+
137
+ #: ../ml-slider.php:776 ../ml-slider.php:789
138
+ msgid "px"
139
+ msgstr "px"
140
+
141
+ #: ../ml-slider.php:786 ../ml-slider.php:1008
142
+ msgid "Height"
143
+ msgstr "Visina"
144
+
145
+ #: ../ml-slider.php:788
146
+ msgid "Slideshow height"
147
+ msgstr "Visina Slideshowa"
148
+
149
+ #: ../ml-slider.php:795
150
+ msgid "Effect"
151
+ msgstr "Efekt"
152
+
153
+ #: ../ml-slider.php:797
154
+ msgid "Slide transition effect"
155
+ msgstr "Efekt izmjene slide-a"
156
+
157
+ #: ../ml-slider.php:799 ../ml-slider.php:927
158
+ msgid "Random"
159
+ msgstr "Naizmjenično"
160
+
161
+ #: ../ml-slider.php:800
162
+ msgid "Swirl"
163
+ msgstr "Swirl"
164
+
165
+ #: ../ml-slider.php:801
166
+ msgid "Rain"
167
+ msgstr "Kiša"
168
+
169
+ #: ../ml-slider.php:802
170
+ msgid "Straight"
171
+ msgstr "Ravno"
172
+
173
+ #: ../ml-slider.php:803
174
+ msgid "Slide Down"
175
+ msgstr "Slide dolje"
176
+
177
+ #: ../ml-slider.php:804
178
+ msgid "Slice Up"
179
+ msgstr "Slice gore"
180
+
181
+ #: ../ml-slider.php:805
182
+ msgid "Slide Up Left"
183
+ msgstr "Slide lijevo"
184
+
185
+ #: ../ml-slider.php:806
186
+ msgid "Slice Up Down"
187
+ msgstr "Slice gore-dolje"
188
+
189
+ #: ../ml-slider.php:807
190
+ msgid "Slide Up Down Left"
191
+ msgstr "Slice gore-dolje-lijevo"
192
+
193
+ #: ../ml-slider.php:808
194
+ msgid "Fold"
195
+ msgstr "Savijeno"
196
+
197
+ #: ../ml-slider.php:809
198
+ msgid "Fade"
199
+ msgstr "Izbljeljujuće"
200
+
201
+ #: ../ml-slider.php:810
202
+ msgid "Slide In Right"
203
+ msgstr "Slide udesno"
204
+
205
+ #: ../ml-slider.php:811
206
+ msgid "Slide In Left"
207
+ msgstr "Slide ulijevo"
208
+
209
+ #: ../ml-slider.php:812
210
+ msgid "Box Random"
211
+ msgstr "Box nasumično"
212
+
213
+ #: ../ml-slider.php:813
214
+ msgid "Box Rain"
215
+ msgstr "Box kiša"
216
+
217
+ #: ../ml-slider.php:814
218
+ msgid "Box Rain Reverse"
219
+ msgstr "Box kiša obrnuto"
220
+
221
+ #: ../ml-slider.php:815
222
+ msgid "Box Rain Grow Reverse"
223
+ msgstr "Box Grow kiša obrnuto"
224
+
225
+ #: ../ml-slider.php:816
226
+ msgid "Slide"
227
+ msgstr "Slide"
228
+
229
+ #: ../ml-slider.php:823
230
+ msgid "Theme"
231
+ msgstr "Tema"
232
+
233
+ #: ../ml-slider.php:825
234
+ msgid "Slideshow theme"
235
+ msgstr "Slideshow tema"
236
+
237
+ #: ../ml-slider.php:827
238
+ msgid "Default"
239
+ msgstr "Zadano"
240
+
241
+ #: ../ml-slider.php:828
242
+ msgid "Dark (Nivo)"
243
+ msgstr "Tamno (Nivo)"
244
+
245
+ #: ../ml-slider.php:829
246
+ msgid "Light (Nivo)"
247
+ msgstr "Svijetlo (Nivo)"
248
+
249
+ #: ../ml-slider.php:830
250
+ msgid "Bar (Nivo)"
251
+ msgstr "Bar (Nivo)"
252
+
253
+ #: ../ml-slider.php:836
254
+ msgid "Arrows"
255
+ msgstr "Strijele"
256
+
257
+ #: ../ml-slider.php:839
258
+ msgid "Show the previous/next arrows"
259
+ msgstr "Pokaži Natrag/Nazad strijele"
260
+
261
+ #: ../ml-slider.php:844
262
+ msgid "Navigation"
263
+ msgstr "Navigacija"
264
+
265
+ #: ../ml-slider.php:847
266
+ msgid "Show the slide navigation bullets"
267
+ msgstr "Pokaži navigacijske bullete slide-a"
268
+
269
+ #: ../ml-slider.php:849
270
+ msgid "Hidden"
271
+ msgstr "Skriveno"
272
+
273
+ #: ../ml-slider.php:850
274
+ msgid "Dots"
275
+ msgstr "Točke"
276
+
277
+ #: ../ml-slider.php:851
278
+ msgid "Thumbnails (Pro)"
279
+ msgstr "Minijature (Pro)"
280
+
281
+ #: ../ml-slider.php:862
282
+ msgid "Title"
283
+ msgstr "Naslov"
284
+
285
+ #: ../ml-slider.php:863
286
+ msgid "Slideshow title"
287
+ msgstr "Naslova Slideshow-a"
288
+
289
+ #: ../ml-slider.php:877
290
+ msgid "Advanced Settings"
291
+ msgstr "Napredne postavke"
292
+
293
+ #: ../ml-slider.php:886
294
+ msgid "Stretch"
295
+ msgstr "Razvuci"
296
+
297
+ #: ../ml-slider.php:888
298
+ msgid "100% wide output"
299
+ msgstr "100% širok izgled"
300
+
301
+ #: ../ml-slider.php:890
302
+ msgid "Stretch the slideshow output to fill it's parent container"
303
+ msgstr "Razvuci slideshow izgled da se uklapa sa glavnim container-om."
304
+
305
+ #: ../ml-slider.php:895
306
+ msgid "Center align"
307
+ msgstr "Centriraj"
308
+
309
+ #: ../ml-slider.php:898
310
+ msgid "Center align the slideshow"
311
+ msgstr "Centriraj poredak slideshow-a"
312
+
313
+ #: ../ml-slider.php:903
314
+ msgid "Auto play"
315
+ msgstr "Auto play"
316
+
317
+ #: ../ml-slider.php:906
318
+ msgid "Transition between slides automatically"
319
+ msgstr "Automatsko mijenjanje slide-ova"
320
+
321
+ #: ../ml-slider.php:911
322
+ msgid "Smart crop"
323
+ msgstr "Smart crop"
324
+
325
+ #: ../ml-slider.php:914
326
+ msgid ""
327
+ "Smart Crop ensures your responsive slides are cropped to a ratio that "
328
+ "results in a consistent slideshow size"
329
+ msgstr ""
330
+ "Smart Crop omogućava vašim slide-ovima da su prilagođeni istoj veličini za "
331
+ "prikaz."
332
+
333
+ #: ../ml-slider.php:919
334
+ msgid "Carousel mode"
335
+ msgstr "Opcija Vrtuljak"
336
+
337
+ #: ../ml-slider.php:922
338
+ msgid "Display multiple slides at once. Slideshow output will be 100% wide."
339
+ msgstr ""
340
+ "Prikazuje više slide-ova odjednom. Slideshow izgled će biti 100% širok."
341
+
342
+ #: ../ml-slider.php:930
343
+ msgid "Randomise the order of the slides"
344
+ msgstr "Nasumičan poredak slide-ov"
345
+
346
+ #: ../ml-slider.php:935
347
+ msgid "Hover pause"
348
+ msgstr "Pauziraj prijelazom miša"
349
+
350
+ #: ../ml-slider.php:938
351
+ msgid ""
352
+ "Pause the slideshow when hovering over slider, then resume when no longer "
353
+ "hovering."
354
+ msgstr ""
355
+ "Pauzirajte slideshow kada prelazite mišem preko slider-a, zatim nastavlja "
356
+ "kada odmaknete miš."
357
+
358
+ #: ../ml-slider.php:943
359
+ msgid "Reverse"
360
+ msgstr "Obrnuti smjer"
361
+
362
+ #: ../ml-slider.php:946
363
+ msgid "Reverse the animation direction"
364
+ msgstr "Izmjenite smjer animacije."
365
+
366
+ #: ../ml-slider.php:956
367
+ msgid "Slide delay"
368
+ msgstr "Odgoda slide-a"
369
+
370
+ #: ../ml-slider.php:958
371
+ msgid "How long to display each slide, in milliseconds"
372
+ msgstr "Koliko dugo prikazivati slide, u milisekundama"
373
+
374
+ #: ../ml-slider.php:959 ../ml-slider.php:972 ../ml-slider.php:985
375
+ #: ../ml-slider.php:1061 ../ml-slider.php:1087
376
+ msgid "ms"
377
+ msgstr "ms"
378
+
379
+ #: ../ml-slider.php:969
380
+ msgid "Animation speed"
381
+ msgstr "Brzina animacije"
382
+
383
+ #: ../ml-slider.php:971
384
+ msgid "Set the speed of animations, in milliseconds"
385
+ msgstr "Podesite brzinu animacije, u milisekundama"
386
+
387
+ #: ../ml-slider.php:982 ../ml-slider.php:984
388
+ msgid "Number of slices"
389
+ msgstr "Broj slice-eva"
390
+
391
+ #: ../ml-slider.php:995 ../ml-slider.php:997 ../ml-slider.php:1008
392
+ #: ../ml-slider.php:1010
393
+ msgid "Number of squares"
394
+ msgstr "Broj kocki"
395
+
396
+ #: ../ml-slider.php:1016
397
+ msgid "Slide direction"
398
+ msgstr "Smjer slide-a"
399
+
400
+ #: ../ml-slider.php:1018
401
+ msgid "Select the sliding direction"
402
+ msgstr "Odaberite smjer slide-a"
403
+
404
+ #: ../ml-slider.php:1021
405
+ msgid "Horizontal"
406
+ msgstr "Horizontalno"
407
+
408
+ #: ../ml-slider.php:1022
409
+ msgid "Vertical"
410
+ msgstr "Vertikalno"
411
+
412
+ #: ../ml-slider.php:1028
413
+ msgid "Easing"
414
+ msgstr "Ublažavanje"
415
+
416
+ #: ../ml-slider.php:1030
417
+ msgid "Animation easing effect"
418
+ msgstr "Ublažavanje efekta animacije"
419
+
420
+ #: ../ml-slider.php:1037
421
+ msgid "Previous text"
422
+ msgstr "Prethodni tekst"
423
+
424
+ #: ../ml-slider.php:1039
425
+ msgid "Set the text for the 'previous' direction item"
426
+ msgstr "Postavite tekst za \"Prethodni\" smjer stavke"
427
+
428
+ #: ../ml-slider.php:1045
429
+ msgid "Next text"
430
+ msgstr "Sljedeći tekst"
431
+
432
+ #: ../ml-slider.php:1047
433
+ msgid "Set the text for the 'next' direction item"
434
+ msgstr "Postavite tekst za \"Sljedeći\" smjer stavke"
435
+
436
+ #: ../ml-slider.php:1058
437
+ msgid "Square delay"
438
+ msgstr "Odgoda kocke"
439
+
440
+ #: ../ml-slider.php:1060
441
+ msgid "Delay between squares in ms"
442
+ msgstr "Odgoda između kocki u ms"
443
+
444
+ #: ../ml-slider.php:1071
445
+ msgid "Opacity"
446
+ msgstr "Vidljivost"
447
+
448
+ #: ../ml-slider.php:1073
449
+ msgid "Opacity of title and navigation"
450
+ msgstr "Vidljivost naslova i navigacije"
451
+
452
+ #: ../ml-slider.php:1084
453
+ msgid "Caption speed"
454
+ msgstr "Brzina natpisa"
455
+
456
+ #: ../ml-slider.php:1086
457
+ msgid "Set the fade in speed of the caption"
458
+ msgstr "Postavite brzinu izbljeljivanja natpisa"
459
+
460
+ #: ../ml-slider.php:1093
461
+ msgid "Developer options"
462
+ msgstr "Developer opcije"
463
+
464
+ #: ../ml-slider.php:1098
465
+ msgid "CSS classes"
466
+ msgstr "CSS classes"
467
+
468
+ #: ../ml-slider.php:1100
469
+ msgid ""
470
+ "Specify any custom CSS Classes you would like to be added to the slider "
471
+ "wrapper"
472
+ msgstr ""
473
+ "Odredite bilokoji prilagođen CSS Class koji želite dodati u slider wrapper"
474
+
475
+ #: ../ml-slider.php:1106
476
+ msgid "Print CSS"
477
+ msgstr "Print CSS"
478
+
479
+ #: ../ml-slider.php:1109
480
+ msgid "Uncheck this is you would like to include your own CSS"
481
+ msgstr "Odznačite ovo ako biste željeli koristiti vlastiti CSS"
482
+
483
+ #: ../ml-slider.php:1114
484
+ msgid "Print JS"
485
+ msgstr "Print JS"
486
+
487
+ #: ../ml-slider.php:1117
488
+ msgid "Uncheck this is you would like to include your own Javascript"
489
+ msgstr "Odznačite ovo ako biste željeli koristiti vlastiti Javascript"
490
+
491
+ #: ../ml-slider.php:1122
492
+ msgid "No conflict mode"
493
+ msgstr "No conflict mode"
494
+
495
+ #: ../ml-slider.php:1125
496
+ msgid "Delay adding the flexslider class to the slideshow"
497
+ msgstr "Odgodite dodavanja flexslider class-a u slideshow"
498
+
499
+ #: ../ml-slider.php:1139
500
+ msgid "Usage"
501
+ msgstr "Korištenje"
502
+
503
+ #: ../ml-slider.php:1142
504
+ msgid "Shortcode"
505
+ msgstr "Shortcode"
506
+
507
+ #: ../ml-slider.php:1143
508
+ msgid "Template Include"
509
+ msgstr "Template Include"
510
+
511
+ #: ../ml-slider.php:1147
512
+ msgid "Copy & paste the shortcode directly into any WordPress post or page."
513
+ msgstr ""
514
+ "Kopirajte & zalijepite shortcode direktno na bilokoju Wordpress stranicu ili "
515
+ "post."
516
+
517
+ #: ../ml-slider.php:1150
518
+ msgid ""
519
+ "Copy & paste this code into a template file to include the slideshow within "
520
+ "your theme."
521
+ msgstr ""
522
+ "Kopirajtw & zalijepite ovaj kod bilogdje u template file da biste koristili "
523
+ "slideshow unutar vaše teme."
524
+
525
+ #: ../ml-slider.php:1179
526
+ msgid "Delete Slider"
527
+ msgstr "Obriši slider"
528
+
529
+ #: ../ml-slider.php:1190
530
+ msgid "Slides"
531
+ msgstr "Slide-ovi"
532
+
533
+ #: ../ml-slider.php:1193 ../ml-slider.php:1194
534
+ msgid "Add Slide"
535
+ msgstr "Dodaj Slide"
536
+
537
+ #: ../ml-slider.php:1224
538
+ msgid "Select slideshow to insert into post"
539
+ msgstr "Odaberi slideshow za umetanje u post"
540
+
541
+ #: ../ml-slider.php:1227
542
+ msgid "Add slider"
543
+ msgstr "Dodaj slider"
544
+
545
+ #: ../ml-slider.php:1258
546
+ msgid "Insert Meta Slider"
547
+ msgstr "Unesi Meta Slider"
548
+
549
+ #: ../ml-slider.php:1260
550
+ msgid "Choose slideshow"
551
+ msgstr "Odaberi slideshow"
552
+
553
+ #: ../ml-slider.php:1267 ../inc/metaslider.widget.class.php:124
554
+ msgid "No slideshows found"
555
+ msgstr "Slideshowi nisu pronađeni"
556
+
557
+ #: ../inc/metaslider.widget.class.php:18
558
+ msgid "Meta Slider"
559
+ msgstr "Meta Slider"
560
+
561
+ #: ../inc/metaslider.widget.class.php:111
562
+ msgid "Title:"
563
+ msgstr "Naslov:"
564
+
565
+ #: ../inc/metaslider.widget.class.php:114
566
+ msgid "Select Slider:"
567
+ msgstr "Odaberi Slider:"
568
+
569
+ #: ../inc/slide/metaslide.image.class.php:23
570
+ msgid "Security check failed. Refresh page and try again."
571
+ msgstr "Provjera sigurnosti neuspjela. Osvježite stranicu i probajte ponovo."
572
+
573
+ #: ../inc/slide/metaslide.image.class.php:36
574
+ msgid "Failed to add slide. Slide already exists in slideshow."
575
+ msgstr "Neuspjelo dodavanje slide-a. Slide je već u slideshow-u."
576
+
577
+ #: ../inc/slide/metaslide.image.class.php:38
578
+ msgid "Failed to add slide. Slide is not of type 'image'."
579
+ msgstr "Neuspjelo dodavanje slide-a. Slide nije \"image\"."
580
+
581
+ #: ../inc/slide/metaslide.image.class.php:110
582
+ msgid "Image Slide"
583
+ msgstr "Slide Slika"
584
+
585
+ #: ../inc/slide/metaslide.image.class.php:115
586
+ msgid "General"
587
+ msgstr "Generalno"
588
+
589
+ #: ../inc/slide/metaslide.image.class.php:116
590
+ msgid "SEO"
591
+ msgstr "SEO"
592
+
593
+ #: ../inc/slide/metaslide.image.class.php:121
594
+ msgid "Warning: Image data does not exist. Please re-upload the image."
595
+ msgstr "Upozorenje: Slika ne postoji. Molimo Vas ponovo upload-ajte sliku."
596
+
597
+ #: ../inc/slide/metaslide.image.class.php:130
598
+ msgid "Image Title Text"
599
+ msgstr "Naslov slike"
600
+
601
+ #: ../inc/slide/metaslide.image.class.php:132
602
+ msgid "Image Alt Text"
603
+ msgstr "Alt Tekst Slike"
ml-slider.php CHANGED
@@ -3,7 +3,7 @@
3
* Plugin Name: Meta Slider
4
* Plugin URI: http://www.metaslider.com
5
* Description: Easy to use slideshow plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides.
6
- * Version: 2.6.3
7
* Author: Matcha Labs
8
* Author URI: http://www.matchalabs.com
9
* License: GPLv2 or later
@@ -17,7 +17,7 @@
17
// disable direct access
18
if (!defined('ABSPATH')) exit;
19
20
- define('METASLIDER_VERSION', '2.6.3');
21
define('METASLIDER_BASE_URL', plugins_url('ml-slider') . '/'); //plugin_dir_url(__FILE__)
22
define('METASLIDER_ASSETS_URL', METASLIDER_BASE_URL . 'assets/');
23
define('METASLIDER_BASE_DIR_LONG', dirname(__FILE__));
@@ -53,6 +53,13 @@ class MetaSliderPlugin {
53
/** Current Slider **/
54
var $slider = null;
55
56
/**
57
* Constructor
58
*/
@@ -77,7 +84,7 @@ class MetaSliderPlugin {
77
add_action('media_upload_layer', array($this, 'metaslider_pro_tab'));
78
79
add_filter('media_buttons_context', array($this, 'insert_metaslider_button'));
80
- add_action('admin_footer', array($this, 'admin_footer'));
81
82
// add 'go pro' link to plugin options
83
$plugin = plugin_basename(__FILE__);
@@ -206,16 +213,6 @@ class MetaSliderPlugin {
206
* Register admin JavaScript
207
*/
208
public function register_admin_scripts() {
209
- if (wp_script_is('wp-auth-check', 'queue')) {
210
- // meta slider checks for active AJAX requests in order to show the spinner
211
- // .. but the auth-check runs an AJAX request every 15 seconds
212
- // deregister the script that displays the login panel if the user becomes logged
213
- // out at some point
214
- // todo: implement some more intelligent request checking
215
- wp_deregister_script('wp-auth-check');
216
- wp_register_script('wp-auth-check', null); // fix php notice
217
- }
218
-
219
// media library dependencies
220
wp_enqueue_media();
221
@@ -227,6 +224,8 @@ class MetaSliderPlugin {
227
wp_enqueue_script('metaslider-admin-script', METASLIDER_ASSETS_URL . 'metaslider/admin.js', array('jquery', 'metaslider-tipsy', 'media-upload'), METASLIDER_VERSION);
228
wp_enqueue_script('metaslider-admin-addslide', METASLIDER_ASSETS_URL . 'metaslider/image/image.js', array('metaslider-admin-script'), METASLIDER_VERSION);
229
230
// localise the JS
231
wp_localize_script( 'metaslider-admin-addslide', 'metaslider_image', array(
232
'addslide_nonce' => wp_create_nonce('metaslider_addslide')
@@ -334,8 +333,10 @@ class MetaSliderPlugin {
334
// we have an ID to work with
335
$slider = get_post($atts['id']);
336
337
- // check the slider is published
338
- if ($slider->post_status != 'publish') return false;
339
340
// lets go
341
$this->set_slider($atts['id'], $atts);
@@ -350,10 +351,17 @@ class MetaSliderPlugin {
350
public function set_slider($id, $shortcode_settings = array()) {
351
$type = 'flex';
352
353
- $settings = array_merge(get_post_meta($id, 'ml-slider_settings', true), $shortcode_settings);
354
355
- if (isset($settings['type']) && in_array($settings['type'], array('flex', 'coin', 'nivo', 'responsive'))) {
356
- $type = $settings['type'];
357
}
358
359
$this->slider = $this->create_slider($type, $id, $shortcode_settings);
@@ -394,11 +402,6 @@ class MetaSliderPlugin {
394
$slider_id = $this->delete_slider(intval($_GET['delete']));
395
}
396
397
- // create a new slider
398
- if (isset($_GET['add'])) {
399
- $slider_id = $this->add_slider();
400
- }
401
-
402
// load a slider by ID
403
if (isset($_REQUEST['id'])) {
404
$temp_id = intval($_REQUEST['id']);
@@ -409,6 +412,11 @@ class MetaSliderPlugin {
409
}
410
}
411
412
if ($slider_id > 0) {
413
$this->set_slider($slider_id);
414
}
@@ -428,12 +436,6 @@ class MetaSliderPlugin {
428
$defaults = get_post_meta($last_modified, 'ml-slider_settings', true);
429
}
430
431
- // use the default settings if we can't find anything more suitable.
432
- if (empty($defaults)) {
433
- $slider = new MetaSlider($id, array());
434
- $defaults = $slider->get_default_parameters();
435
- }
436
-
437
// insert the post
438
$id = wp_insert_post(array(
439
'post_title' => __("New Slider", "metaslider"),
@@ -441,6 +443,12 @@ class MetaSliderPlugin {
441
'post_type' => 'ml-slider'
442
));
443
444
// insert the post meta
445
add_post_meta($id, 'ml-slider_settings', $defaults, true);
446
@@ -816,7 +824,7 @@ class MetaSliderPlugin {
816
'value' => $this->slider->get_setting('type'),
817
'options' => array(
818
'flex' => array('label' => __("Flex Slider", "metaslider")),
819
- 'responsive' => array('label' => __("Responsive", "metaslider")),
820
'nivo' => array('label' => __("Nivo Slider", "metaslider")),
821
'coin' => array('label' => __("Coin Slider", "metaslider"))
822
)
@@ -976,10 +984,22 @@ class MetaSliderPlugin {
976
'priority' => 40,
977
'type' => 'checkbox',
978
'label' => __("Carousel mode", "metaslider"),
979
- 'class' => 'option flex',
980
'checked' => $this->slider->get_setting('carouselMode') == 'true' ? 'checked' : '',
981
'helptext' => __("Display multiple slides at once. Slideshow output will be 100% wide.", "metaslider")
982
),
983
'random' => array(
984
'priority' => 50,
985
'type' => 'checkbox',
@@ -1279,7 +1299,7 @@ class MetaSliderPlugin {
1279
jQuery(document).ready(function() {
1280
jQuery('#insertMetaSlider').on('click', function() {
1281
var id = jQuery('#metaslider-select option:selected').val();
1282
- window.send_to_editor('[metaslider id="' + id + '"]');
1283
tb_remove();
1284
})
1285
});
@@ -1308,6 +1328,6 @@ class MetaSliderPlugin {
1308
}
1309
}
1310
1311
- $metaslider = new MetaSliderPlugin();
1312
1313
?>
3
* Plugin Name: Meta Slider
4
* Plugin URI: http://www.metaslider.com
5
* Description: Easy to use slideshow plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides.
6
+ * Version: 2.7.2
7
* Author: Matcha Labs
8
* Author URI: http://www.matchalabs.com
9
* License: GPLv2 or later
17
// disable direct access
18
if (!defined('ABSPATH')) exit;
19
20
+ define('METASLIDER_VERSION', '2.7.2');
21
define('METASLIDER_BASE_URL', plugins_url('ml-slider') . '/'); //plugin_dir_url(__FILE__)
22
define('METASLIDER_ASSETS_URL', METASLIDER_BASE_URL . 'assets/');
23
define('METASLIDER_BASE_DIR_LONG', dirname(__FILE__));
53
/** Current Slider **/
54
var $slider = null;
55
56
+ /**
57
+ * Init
58
+ */
59
+ public static function init() {
60
+ $metaslider = new MetaSliderPlugin;
61
+ }
62
+
63
/**
64
* Constructor
65
*/
84
add_action('media_upload_layer', array($this, 'metaslider_pro_tab'));
85
86
add_filter('media_buttons_context', array($this, 'insert_metaslider_button'));
87
+ add_action('admin_footer', array($this, 'admin_footer'), 11);
88
89
// add 'go pro' link to plugin options
90
$plugin = plugin_basename(__FILE__);
213
* Register admin JavaScript
214
*/
215
public function register_admin_scripts() {
216
// media library dependencies
217
wp_enqueue_media();
218
224
wp_enqueue_script('metaslider-admin-script', METASLIDER_ASSETS_URL . 'metaslider/admin.js', array('jquery', 'metaslider-tipsy', 'media-upload'), METASLIDER_VERSION);
225
wp_enqueue_script('metaslider-admin-addslide', METASLIDER_ASSETS_URL . 'metaslider/image/image.js', array('metaslider-admin-script'), METASLIDER_VERSION);
226
227
+ wp_dequeue_script('link'); // WP Posts Filter Fix (Advanced Settings not toggling)
228
+
229
// localise the JS
230
wp_localize_script( 'metaslider-admin-addslide', 'metaslider_image', array(
231
'addslide_nonce' => wp_create_nonce('metaslider_addslide')
333
// we have an ID to work with
334
$slider = get_post($atts['id']);
335
336
+ // check the slider is published and the ID is correct
337
+ if (!$slider || $slider->post_status != 'publish' || $slider->post_type != 'ml-slider') {
338
+ return "<!-- meta slider {$atts['id']} not found -->";
339
+ }
340
341
// lets go
342
$this->set_slider($atts['id'], $atts);
351
public function set_slider($id, $shortcode_settings = array()) {
352
$type = 'flex';
353
354
+ if (isset($shortcode_settings['type'])) {
355
+ $type = $shortcode_settings['type'];
356
+ }
357
+ else if ($settings = get_post_meta($id, 'ml-slider_settings', true)) {
358
+ if (is_array($settings) && isset($settings['type'])) {
359
+ $type = $settings['type'];
360
+ }
361
+ }
362
363
+ if (!in_array($type, array('flex', 'coin', 'nivo', 'responsive'))) {
364
+ $type = 'flex';
365
}
366
367
$this->slider = $this->create_slider($type, $id, $shortcode_settings);
402
$slider_id = $this->delete_slider(intval($_GET['delete']));
403
}
404
405
// load a slider by ID
406
if (isset($_REQUEST['id'])) {
407
$temp_id = intval($_REQUEST['id']);
412
}
413
}
414
415
+ // create a new slider
416
+ if (isset($_GET['add'])) {
417
+ $slider_id = $this->add_slider();
418
+ }
419
+
420
if ($slider_id > 0) {
421
$this->set_slider($slider_id);
422
}
436
$defaults = get_post_meta($last_modified, 'ml-slider_settings', true);
437
}
438
439
// insert the post
440
$id = wp_insert_post(array(
441
'post_title' => __("New Slider", "metaslider"),
443
'post_type' => 'ml-slider'
444
));
445
446
+ // use the default settings if we can't find anything more suitable.
447
+ if (empty($defaults)) {
448
+ $slider = new MetaSlider($id, array());
449
+ $defaults = $slider->get_default_parameters();
450
+ }
451
+
452
// insert the post meta
453
add_post_meta($id, 'ml-slider_settings', $defaults, true);
454
824
'value' => $this->slider->get_setting('type'),
825
'options' => array(
826
'flex' => array('label' => __("Flex Slider", "metaslider")),
827
+ 'responsive' => array('label' => __("R. Slides", "metaslider")),
828
'nivo' => array('label' => __("Nivo Slider", "metaslider")),
829
'coin' => array('label' => __("Coin Slider", "metaslider"))
830
)
984
'priority' => 40,
985
'type' => 'checkbox',
986
'label' => __("Carousel mode", "metaslider"),
987
+ 'class' => 'option flex showNextWhenChecked',
988
'checked' => $this->slider->get_setting('carouselMode') == 'true' ? 'checked' : '',
989
'helptext' => __("Display multiple slides at once. Slideshow output will be 100% wide.", "metaslider")
990
),
991
+ 'carouselMargin' => array(
992
+ 'priority' => 45,
993
+ 'min' => 0,
994
+ 'max' => 9999,
995
+ 'step' => 1,
996
+ 'type' => 'number',
997
+ 'label' => __("Carousel margin", "metaslider"),
998
+ 'class' => 'option flex',
999
+ 'value' => $this->slider->get_setting('carouselMargin'),
1000
+ 'helptext' => __("Pixel margin between slides in carousel.", "metaslider"),
1001
+ 'after' => __("px", "metaslider")
1002
+ ),
1003
'random' => array(
1004
'priority' => 50,
1005
'type' => 'checkbox',
1299
jQuery(document).ready(function() {
1300
jQuery('#insertMetaSlider').on('click', function() {
1301
var id = jQuery('#metaslider-select option:selected').val();
1302
+ window.send_to_editor('[metaslider id=' + id + ']');
1303
tb_remove();
1304
})
1305
});
1328
}
1329
}
1330
1331
+ add_action('plugins_loaded', array('MetaSliderPlugin', 'init'));
1332
1333
?>
preview.php CHANGED
@@ -5,15 +5,18 @@ define('WP_USE_THEMES', false);
5
require('../../../wp-blog-header.php');
6
7
if (isset($_GET['slider_id']) && (int)$_GET['slider_id'] > 0) {
8
- add_filter( 'show_admin_bar', '__return_false' );
9
remove_action('init', 'wp_admin_bar_init');
10
11
$id = intval($_GET['slider_id']);
12
- echo "<html style='margin-top: 0 !important'><head>";
13
- echo "</head><body style='overflow: hidden; margin: 0; padding: 0;'>";
14
echo do_shortcode("[metaslider id={$id}]");
15
wp_footer();
16
- echo "</body></html>";
17
}
18
19
die();
5
require('../../../wp-blog-header.php');
6
7
if (isset($_GET['slider_id']) && (int)$_GET['slider_id'] > 0) {
8
+ add_filter('show_admin_bar', '__return_false');
9
remove_action('init', 'wp_admin_bar_init');
10
11
$id = intval($_GET['slider_id']);
12
+
13
+ echo "<!DOCTYPE html>";
14
+ echo "<html style='margin-top: 0 !important'><head></head>";
15
+ echo "<body style='overflow: hidden; margin: 0; padding: 0;'>";
16
echo do_shortcode("[metaslider id={$id}]");
17
wp_footer();
18
+ echo "</body>";
19
+ echo "</html>";
20
}
21
22
die();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: wordpress slideshow,seo,slideshow,slider,widget,wordpress slider,image sli
4
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CQ84KC4X8YKW8
5
Requires at least: 3.5
6
Tested up to: 3.8
7
- Stable tag: 2.6.2
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -60,6 +60,7 @@ Upgrade to [Meta Slider Pro](http://www.metaslider.com/upgrade) to add support f
60
* Chinese (thanks to 断青丝)
61
* Taiwanese (thanks to 断青丝)
62
* Norwegian (thanks to Dreamsoft)
63
64
Read more and thanks to:
65
@@ -136,6 +137,34 @@ See www.metaslider.com/documentation/image-cropping/
136
137
== Changelog ==
138
139
= 2.6.3 [23/01/14] =
140
141
* Improvement: Various admin screen styling improvements
4
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CQ84KC4X8YKW8
5
Requires at least: 3.5
6
Tested up to: 3.8
7
+ Stable tag: 2.7.1
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
60
* Chinese (thanks to 断青丝)
61
* Taiwanese (thanks to 断青丝)
62
* Norwegian (thanks to Dreamsoft)
63
+ * Croatian
64
65
Read more and thanks to:
66
137
138
== Changelog ==
139
140
+ = 2.7.2 [25/03/14] =
141
+
142
+ * Fix: Only apply carousel margin to slides
143
+ * Fix: Enqueue Easing library when carousel mode is enabled, regardless of effect selection
144
+ * Fix: Thumbnail margin when theme has #content div
145
+
146
+ = 2.7.1 [19/03/14] =
147
+
148
+ * Fix: Remove easing parameter when effect is set to fade
149
+ * Fix: Navigation options greyed out in IE
150
+ * Fix: qTranslate captions not being processed (typo)
151
+
152
+ = 2.7 [18/03/14] =
153
+
154
+ * New feature: Crotatian Lang pack added
155
+ * New feature: Carousel margin option added
156
+ * New feature: Process shortcodes in captions
157
+ * Improvement: Tab rename UX
158
+ * Improvement: Admin save spinner functionality improved
159
+ * Improvement: CSS Resets updated
160
+ * Improvement: Use plugins_loaded action to initialise plugin
161
+ * Fix: PHP Warnings when one slideshow exists
162
+ * Fix: Smart Cropping sometimes not returning smart cropped image
163
+ * Fix: Add z-index to meta slider, attempted conflict fix for themes with drop down menus.
164
+ * Fix: Only include the easing library when transition effect is set to slide
165
+ * Fix: White Label Branding plugin compatibility.
166
+ * Change: "Responsive" option renamed to "R. Slides". The (old) "Responsive" option refers to the "Responsive Slides" jQuery library, but users were getting confused as the naming suggested it was the only responsive option. Flex Slider & Nivo Slider are also responsive.
167
+
168
= 2.6.3 [23/01/14] =
169
170
* Improvement: Various admin screen styling improvements