MetaSlider - Version 3.0.1

Version Description

[19/08/14] =

  • Fix: Escape admin setting text fields
  • Fix: Escape admin tab names (thanks to Dylan Irzi for spotting and reporting this!)
  • Change: Allow shortcode parameters to be filtered
Download this release

Release Info

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

Code changes from version 2.9.1 to 3.0.1

assets/metaslider/admin.js CHANGED
@@ -100,6 +100,11 @@ jQuery(document).ready(function($) {
100
  toggleNextRow(jQuery(this));
101
  });
102
 
 
 
 
 
 
103
  // handle slide libary switching
104
  jQuery(".metaslider .select-slider").on("click", function() {
105
  switchType(jQuery(this).attr("rel"));
@@ -140,8 +145,10 @@ jQuery(document).ready(function($) {
140
 
141
  var thumb_width = $this.attr("data-width");
142
  var thumb_height = $this.attr("data-height");
 
 
143
 
144
- if ((thumb_width != slideshow_width || thumb_height != slideshow_height)) {
145
  $this.attr("data-width", slideshow_width);
146
  $this.attr("data-height", slideshow_height);
147
 
@@ -155,9 +162,14 @@ jQuery(document).ready(function($) {
155
  jQuery.ajax({
156
  type: "POST",
157
  data : data,
 
158
  cache: false,
159
  url: metaslider.ajaxurl,
160
  success: function(data) {
 
 
 
 
161
  if (console && console.log) {
162
  console.log(data);
163
  }
@@ -270,30 +282,32 @@ jQuery(document).ready(function($) {
270
  success: function(data) {
271
  var response = jQuery(data);
272
 
273
- jQuery(".metaslider .left table").trigger("resizeSlides");
274
-
275
- jQuery("button[data-thumb]", response).each(function() {
276
- var $this = jQuery(this);
277
- var editor_id = $this.attr("data-editor_id");
278
- jQuery("button[data-editor_id=" + editor_id + "]")
279
- .attr("data-thumb", $this.attr("data-thumb"))
280
- .attr("data-width", $this.attr("data-width"))
281
- .attr("data-height", $this.attr("data-height"));
282
- });
283
 
284
- fixIE10PlaceholderText();
285
-
286
- if (button.id === "ms-preview") {
287
- jQuery.colorbox({
288
- iframe: true,
289
- href: metaslider.iframeurl + "&slider_id=" + jQuery(button).data("slider_id"),
290
- transition: "elastic",
291
- innerHeight: getLightboxHeight(),
292
- innerWidth: getLightboxWidth(),
293
- scrolling: false,
294
- fastIframe: false
295
  });
296
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
  }
298
  });
299
  });
100
  toggleNextRow(jQuery(this));
101
  });
102
 
103
+ // mark the slide for resizing when the crop position has changed
104
+ jQuery(".metaslider").on('change', '.left tr.slide .crop_position', function() {
105
+ jQuery(this).closest('tr').data('crop_changed', true);
106
+ });
107
+
108
  // handle slide libary switching
109
  jQuery(".metaslider .select-slider").on("click", function() {
110
  switchType(jQuery(this).attr("rel"));
145
 
146
  var thumb_width = $this.attr("data-width");
147
  var thumb_height = $this.attr("data-height");
148
+ var slide_row = jQuery(this).closest('tr');
149
+ var crop_changed = slide_row.data('crop_changed');
150
 
151
+ if (thumb_width != slideshow_width || thumb_height != slideshow_height || crop_changed === true ) {
152
  $this.attr("data-width", slideshow_width);
153
  $this.attr("data-height", slideshow_height);
154
 
162
  jQuery.ajax({
163
  type: "POST",
164
  data : data,
165
+ async: false,
166
  cache: false,
167
  url: metaslider.ajaxurl,
168
  success: function(data) {
169
+ if (crop_changed === true) {
170
+ slide_row.data('crop_changed', false);
171
+ }
172
+
173
  if (console && console.log) {
174
  console.log(data);
175
  }
282
  success: function(data) {
283
  var response = jQuery(data);
284
 
285
+ jQuery.when(jQuery(".metaslider .left table").trigger("resizeSlides")).done(function() {
 
 
 
 
 
 
 
 
 
286
 
287
+ jQuery("button[data-thumb]", response).each(function() {
288
+ var $this = jQuery(this);
289
+ var editor_id = $this.attr("data-editor_id");
290
+ jQuery("button[data-editor_id=" + editor_id + "]")
291
+ .attr("data-thumb", $this.attr("data-thumb"))
292
+ .attr("data-width", $this.attr("data-width"))
293
+ .attr("data-height", $this.attr("data-height"));
 
 
 
 
294
  });
295
+
296
+ fixIE10PlaceholderText();
297
+
298
+ if (button.id === "ms-preview") {
299
+ jQuery.colorbox({
300
+ iframe: true,
301
+ href: metaslider.iframeurl + "&slider_id=" + jQuery(button).data("slider_id"),
302
+ transition: "elastic",
303
+ innerHeight: getLightboxHeight(),
304
+ innerWidth: getLightboxWidth(),
305
+ scrolling: false,
306
+ fastIframe: false
307
+ });
308
+ }
309
+
310
+ });
311
  }
312
  });
313
  });
inc/metaslider.imagehelper.class.php CHANGED
@@ -4,7 +4,7 @@
4
  */
5
  class MetaSliderImageHelper {
6
 
7
- private $smart_crop = 'false';
8
  private $container_width; // slideshow width
9
  private $container_height; // slideshow height
10
  private $id; // slide/attachment ID
@@ -20,7 +20,8 @@ class MetaSliderImageHelper {
20
  * @param integer $height - required height of image
21
  * @param string $smart_crop
22
  */
23
- public function __construct( $slide_id, $width, $height, $smart_crop, $use_image_editor = true ) {
 
24
  $upload_dir = wp_upload_dir();
25
 
26
  $this->id = $slide_id;
@@ -28,10 +29,36 @@ class MetaSliderImageHelper {
28
  $this->path = get_attached_file( $slide_id );
29
  $this->container_width = $width;
30
  $this->container_height = $height;
31
- $this->smart_crop = $smart_crop;
32
  $this->use_image_editor = $use_image_editor;
 
33
  }
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  /**
36
  * Return the crop dimensions.
37
  *
@@ -44,8 +71,12 @@ class MetaSliderImageHelper {
44
  * @return array image dimensions
45
  */
46
  private function get_crop_dimensions( $image_width, $image_height ) {
47
- if ( $this->smart_crop == 'false' ) {
48
- return array( 'width' => (int)$this->container_width, 'height' => (int)$this->container_height );
 
 
 
 
49
  }
50
 
51
  $container_width = $this->container_width;
@@ -154,15 +185,15 @@ class MetaSliderImageHelper {
154
  }
155
 
156
 
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
 
@@ -185,14 +216,14 @@ class MetaSliderImageHelper {
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;
@@ -203,6 +234,7 @@ class MetaSliderImageHelper {
203
  return $dest_url;
204
  }
205
 
 
206
  /**
207
  * Get the image dimensions for the original image.
208
  *
@@ -224,7 +256,7 @@ class MetaSliderImageHelper {
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;
230
  }
@@ -233,11 +265,12 @@ class MetaSliderImageHelper {
233
  return false;
234
  }
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 );
@@ -262,7 +295,10 @@ class MetaSliderImageHelper {
262
 
263
  // editor will return an error if the path is invalid
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>";
@@ -271,7 +307,9 @@ class MetaSliderImageHelper {
271
  return $this->url;
272
  }
273
 
274
- $dims = image_resize_dimensions( $orig_size['width'], $orig_size['height'], $dest_size['width'], $dest_size['height'], true );
 
 
275
 
276
  if ( $dims ) {
277
  list( $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h ) = $dims;
@@ -287,7 +325,7 @@ class MetaSliderImageHelper {
287
  // Record the new size so that the file is correctly removed when the media file is deleted.
288
  $backup_sizes = get_post_meta( $this->id, '_wp_attachment_backup_sizes', true );
289
 
290
- if ( !is_array( $backup_sizes ) ) {
291
  $backup_sizes = array();
292
  }
293
 
@@ -298,6 +336,28 @@ class MetaSliderImageHelper {
298
 
299
  return $url;
300
  }
301
- }
302
 
303
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  */
5
  class MetaSliderImageHelper {
6
 
7
+ private $crop_type = 'smart';
8
  private $container_width; // slideshow width
9
  private $container_height; // slideshow height
10
  private $id; // slide/attachment ID
20
  * @param integer $height - required height of image
21
  * @param string $smart_crop
22
  */
23
+ public function __construct( $slide_id, $width, $height, $crop_type, $use_image_editor = true ) {
24
+
25
  $upload_dir = wp_upload_dir();
26
 
27
  $this->id = $slide_id;
29
  $this->path = get_attached_file( $slide_id );
30
  $this->container_width = $width;
31
  $this->container_height = $height;
 
32
  $this->use_image_editor = $use_image_editor;
33
+ $this->set_crop_type($crop_type);
34
  }
35
 
36
+
37
+ /**
38
+ * Add in backwards compatibility for old versions of MS Pro
39
+ * 'true' = smart, 'false' = standard, 'disabled' = disabled
40
+ *
41
+ * @param string $crop_type
42
+ */
43
+ private function set_crop_type( $crop_type ) {
44
+
45
+ switch ( $crop_type ) {
46
+ case "false":
47
+ case "standard":
48
+ $this->crop_type = 'standard'; // smart crop enabled
49
+ break;
50
+ case "disabled":
51
+ $this->crop_type = 'disabled'; // cropping disabled
52
+ break;
53
+ case "true":
54
+ case "smart":
55
+ default:
56
+ $this->crop_type = 'smart';
57
+ }
58
+
59
+ }
60
+
61
+
62
  /**
63
  * Return the crop dimensions.
64
  *
71
  * @return array image dimensions
72
  */
73
  private function get_crop_dimensions( $image_width, $image_height ) {
74
+ if ( $this->crop_type == 'standard' ) {
75
+ return array( 'width' => absint( $this->container_width ), 'height' => absint( $this->container_height ) );
76
+ }
77
+
78
+ if ( $this->crop_type == 'disabled' ) {
79
+ return array( 'width' => absint( $image_width ), 'height' => absint( $image_height ) );
80
  }
81
 
82
  $container_width = $this->container_width;
185
  }
186
 
187
 
 
188
  /**
189
  * Return the image URL, crop the image to the correct dimensions if required
190
  *
191
+ * @param bool $force_resize
192
  * @return string resized image URL
193
  */
194
+ function get_image_url( $force_resize = false ) {
195
  // Get the image file path
196
+ if ( ! strlen( $this->path ) ) {
197
  return apply_filters( 'metaslider_resized_image_url', $this->url, $this->url );
198
  }
199
 
216
  // construct the file name
217
  $dest_file_name = $this->get_destination_file_name( $dest_size );
218
 
219
+ if ( file_exists( $dest_file_name ) && ! $force_resize ) {
220
  // good. no need for resize, just return the URL
221
  $dest_url = str_replace( basename( $this->url ), basename( $dest_file_name ), $this->url );
222
  }
223
  else if ( $this->use_image_editor ) {
224
+ // resize, assuming we're allowed to use the image editor
225
+ $dest_url = $this->resize_image( $orig_size, $dest_size, $dest_file_name );
226
+ }
227
  else {
228
  // fall back to the full URL
229
  $dest_url = $this->url;
234
  return $dest_url;
235
  }
236
 
237
+
238
  /**
239
  * Get the image dimensions for the original image.
240
  *
256
  // get the size from the image itself
257
  $image = wp_get_image_editor( $this->path );
258
 
259
+ if ( ! is_wp_error( $image ) ) {
260
  $size = $image->get_size();
261
  return $size;
262
  }
265
  return false;
266
  }
267
 
268
+
269
  /**
270
  * Return the file name for the required image size
271
  *
272
+ * @param array $dest_size image dimensions (width/height) in pixels
273
+ * @return string path and file name
274
  */
275
  private function get_destination_file_name( $dest_size ) {
276
  $info = pathinfo( $this->path );
295
 
296
  // editor will return an error if the path is invalid
297
  if ( is_wp_error( $image ) ) {
298
+
299
+ $capability = apply_filters( 'metaslider_capability', 'edit_others_posts' );
300
+
301
+ if ( is_admin() && current_user_can( $capability ) ) {
302
  echo '<div id="message" class="error">';
303
  echo "<p><strong>ERROR</strong> Slide ID: {$this->id} - <i>" . $image->get_error_message() . "</i></p>";
304
  echo "</div>";
307
  return $this->url;
308
  }
309
 
310
+ $crop_position = $this->get_crop_position();
311
+
312
+ $dims = image_resize_dimensions( $orig_size['width'], $orig_size['height'], $dest_size['width'], $dest_size['height'], $crop_position );
313
 
314
  if ( $dims ) {
315
  list( $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h ) = $dims;
325
  // Record the new size so that the file is correctly removed when the media file is deleted.
326
  $backup_sizes = get_post_meta( $this->id, '_wp_attachment_backup_sizes', true );
327
 
328
+ if ( ! is_array( $backup_sizes ) ) {
329
  $backup_sizes = array();
330
  }
331
 
336
 
337
  return $url;
338
  }
 
339
 
340
+
341
+ /**
342
+ * Get the image crop position
343
+ *
344
+ * @return array
345
+ */
346
+ private function get_crop_position() {
347
+
348
+ $crop_position = get_post_meta( $this->id, 'ml-slider_crop_position', true );
349
+
350
+ if ( $crop_position ) {
351
+
352
+ $parts = explode( "-", $crop_position );
353
+
354
+ if ( isset( $parts[0], $parts[1] ) ) {
355
+ return array($parts[0], $parts[1]);
356
+ }
357
+ }
358
+
359
+ // default
360
+ return array('center', 'center');
361
+
362
+ }
363
+ }
inc/metaslider.systemcheck.class.php CHANGED
@@ -148,5 +148,4 @@ class MetaSliderSystemCheck {
148
  $nonce = wp_create_nonce( "metaslider-dismiss-{$key}" );
149
  echo "<div id='message' class='updated'><p><b>Warning:</b> {$message}<br /><br /><a class='button' href='?page=metaslider&dismissMessage={$key}&_wpnonce={$nonce}'>Hide</a></p></div>";
150
  }
151
- }
152
- ?>
148
  $nonce = wp_create_nonce( "metaslider-dismiss-{$key}" );
149
  echo "<div id='message' class='updated'><p><b>Warning:</b> {$message}<br /><br /><a class='button' href='?page=metaslider&dismissMessage={$key}&_wpnonce={$nonce}'>Hide</a></p></div>";
150
  }
151
+ }
 
inc/metaslider.widget.class.php CHANGED
@@ -123,5 +123,4 @@ class MetaSlider_Widget extends WP_Widget {
123
  </p>
124
  <?php
125
  }
126
- }
127
- ?>
123
  </p>
124
  <?php
125
  }
126
+ }
 
inc/slide/metaslide.class.php CHANGED
@@ -61,7 +61,9 @@ class MetaSlide {
61
  return $this->get_public_slide();
62
  }
63
 
64
- if ( is_admin() && ! isset( $_GET['slider_id'] ) ) {
 
 
65
  return $this->get_admin_slide();
66
  }
67
 
@@ -312,5 +314,4 @@ class MetaSlide {
312
  return $imageHelper->get_image_url();
313
 
314
  }
315
- }
316
- ?>
61
  return $this->get_public_slide();
62
  }
63
 
64
+ $capability = apply_filters( 'metaslider_capability', 'edit_others_posts' );
65
+
66
+ if ( is_admin() && current_user_can( $capability ) && ! isset( $_GET['slider_id'] ) ) {
67
  return $this->get_admin_slide();
68
  }
69
 
314
  return $imageHelper->get_image_url();
315
 
316
  }
317
+ }
 
inc/slide/metaslide.image.class.php CHANGED
@@ -84,10 +84,12 @@ class MetaImageSlide extends MetaSlide {
84
  $this->use_wp_image_editor()
85
  );
86
 
87
- $url = $imageHelper->get_image_url();
88
 
89
  echo $url . " (" . $settings['width'] . 'x' . $settings['height'] . ")";
90
 
 
 
91
  wp_die();
92
  }
93
 
@@ -164,6 +166,36 @@ class MetaImageSlide extends MetaSlide {
164
  )
165
  );
166
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  return apply_filters("metaslider_image_slide_tabs", $tabs, $this->slide, $this->slider, $this->settings);
168
 
169
  }
@@ -324,7 +356,7 @@ class MetaImageSlide extends MetaSlide {
324
 
325
  $thumb = isset( $slide['data-thumb'] ) && strlen( $slide['data-thumb'] ) ? " data-thumb=\"{$slide['data-thumb']}\"" : "";
326
 
327
- $html = '<li style="display: none; float: left; width: 100%;"' . $thumb . '>' . $html . '</li>';
328
 
329
  return apply_filters( 'metaslider_image_flex_slider_markup', $html, $slide, $this->settings );
330
 
@@ -417,6 +449,8 @@ class MetaImageSlide extends MetaSlide {
417
 
418
  $this->add_or_update_or_delete_meta( $this->slide->ID, 'title', $fields['title'] );
419
 
 
 
420
  if ( isset( $fields['alt'] ) ) {
421
  update_post_meta( $this->slide->ID, '_wp_attachment_image_alt', $fields['alt'] );
422
  }
@@ -427,5 +461,4 @@ class MetaImageSlide extends MetaSlide {
427
  $this->add_or_update_or_delete_meta( $this->slide->ID, 'new_window', $new_window );
428
 
429
  }
430
- }
431
- ?>
84
  $this->use_wp_image_editor()
85
  );
86
 
87
+ $url = $imageHelper->get_image_url( true );
88
 
89
  echo $url . " (" . $settings['width'] . 'x' . $settings['height'] . ")";
90
 
91
+ do_action( "metaslider_ajax_resize_image_slide", $slide_id, $slider_id, $settings );
92
+
93
  wp_die();
94
  }
95
 
166
  )
167
  );
168
 
169
+ if ( version_compare( get_bloginfo('version'), 3.9, '>=' ) ) {
170
+
171
+ $crop_position = get_post_meta( $slide_id, 'ml-slider_crop_position', true);
172
+
173
+ if ( ! $crop_position ) {
174
+ $crop_position = 'center-center';
175
+ }
176
+
177
+ $crop_tab = "<div class='row'><label>" . __( "Crop Position", "metaslider" ) . "</label></div>
178
+ <div class='row'>
179
+ <select class='crop_position' name='attachment[{$slide_id}][crop_position]'>
180
+ <option value='left-top' " . selected( $crop_position, 'left-top', false ) . ">" . __( "Top Left", "metaslider" ) . "</option>
181
+ <option value='center-top' " . selected( $crop_position, 'center-top', false ) . ">" . __( "Top Center", "metaslider" ) . "</option>
182
+ <option value='right-top' " . selected( $crop_position, 'right-top', false ) . ">" . __( "Top Right", "metaslider" ) . "</option>
183
+ <option value='left-center' " . selected( $crop_position, 'left-center', false ) . ">" . __( "Center Left", "metaslider" ) . "</option>
184
+ <option value='center-center' " . selected( $crop_position, 'center-center', false ) . ">" . __( "Center Center", "metaslider" ) . "</option>
185
+ <option value='right-center' " . selected( $crop_position, 'right-center', false ) . ">" . __( "Center Right", "metaslider" ) . "</option>
186
+ <option value='left-bottom' " . selected( $crop_position, 'left-bottom', false ) . ">" . __( "Bottom Left", "metaslider" ) . "</option>
187
+ <option value='center-bottom' " . selected( $crop_position, 'center-bottom', false ) . ">" . __( "Bottom Center", "metaslider" ) . "</option>
188
+ <option value='right-bottom' " . selected( $crop_position, 'right-bottom', false ) . ">" . __( "Bottom Right", "metaslider" ) . "</option>
189
+ </select>
190
+ </div>";
191
+
192
+ $tabs['crop'] = array(
193
+ 'title' => __( "Crop", "metaslider" ),
194
+ 'content' => $crop_tab
195
+ );
196
+
197
+ }
198
+
199
  return apply_filters("metaslider_image_slide_tabs", $tabs, $this->slide, $this->slider, $this->settings);
200
 
201
  }
356
 
357
  $thumb = isset( $slide['data-thumb'] ) && strlen( $slide['data-thumb'] ) ? " data-thumb=\"{$slide['data-thumb']}\"" : "";
358
 
359
+ $html = '<li style="display: none; width: 100%;"' . $thumb . '>' . $html . '</li>';
360
 
361
  return apply_filters( 'metaslider_image_flex_slider_markup', $html, $slide, $this->settings );
362
 
449
 
450
  $this->add_or_update_or_delete_meta( $this->slide->ID, 'title', $fields['title'] );
451
 
452
+ $this->add_or_update_or_delete_meta( $this->slide->ID, 'crop_position', $fields['crop_position'] );
453
+
454
  if ( isset( $fields['alt'] ) ) {
455
  update_post_meta( $this->slide->ID, '_wp_attachment_image_alt', $fields['alt'] );
456
  }
461
  $this->add_or_update_or_delete_meta( $this->slide->ID, 'new_window', $new_window );
462
 
463
  }
464
+ }
 
inc/slider/metaslider.class.php CHANGED
@@ -125,7 +125,14 @@ class MetaSlider {
125
  * Save the slider details and initiate the update of all slides associated with slider.
126
  */
127
  private function save() {
128
- if ( !is_admin() ) {
 
 
 
 
 
 
 
129
  return;
130
  }
131
 
@@ -486,7 +493,7 @@ class MetaSlider {
486
  $old_settings = $this->get_settings();
487
 
488
  // convert submitted checkbox values from 'on' or 'off' to boolean values
489
- $checkboxes = array( 'noConflict', 'fullWidth', 'hoverPause', 'links', 'reverse', 'random', 'printCss', 'printJs', 'smoothHeight', 'center', 'smartCrop', 'carouselMode', 'autoPlay' );
490
 
491
  foreach ( $checkboxes as $checkbox ) {
492
  if ( isset( $new_settings[$checkbox] ) && $new_settings[$checkbox] == 'on' ) {
125
  * Save the slider details and initiate the update of all slides associated with slider.
126
  */
127
  private function save() {
128
+
129
+ if ( ! is_admin() ) {
130
+ return;
131
+ }
132
+
133
+ $capability = apply_filters( 'metaslider_capability', 'edit_others_posts' );
134
+
135
+ if ( ! current_user_can( $capability ) ) {
136
  return;
137
  }
138
 
493
  $old_settings = $this->get_settings();
494
 
495
  // convert submitted checkbox values from 'on' or 'off' to boolean values
496
+ $checkboxes = apply_filters( "metaslider_checkbox_settings", array( 'noConflict', 'fullWidth', 'hoverPause', 'links', 'reverse', 'random', 'printCss', 'printJs', 'smoothHeight', 'center', 'carouselMode', 'autoPlay' ) );
497
 
498
  foreach ( $checkboxes as $checkbox ) {
499
  if ( isset( $new_settings[$checkbox] ) && $new_settings[$checkbox] == 'on' ) {
inc/slider/metaslider.coin.class.php CHANGED
@@ -55,5 +55,4 @@ class MetaCoinSlider extends MetaSlider {
55
 
56
  return apply_filters( 'metaslider_coin_slider_get_html', $return_value, $this->id, $this->settings ); $retVal;
57
  }
58
- }
59
- ?>
55
 
56
  return apply_filters( 'metaslider_coin_slider_get_html', $return_value, $this->id, $this->settings ); $retVal;
57
  }
58
+ }
 
inc/slider/metaslider.flex.class.php CHANGED
@@ -179,10 +179,9 @@ class MetaFlexSlider extends MetaSlider {
179
 
180
  // show the first slide
181
  if ($this->get_setting('carouselMode') != 'true') {
182
- $return_value = preg_replace('/none/', 'inline-block', $return_value, 1);
183
  }
184
 
185
  return apply_filters( 'metaslider_flex_slider_get_html', $return_value, $this->id, $this->settings );
186
  }
187
- }
188
- ?>
179
 
180
  // show the first slide
181
  if ($this->get_setting('carouselMode') != 'true') {
182
+ $return_value = preg_replace('/none/', 'block', $return_value, 1);
183
  }
184
 
185
  return apply_filters( 'metaslider_flex_slider_get_html', $return_value, $this->id, $this->settings );
186
  }
187
+ }
 
inc/slider/metaslider.nivo.class.php CHANGED
@@ -111,5 +111,4 @@ class MetaNivoSlider extends MetaSlider {
111
 
112
  return apply_filters( 'metaslider_nivo_slider_get_html', $return_value, $this->id, $this->settings );;
113
  }
114
- }
115
- ?>
111
 
112
  return apply_filters( 'metaslider_nivo_slider_get_html', $return_value, $this->id, $this->settings );;
113
  }
114
+ }
 
inc/slider/metaslider.responsive.class.php CHANGED
@@ -56,5 +56,4 @@ class MetaResponsiveSlider extends MetaSlider {
56
 
57
  return apply_filters( 'metaslider_responsive_slider_get_html', $return_value, $this->id, $this->settings );;
58
  }
59
- }
60
- ?>
56
 
57
  return apply_filters( 'metaslider_responsive_slider_get_html', $return_value, $this->id, $this->settings );;
58
  }
59
+ }
 
languages/metaslider.mo CHANGED
Binary file
languages/metaslider.po CHANGED
@@ -1,8 +1,8 @@
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: 2013-12-16 17:31-0000\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "MIME-Version: 1.0\n"
@@ -14,539 +14,567 @@ msgstr ""
14
  "X-Poedit-SearchPath-0: .\n"
15
  "X-Poedit-SearchPath-1: ..\n"
16
 
17
- #: ../ml-slider.php:102
18
- msgid "Go Pro"
19
  msgstr ""
20
 
21
- #: ../ml-slider.php:156
22
- msgid "Image"
23
  msgstr ""
24
 
25
- #: ../ml-slider.php:157
26
- msgid "Add to slider"
27
  msgstr ""
28
 
29
- #: ../ml-slider.php:177
30
- msgid "Post Feed"
31
  msgstr ""
32
 
33
- #: ../ml-slider.php:178
34
- msgid "Vimeo"
35
  msgstr ""
36
 
37
- #: ../ml-slider.php:179
38
- msgid "YouTube"
 
 
39
  msgstr ""
40
 
41
- #: ../ml-slider.php:180
42
- msgid "Layer Slide"
43
  msgstr ""
44
 
45
- #: ../ml-slider.php:235 ../inc/slide/metaslide.image.class.php:103
46
- msgid "URL"
47
  msgstr ""
48
 
49
- #: ../ml-slider.php:236 ../inc/slide/metaslide.image.class.php:101
50
- msgid "Caption"
51
  msgstr ""
52
 
53
- #: ../ml-slider.php:237 ../inc/slide/metaslide.image.class.php:102
54
- msgid "New Window"
55
  msgstr ""
56
 
57
- #: ../ml-slider.php:238
58
- msgid "Are you sure?"
59
  msgstr ""
60
 
61
- #: ../ml-slider.php:242
62
- msgid ""
63
- "Caution: This setting is for advanced developers only. If you're unsure, "
64
- "leave it checked."
65
  msgstr ""
66
 
67
- #: ../ml-slider.php:278
68
- msgid "Upgrade to Pro $19"
69
  msgstr ""
70
 
71
- #: ../ml-slider.php:294
72
- msgid "Documentation"
73
  msgstr ""
74
 
75
- #: ../ml-slider.php:430
76
- msgid "New Slider"
77
  msgstr ""
78
 
79
- #: ../ml-slider.php:692
80
- msgid "New slideshow created. Click 'Add Slide' to get started!"
81
  msgstr ""
82
 
83
- #: ../ml-slider.php:709
 
 
 
 
84
  msgid "or"
85
  msgstr ""
86
 
87
- #: ../ml-slider.php:710
88
  msgid "Add New Slideshow"
89
  msgstr ""
90
 
91
- #: ../ml-slider.php:726
92
  msgid "Create your first slideshow"
93
  msgstr ""
94
 
95
- #: ../ml-slider.php:744
 
 
 
 
 
 
 
 
96
  msgid "Settings"
97
  msgstr ""
98
 
99
- #: ../ml-slider.php:745
100
  msgid "Save"
101
  msgstr ""
102
 
103
- #: ../ml-slider.php:746
104
  msgid "Save & Preview"
105
  msgstr ""
106
 
107
- #: ../ml-slider.php:759
108
  msgid "Flex Slider"
109
  msgstr ""
110
 
111
- #: ../ml-slider.php:760
112
- msgid "Responsive"
113
  msgstr ""
114
 
115
- #: ../ml-slider.php:761
116
  msgid "Nivo Slider"
117
  msgstr ""
118
 
119
- #: ../ml-slider.php:762
120
  msgid "Coin Slider"
121
  msgstr ""
122
 
123
- #: ../ml-slider.php:773 ../ml-slider.php:995
124
  msgid "Width"
125
  msgstr ""
126
 
127
- #: ../ml-slider.php:775
128
  msgid "Slideshow width"
129
  msgstr ""
130
 
131
- #: ../ml-slider.php:776 ../ml-slider.php:789
132
  msgid "px"
133
  msgstr ""
134
 
135
- #: ../ml-slider.php:786 ../ml-slider.php:1008
136
  msgid "Height"
137
  msgstr ""
138
 
139
- #: ../ml-slider.php:788
140
  msgid "Slideshow height"
141
  msgstr ""
142
 
143
- #: ../ml-slider.php:795
144
  msgid "Effect"
145
  msgstr ""
146
 
147
- #: ../ml-slider.php:797
148
  msgid "Slide transition effect"
149
  msgstr ""
150
 
151
- #: ../ml-slider.php:799 ../ml-slider.php:927
152
  msgid "Random"
153
  msgstr ""
154
 
155
- #: ../ml-slider.php:800
156
  msgid "Swirl"
157
  msgstr ""
158
 
159
- #: ../ml-slider.php:801
160
  msgid "Rain"
161
  msgstr ""
162
 
163
- #: ../ml-slider.php:802
164
  msgid "Straight"
165
  msgstr ""
166
 
167
- #: ../ml-slider.php:803
168
  msgid "Slide Down"
169
  msgstr ""
170
 
171
- #: ../ml-slider.php:804
172
  msgid "Slice Up"
173
  msgstr ""
174
 
175
- #: ../ml-slider.php:805
176
  msgid "Slide Up Left"
177
  msgstr ""
178
 
179
- #: ../ml-slider.php:806
180
  msgid "Slice Up Down"
181
  msgstr ""
182
 
183
- #: ../ml-slider.php:807
184
  msgid "Slide Up Down Left"
185
  msgstr ""
186
 
187
- #: ../ml-slider.php:808
188
  msgid "Fold"
189
  msgstr ""
190
 
191
- #: ../ml-slider.php:809
192
  msgid "Fade"
193
  msgstr ""
194
 
195
- #: ../ml-slider.php:810
196
  msgid "Slide In Right"
197
  msgstr ""
198
 
199
- #: ../ml-slider.php:811
200
  msgid "Slide In Left"
201
  msgstr ""
202
 
203
- #: ../ml-slider.php:812
204
  msgid "Box Random"
205
  msgstr ""
206
 
207
- #: ../ml-slider.php:813
208
  msgid "Box Rain"
209
  msgstr ""
210
 
211
- #: ../ml-slider.php:814
212
  msgid "Box Rain Reverse"
213
  msgstr ""
214
 
215
- #: ../ml-slider.php:815
216
  msgid "Box Rain Grow Reverse"
217
  msgstr ""
218
 
219
- #: ../ml-slider.php:816
220
  msgid "Slide"
221
  msgstr ""
222
 
223
- #: ../ml-slider.php:823
224
  msgid "Theme"
225
  msgstr ""
226
 
227
- #: ../ml-slider.php:825
228
  msgid "Slideshow theme"
229
  msgstr ""
230
 
231
- #: ../ml-slider.php:827
232
  msgid "Default"
233
  msgstr ""
234
 
235
- #: ../ml-slider.php:828
236
  msgid "Dark (Nivo)"
237
  msgstr ""
238
 
239
- #: ../ml-slider.php:829
240
  msgid "Light (Nivo)"
241
  msgstr ""
242
 
243
- #: ../ml-slider.php:830
244
  msgid "Bar (Nivo)"
245
  msgstr ""
246
 
247
- #: ../ml-slider.php:836
248
  msgid "Arrows"
249
  msgstr ""
250
 
251
- #: ../ml-slider.php:839
252
  msgid "Show the previous/next arrows"
253
  msgstr ""
254
 
255
- #: ../ml-slider.php:844
256
  msgid "Navigation"
257
  msgstr ""
258
 
259
- #: ../ml-slider.php:847
260
  msgid "Show the slide navigation bullets"
261
  msgstr ""
262
 
263
- #: ../ml-slider.php:849
264
  msgid "Hidden"
265
  msgstr ""
266
 
267
- #: ../ml-slider.php:850
268
  msgid "Dots"
269
  msgstr ""
270
 
271
- #: ../ml-slider.php:851
272
- msgid "Thumbnails (Pro)"
273
- msgstr ""
274
-
275
- #: ../ml-slider.php:862
276
  msgid "Title"
277
  msgstr ""
278
 
279
- #: ../ml-slider.php:863
280
  msgid "Slideshow title"
281
  msgstr ""
282
 
283
- #: ../ml-slider.php:877
284
  msgid "Advanced Settings"
285
  msgstr ""
286
 
287
- #: ../ml-slider.php:886
288
  msgid "Stretch"
289
  msgstr ""
290
 
291
- #: ../ml-slider.php:888
292
  msgid "100% wide output"
293
  msgstr ""
294
 
295
- #: ../ml-slider.php:890
296
  msgid "Stretch the slideshow output to fill it's parent container"
297
  msgstr ""
298
 
299
- #: ../ml-slider.php:895
300
  msgid "Center align"
301
  msgstr ""
302
 
303
- #: ../ml-slider.php:898
304
  msgid "Center align the slideshow"
305
  msgstr ""
306
 
307
- #: ../ml-slider.php:903
308
  msgid "Auto play"
309
  msgstr ""
310
 
311
- #: ../ml-slider.php:906
312
  msgid "Transition between slides automatically"
313
  msgstr ""
314
 
315
- #: ../ml-slider.php:911
316
- msgid "Smart crop"
 
 
 
 
 
 
 
 
 
 
 
 
317
  msgstr ""
318
 
319
- #: ../ml-slider.php:914
320
  msgid ""
321
  "Smart Crop ensures your responsive slides are cropped to a ratio that "
322
  "results in a consistent slideshow size"
323
  msgstr ""
324
 
325
- #: ../ml-slider.php:919
326
  msgid "Carousel mode"
327
  msgstr ""
328
 
329
- #: ../ml-slider.php:922
330
  msgid "Display multiple slides at once. Slideshow output will be 100% wide."
331
  msgstr ""
332
 
333
- #: ../ml-slider.php:930
 
 
 
 
 
 
 
 
334
  msgid "Randomise the order of the slides"
335
  msgstr ""
336
 
337
- #: ../ml-slider.php:935
338
  msgid "Hover pause"
339
  msgstr ""
340
 
341
- #: ../ml-slider.php:938
342
  msgid ""
343
  "Pause the slideshow when hovering over slider, then resume when no longer "
344
  "hovering."
345
  msgstr ""
346
 
347
- #: ../ml-slider.php:943
348
  msgid "Reverse"
349
  msgstr ""
350
 
351
- #: ../ml-slider.php:946
352
  msgid "Reverse the animation direction"
353
  msgstr ""
354
 
355
- #: ../ml-slider.php:956
356
  msgid "Slide delay"
357
  msgstr ""
358
 
359
- #: ../ml-slider.php:958
360
  msgid "How long to display each slide, in milliseconds"
361
  msgstr ""
362
 
363
- #: ../ml-slider.php:959 ../ml-slider.php:972 ../ml-slider.php:985
364
- #: ../ml-slider.php:1061 ../ml-slider.php:1087
365
  msgid "ms"
366
  msgstr ""
367
 
368
- #: ../ml-slider.php:969
369
  msgid "Animation speed"
370
  msgstr ""
371
 
372
- #: ../ml-slider.php:971
373
  msgid "Set the speed of animations, in milliseconds"
374
  msgstr ""
375
 
376
- #: ../ml-slider.php:982 ../ml-slider.php:984
377
  msgid "Number of slices"
378
  msgstr ""
379
 
380
- #: ../ml-slider.php:995 ../ml-slider.php:997 ../ml-slider.php:1008
381
- #: ../ml-slider.php:1010
382
  msgid "Number of squares"
383
  msgstr ""
384
 
385
- #: ../ml-slider.php:1016
386
  msgid "Slide direction"
387
  msgstr ""
388
 
389
- #: ../ml-slider.php:1018
390
  msgid "Select the sliding direction"
391
  msgstr ""
392
 
393
- #: ../ml-slider.php:1021
394
  msgid "Horizontal"
395
  msgstr ""
396
 
397
- #: ../ml-slider.php:1022
398
  msgid "Vertical"
399
  msgstr ""
400
 
401
- #: ../ml-slider.php:1028
402
  msgid "Easing"
403
  msgstr ""
404
 
405
- #: ../ml-slider.php:1030
406
  msgid "Animation easing effect"
407
  msgstr ""
408
 
409
- #: ../ml-slider.php:1037
410
  msgid "Previous text"
411
  msgstr ""
412
 
413
- #: ../ml-slider.php:1039
414
  msgid "Set the text for the 'previous' direction item"
415
  msgstr ""
416
 
417
- #: ../ml-slider.php:1045
418
  msgid "Next text"
419
  msgstr ""
420
 
421
- #: ../ml-slider.php:1047
422
  msgid "Set the text for the 'next' direction item"
423
  msgstr ""
424
 
425
- #: ../ml-slider.php:1058
426
  msgid "Square delay"
427
  msgstr ""
428
 
429
- #: ../ml-slider.php:1060
430
  msgid "Delay between squares in ms"
431
  msgstr ""
432
 
433
- #: ../ml-slider.php:1071
434
  msgid "Opacity"
435
  msgstr ""
436
 
437
- #: ../ml-slider.php:1073
438
  msgid "Opacity of title and navigation"
439
  msgstr ""
440
 
441
- #: ../ml-slider.php:1084
442
  msgid "Caption speed"
443
  msgstr ""
444
 
445
- #: ../ml-slider.php:1086
446
  msgid "Set the fade in speed of the caption"
447
  msgstr ""
448
 
449
- #: ../ml-slider.php:1093
450
  msgid "Developer options"
451
  msgstr ""
452
 
453
- #: ../ml-slider.php:1098
454
  msgid "CSS classes"
455
  msgstr ""
456
 
457
- #: ../ml-slider.php:1100
458
  msgid ""
459
  "Specify any custom CSS Classes you would like to be added to the slider "
460
  "wrapper"
461
  msgstr ""
462
 
463
- #: ../ml-slider.php:1106
464
  msgid "Print CSS"
465
  msgstr ""
466
 
467
- #: ../ml-slider.php:1109
468
  msgid "Uncheck this is you would like to include your own CSS"
469
  msgstr ""
470
 
471
- #: ../ml-slider.php:1114
472
  msgid "Print JS"
473
  msgstr ""
474
 
475
- #: ../ml-slider.php:1117
476
  msgid "Uncheck this is you would like to include your own Javascript"
477
  msgstr ""
478
 
479
- #: ../ml-slider.php:1122
480
  msgid "No conflict mode"
481
  msgstr ""
482
 
483
- #: ../ml-slider.php:1125
484
  msgid "Delay adding the flexslider class to the slideshow"
485
  msgstr ""
486
 
487
- #: ../ml-slider.php:1139
488
  msgid "Usage"
489
  msgstr ""
490
 
491
- #: ../ml-slider.php:1142
492
  msgid "Shortcode"
493
  msgstr ""
494
 
495
- #: ../ml-slider.php:1143
496
  msgid "Template Include"
497
  msgstr ""
498
 
499
- #: ../ml-slider.php:1147
500
  msgid "Copy & paste the shortcode directly into any WordPress post or page."
501
  msgstr ""
502
 
503
- #: ../ml-slider.php:1150
504
  msgid ""
505
  "Copy & paste this code into a template file to include the slideshow within "
506
  "your theme."
507
  msgstr ""
508
 
509
- #: ../ml-slider.php:1179
510
  msgid "Delete Slider"
511
  msgstr ""
512
 
513
- #: ../ml-slider.php:1190
514
- msgid "Slides"
515
- msgstr ""
516
-
517
- #: ../ml-slider.php:1193 ../ml-slider.php:1194
518
- msgid "Add Slide"
519
- msgstr ""
520
-
521
- #: ../ml-slider.php:1224
522
  msgid "Select slideshow to insert into post"
523
  msgstr ""
524
 
525
- #: ../ml-slider.php:1227
526
  msgid "Add slider"
527
  msgstr ""
528
 
529
- #: ../ml-slider.php:1258
530
  msgid "Insert Meta Slider"
531
  msgstr ""
532
 
533
- #: ../ml-slider.php:1260
534
  msgid "Choose slideshow"
535
  msgstr ""
536
 
537
- #: ../ml-slider.php:1267 ../inc/metaslider.widget.class.php:124
538
  msgid "No slideshows found"
539
  msgstr ""
540
 
 
 
 
 
 
 
 
 
541
  #: ../inc/metaslider.widget.class.php:18
542
  msgid "Meta Slider"
543
  msgstr ""
544
 
545
- #: ../inc/metaslider.widget.class.php:111
546
  msgid "Title:"
547
  msgstr ""
548
 
549
- #: ../inc/metaslider.widget.class.php:114
550
  msgid "Select Slider:"
551
  msgstr ""
552
 
@@ -554,34 +582,78 @@ msgstr ""
554
  msgid "Security check failed. Refresh page and try again."
555
  msgstr ""
556
 
557
- #: ../inc/slide/metaslide.image.class.php:36
558
  msgid "Failed to add slide. Slide already exists in slideshow."
559
  msgstr ""
560
 
561
- #: ../inc/slide/metaslide.image.class.php:38
562
  msgid "Failed to add slide. Slide is not of type 'image'."
563
  msgstr ""
564
 
565
- #: ../inc/slide/metaslide.image.class.php:110
566
  msgid "Image Slide"
567
  msgstr ""
568
 
569
- #: ../inc/slide/metaslide.image.class.php:115
570
- msgid "General"
571
  msgstr ""
572
 
573
- #: ../inc/slide/metaslide.image.class.php:116
574
- msgid "SEO"
575
  msgstr ""
576
 
577
- #: ../inc/slide/metaslide.image.class.php:121
578
- msgid "Warning: Image data does not exist. Please re-upload the image."
579
  msgstr ""
580
 
581
- #: ../inc/slide/metaslide.image.class.php:130
582
- msgid "Image Title Text"
583
  msgstr ""
584
 
585
- #: ../inc/slide/metaslide.image.class.php:132
586
- msgid "Image Alt Text"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
587
  msgstr ""
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: metaslider\n"
4
+ "POT-Creation-Date: 2014-08-11 14:52-0000\n"
5
+ "PO-Revision-Date: 2014-08-11 14:52-0000\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "MIME-Version: 1.0\n"
14
  "X-Poedit-SearchPath-0: .\n"
15
  "X-Poedit-SearchPath-1: ..\n"
16
 
17
+ #: ../ml-slider.php:335
18
+ msgid "Documentation"
19
  msgstr ""
20
 
21
+ #: ../ml-slider.php:388 ../inc/slide/metaslide.image.class.php:147
22
+ msgid "URL"
23
  msgstr ""
24
 
25
+ #: ../ml-slider.php:389 ../inc/slide/metaslide.image.class.php:146
26
+ msgid "Caption"
27
  msgstr ""
28
 
29
+ #: ../ml-slider.php:390 ../inc/slide/metaslide.image.class.php:149
30
+ msgid "New Window"
31
  msgstr ""
32
 
33
+ #: ../ml-slider.php:391
34
+ msgid "Are you sure?"
35
  msgstr ""
36
 
37
+ #: ../ml-slider.php:396
38
+ msgid ""
39
+ "Caution: This setting is for advanced developers only. If you're unsure, "
40
+ "leave it checked."
41
  msgstr ""
42
 
43
+ #: ../ml-slider.php:459
44
+ msgid "Image"
45
  msgstr ""
46
 
47
+ #: ../ml-slider.php:460
48
+ msgid "Add to slider"
49
  msgstr ""
50
 
51
+ #: ../ml-slider.php:486
52
+ msgid "Post Feed"
53
  msgstr ""
54
 
55
+ #: ../ml-slider.php:487
56
+ msgid "Vimeo"
57
  msgstr ""
58
 
59
+ #: ../ml-slider.php:488
60
+ msgid "YouTube"
61
  msgstr ""
62
 
63
+ #: ../ml-slider.php:489
64
+ msgid "Layer Slide"
 
 
65
  msgstr ""
66
 
67
+ #: ../ml-slider.php:645
68
+ msgid "New Slider"
69
  msgstr ""
70
 
71
+ #: ../ml-slider.php:956
72
+ msgid "Switch to Dropdown view"
73
  msgstr ""
74
 
75
+ #: ../ml-slider.php:977
76
+ msgid "New slideshow created. Click 'Add Slide' to get started!"
77
  msgstr ""
78
 
79
+ #: ../ml-slider.php:981
80
+ msgid "Switch to Tab view"
81
  msgstr ""
82
 
83
+ #: ../ml-slider.php:983
84
+ msgid "Select Slider"
85
+ msgstr ""
86
+
87
+ #: ../ml-slider.php:1002
88
  msgid "or"
89
  msgstr ""
90
 
91
+ #: ../ml-slider.php:1003
92
  msgid "Add New Slideshow"
93
  msgstr ""
94
 
95
+ #: ../ml-slider.php:1009
96
  msgid "Create your first slideshow"
97
  msgstr ""
98
 
99
+ #: ../ml-slider.php:1069
100
+ msgid "Slides"
101
+ msgstr ""
102
+
103
+ #: ../ml-slider.php:1072 ../ml-slider.php:1073
104
+ msgid "Add Slide"
105
+ msgstr ""
106
+
107
+ #: ../ml-slider.php:1093
108
  msgid "Settings"
109
  msgstr ""
110
 
111
+ #: ../ml-slider.php:1094
112
  msgid "Save"
113
  msgstr ""
114
 
115
+ #: ../ml-slider.php:1095
116
  msgid "Save & Preview"
117
  msgstr ""
118
 
119
+ #: ../ml-slider.php:1108
120
  msgid "Flex Slider"
121
  msgstr ""
122
 
123
+ #: ../ml-slider.php:1109
124
+ msgid "R. Slides"
125
  msgstr ""
126
 
127
+ #: ../ml-slider.php:1110
128
  msgid "Nivo Slider"
129
  msgstr ""
130
 
131
+ #: ../ml-slider.php:1111
132
  msgid "Coin Slider"
133
  msgstr ""
134
 
135
+ #: ../ml-slider.php:1122 ../ml-slider.php:1360
136
  msgid "Width"
137
  msgstr ""
138
 
139
+ #: ../ml-slider.php:1124
140
  msgid "Slideshow width"
141
  msgstr ""
142
 
143
+ #: ../ml-slider.php:1125 ../ml-slider.php:1138 ../ml-slider.php:1287
144
  msgid "px"
145
  msgstr ""
146
 
147
+ #: ../ml-slider.php:1135 ../ml-slider.php:1373
148
  msgid "Height"
149
  msgstr ""
150
 
151
+ #: ../ml-slider.php:1137
152
  msgid "Slideshow height"
153
  msgstr ""
154
 
155
+ #: ../ml-slider.php:1144
156
  msgid "Effect"
157
  msgstr ""
158
 
159
+ #: ../ml-slider.php:1146
160
  msgid "Slide transition effect"
161
  msgstr ""
162
 
163
+ #: ../ml-slider.php:1148 ../ml-slider.php:1292
164
  msgid "Random"
165
  msgstr ""
166
 
167
+ #: ../ml-slider.php:1149
168
  msgid "Swirl"
169
  msgstr ""
170
 
171
+ #: ../ml-slider.php:1150
172
  msgid "Rain"
173
  msgstr ""
174
 
175
+ #: ../ml-slider.php:1151
176
  msgid "Straight"
177
  msgstr ""
178
 
179
+ #: ../ml-slider.php:1152
180
  msgid "Slide Down"
181
  msgstr ""
182
 
183
+ #: ../ml-slider.php:1153
184
  msgid "Slice Up"
185
  msgstr ""
186
 
187
+ #: ../ml-slider.php:1154
188
  msgid "Slide Up Left"
189
  msgstr ""
190
 
191
+ #: ../ml-slider.php:1155
192
  msgid "Slice Up Down"
193
  msgstr ""
194
 
195
+ #: ../ml-slider.php:1156
196
  msgid "Slide Up Down Left"
197
  msgstr ""
198
 
199
+ #: ../ml-slider.php:1157
200
  msgid "Fold"
201
  msgstr ""
202
 
203
+ #: ../ml-slider.php:1158
204
  msgid "Fade"
205
  msgstr ""
206
 
207
+ #: ../ml-slider.php:1159
208
  msgid "Slide In Right"
209
  msgstr ""
210
 
211
+ #: ../ml-slider.php:1160
212
  msgid "Slide In Left"
213
  msgstr ""
214
 
215
+ #: ../ml-slider.php:1161
216
  msgid "Box Random"
217
  msgstr ""
218
 
219
+ #: ../ml-slider.php:1162
220
  msgid "Box Rain"
221
  msgstr ""
222
 
223
+ #: ../ml-slider.php:1163
224
  msgid "Box Rain Reverse"
225
  msgstr ""
226
 
227
+ #: ../ml-slider.php:1164
228
  msgid "Box Rain Grow Reverse"
229
  msgstr ""
230
 
231
+ #: ../ml-slider.php:1165
232
  msgid "Slide"
233
  msgstr ""
234
 
235
+ #: ../ml-slider.php:1172
236
  msgid "Theme"
237
  msgstr ""
238
 
239
+ #: ../ml-slider.php:1174
240
  msgid "Slideshow theme"
241
  msgstr ""
242
 
243
+ #: ../ml-slider.php:1176
244
  msgid "Default"
245
  msgstr ""
246
 
247
+ #: ../ml-slider.php:1177
248
  msgid "Dark (Nivo)"
249
  msgstr ""
250
 
251
+ #: ../ml-slider.php:1178
252
  msgid "Light (Nivo)"
253
  msgstr ""
254
 
255
+ #: ../ml-slider.php:1179
256
  msgid "Bar (Nivo)"
257
  msgstr ""
258
 
259
+ #: ../ml-slider.php:1185
260
  msgid "Arrows"
261
  msgstr ""
262
 
263
+ #: ../ml-slider.php:1188
264
  msgid "Show the previous/next arrows"
265
  msgstr ""
266
 
267
+ #: ../ml-slider.php:1193
268
  msgid "Navigation"
269
  msgstr ""
270
 
271
+ #: ../ml-slider.php:1196
272
  msgid "Show the slide navigation bullets"
273
  msgstr ""
274
 
275
+ #: ../ml-slider.php:1198
276
  msgid "Hidden"
277
  msgstr ""
278
 
279
+ #: ../ml-slider.php:1199
280
  msgid "Dots"
281
  msgstr ""
282
 
283
+ #: ../ml-slider.php:1210
 
 
 
 
284
  msgid "Title"
285
  msgstr ""
286
 
287
+ #: ../ml-slider.php:1211
288
  msgid "Slideshow title"
289
  msgstr ""
290
 
291
+ #: ../ml-slider.php:1225
292
  msgid "Advanced Settings"
293
  msgstr ""
294
 
295
+ #: ../ml-slider.php:1234
296
  msgid "Stretch"
297
  msgstr ""
298
 
299
+ #: ../ml-slider.php:1236
300
  msgid "100% wide output"
301
  msgstr ""
302
 
303
+ #: ../ml-slider.php:1238
304
  msgid "Stretch the slideshow output to fill it's parent container"
305
  msgstr ""
306
 
307
+ #: ../ml-slider.php:1243
308
  msgid "Center align"
309
  msgstr ""
310
 
311
+ #: ../ml-slider.php:1246
312
  msgid "Center align the slideshow"
313
  msgstr ""
314
 
315
+ #: ../ml-slider.php:1251
316
  msgid "Auto play"
317
  msgstr ""
318
 
319
+ #: ../ml-slider.php:1254
320
  msgid "Transition between slides automatically"
321
  msgstr ""
322
 
323
+ #: ../ml-slider.php:1259
324
+ msgid "Image Crop"
325
+ msgstr ""
326
+
327
+ #: ../ml-slider.php:1263
328
+ msgid "Smart"
329
+ msgstr ""
330
+
331
+ #: ../ml-slider.php:1264
332
+ msgid "Standard"
333
+ msgstr ""
334
+
335
+ #: ../ml-slider.php:1265
336
+ msgid "Disabled"
337
  msgstr ""
338
 
339
+ #: ../ml-slider.php:1267
340
  msgid ""
341
  "Smart Crop ensures your responsive slides are cropped to a ratio that "
342
  "results in a consistent slideshow size"
343
  msgstr ""
344
 
345
+ #: ../ml-slider.php:1272
346
  msgid "Carousel mode"
347
  msgstr ""
348
 
349
+ #: ../ml-slider.php:1275
350
  msgid "Display multiple slides at once. Slideshow output will be 100% wide."
351
  msgstr ""
352
 
353
+ #: ../ml-slider.php:1283
354
+ msgid "Carousel margin"
355
+ msgstr ""
356
+
357
+ #: ../ml-slider.php:1286
358
+ msgid "Pixel margin between slides in carousel."
359
+ msgstr ""
360
+
361
+ #: ../ml-slider.php:1295
362
  msgid "Randomise the order of the slides"
363
  msgstr ""
364
 
365
+ #: ../ml-slider.php:1300
366
  msgid "Hover pause"
367
  msgstr ""
368
 
369
+ #: ../ml-slider.php:1303
370
  msgid ""
371
  "Pause the slideshow when hovering over slider, then resume when no longer "
372
  "hovering."
373
  msgstr ""
374
 
375
+ #: ../ml-slider.php:1308
376
  msgid "Reverse"
377
  msgstr ""
378
 
379
+ #: ../ml-slider.php:1311
380
  msgid "Reverse the animation direction"
381
  msgstr ""
382
 
383
+ #: ../ml-slider.php:1321
384
  msgid "Slide delay"
385
  msgstr ""
386
 
387
+ #: ../ml-slider.php:1323
388
  msgid "How long to display each slide, in milliseconds"
389
  msgstr ""
390
 
391
+ #: ../ml-slider.php:1324 ../ml-slider.php:1337 ../ml-slider.php:1350
392
+ #: ../ml-slider.php:1426 ../ml-slider.php:1452
393
  msgid "ms"
394
  msgstr ""
395
 
396
+ #: ../ml-slider.php:1334
397
  msgid "Animation speed"
398
  msgstr ""
399
 
400
+ #: ../ml-slider.php:1336
401
  msgid "Set the speed of animations, in milliseconds"
402
  msgstr ""
403
 
404
+ #: ../ml-slider.php:1347 ../ml-slider.php:1349
405
  msgid "Number of slices"
406
  msgstr ""
407
 
408
+ #: ../ml-slider.php:1360 ../ml-slider.php:1362 ../ml-slider.php:1373
409
+ #: ../ml-slider.php:1375
410
  msgid "Number of squares"
411
  msgstr ""
412
 
413
+ #: ../ml-slider.php:1381
414
  msgid "Slide direction"
415
  msgstr ""
416
 
417
+ #: ../ml-slider.php:1383
418
  msgid "Select the sliding direction"
419
  msgstr ""
420
 
421
+ #: ../ml-slider.php:1386
422
  msgid "Horizontal"
423
  msgstr ""
424
 
425
+ #: ../ml-slider.php:1387
426
  msgid "Vertical"
427
  msgstr ""
428
 
429
+ #: ../ml-slider.php:1393
430
  msgid "Easing"
431
  msgstr ""
432
 
433
+ #: ../ml-slider.php:1395
434
  msgid "Animation easing effect"
435
  msgstr ""
436
 
437
+ #: ../ml-slider.php:1402
438
  msgid "Previous text"
439
  msgstr ""
440
 
441
+ #: ../ml-slider.php:1404
442
  msgid "Set the text for the 'previous' direction item"
443
  msgstr ""
444
 
445
+ #: ../ml-slider.php:1410
446
  msgid "Next text"
447
  msgstr ""
448
 
449
+ #: ../ml-slider.php:1412
450
  msgid "Set the text for the 'next' direction item"
451
  msgstr ""
452
 
453
+ #: ../ml-slider.php:1423
454
  msgid "Square delay"
455
  msgstr ""
456
 
457
+ #: ../ml-slider.php:1425
458
  msgid "Delay between squares in ms"
459
  msgstr ""
460
 
461
+ #: ../ml-slider.php:1436
462
  msgid "Opacity"
463
  msgstr ""
464
 
465
+ #: ../ml-slider.php:1438
466
  msgid "Opacity of title and navigation"
467
  msgstr ""
468
 
469
+ #: ../ml-slider.php:1449
470
  msgid "Caption speed"
471
  msgstr ""
472
 
473
+ #: ../ml-slider.php:1451
474
  msgid "Set the fade in speed of the caption"
475
  msgstr ""
476
 
477
+ #: ../ml-slider.php:1458
478
  msgid "Developer options"
479
  msgstr ""
480
 
481
+ #: ../ml-slider.php:1463
482
  msgid "CSS classes"
483
  msgstr ""
484
 
485
+ #: ../ml-slider.php:1465
486
  msgid ""
487
  "Specify any custom CSS Classes you would like to be added to the slider "
488
  "wrapper"
489
  msgstr ""
490
 
491
+ #: ../ml-slider.php:1471
492
  msgid "Print CSS"
493
  msgstr ""
494
 
495
+ #: ../ml-slider.php:1474
496
  msgid "Uncheck this is you would like to include your own CSS"
497
  msgstr ""
498
 
499
+ #: ../ml-slider.php:1479
500
  msgid "Print JS"
501
  msgstr ""
502
 
503
+ #: ../ml-slider.php:1482
504
  msgid "Uncheck this is you would like to include your own Javascript"
505
  msgstr ""
506
 
507
+ #: ../ml-slider.php:1487
508
  msgid "No conflict mode"
509
  msgstr ""
510
 
511
+ #: ../ml-slider.php:1490
512
  msgid "Delay adding the flexslider class to the slideshow"
513
  msgstr ""
514
 
515
+ #: ../ml-slider.php:1504
516
  msgid "Usage"
517
  msgstr ""
518
 
519
+ #: ../ml-slider.php:1507
520
  msgid "Shortcode"
521
  msgstr ""
522
 
523
+ #: ../ml-slider.php:1508
524
  msgid "Template Include"
525
  msgstr ""
526
 
527
+ #: ../ml-slider.php:1512
528
  msgid "Copy & paste the shortcode directly into any WordPress post or page."
529
  msgstr ""
530
 
531
+ #: ../ml-slider.php:1515
532
  msgid ""
533
  "Copy & paste this code into a template file to include the slideshow within "
534
  "your theme."
535
  msgstr ""
536
 
537
+ #: ../ml-slider.php:1544
538
  msgid "Delete Slider"
539
  msgstr ""
540
 
541
+ #: ../ml-slider.php:1565
 
 
 
 
 
 
 
 
542
  msgid "Select slideshow to insert into post"
543
  msgstr ""
544
 
545
+ #: ../ml-slider.php:1568
546
  msgid "Add slider"
547
  msgstr ""
548
 
549
+ #: ../ml-slider.php:1602
550
  msgid "Insert Meta Slider"
551
  msgstr ""
552
 
553
+ #: ../ml-slider.php:1604
554
  msgid "Choose slideshow"
555
  msgstr ""
556
 
557
+ #: ../ml-slider.php:1611 ../inc/metaslider.widget.class.php:121
558
  msgid "No slideshows found"
559
  msgstr ""
560
 
561
+ #: ../ml-slider.php:1628
562
+ msgid "Go Pro"
563
+ msgstr ""
564
+
565
+ #: ../ml-slider.php:1684
566
+ msgid "Upgrade to Pro $19"
567
+ msgstr ""
568
+
569
  #: ../inc/metaslider.widget.class.php:18
570
  msgid "Meta Slider"
571
  msgstr ""
572
 
573
+ #: ../inc/metaslider.widget.class.php:108
574
  msgid "Title:"
575
  msgstr ""
576
 
577
+ #: ../inc/metaslider.widget.class.php:111
578
  msgid "Select Slider:"
579
  msgstr ""
580
 
582
  msgid "Security check failed. Refresh page and try again."
583
  msgstr ""
584
 
585
+ #: ../inc/slide/metaslide.image.class.php:39
586
  msgid "Failed to add slide. Slide already exists in slideshow."
587
  msgstr ""
588
 
589
+ #: ../inc/slide/metaslide.image.class.php:43
590
  msgid "Failed to add slide. Slide is not of type 'image'."
591
  msgstr ""
592
 
593
+ #: ../inc/slide/metaslide.image.class.php:107
594
  msgid "Image Slide"
595
  msgstr ""
596
 
597
+ #: ../inc/slide/metaslide.image.class.php:153
598
+ msgid "Warning: Image data does not exist. Please re-upload the image."
599
  msgstr ""
600
 
601
+ #: ../inc/slide/metaslide.image.class.php:158
602
+ msgid "Image Title Text"
603
  msgstr ""
604
 
605
+ #: ../inc/slide/metaslide.image.class.php:160
606
+ msgid "Image Alt Text"
607
  msgstr ""
608
 
609
+ #: ../inc/slide/metaslide.image.class.php:163
610
+ msgid "Crop Position"
611
  msgstr ""
612
 
613
+ #: ../inc/slide/metaslide.image.class.php:166
614
+ msgid "Top Left"
615
+ msgstr ""
616
+
617
+ #: ../inc/slide/metaslide.image.class.php:167
618
+ msgid "Top Center"
619
+ msgstr ""
620
+
621
+ #: ../inc/slide/metaslide.image.class.php:168
622
+ msgid "Top Right"
623
+ msgstr ""
624
+
625
+ #: ../inc/slide/metaslide.image.class.php:169
626
+ msgid "Center Left"
627
+ msgstr ""
628
+
629
+ #: ../inc/slide/metaslide.image.class.php:170
630
+ msgid "Center Center"
631
+ msgstr ""
632
+
633
+ #: ../inc/slide/metaslide.image.class.php:171
634
+ msgid "Center Right"
635
+ msgstr ""
636
+
637
+ #: ../inc/slide/metaslide.image.class.php:172
638
+ msgid "Bottom Left"
639
+ msgstr ""
640
+
641
+ #: ../inc/slide/metaslide.image.class.php:173
642
+ msgid "Bottom Center"
643
+ msgstr ""
644
+
645
+ #: ../inc/slide/metaslide.image.class.php:174
646
+ msgid "Bottom Right"
647
+ msgstr ""
648
+
649
+ #: ../inc/slide/metaslide.image.class.php:180
650
+ msgid "General"
651
+ msgstr ""
652
+
653
+ #: ../inc/slide/metaslide.image.class.php:184
654
+ msgid "SEO"
655
+ msgstr ""
656
+
657
+ #: ../inc/slide/metaslide.image.class.php:192
658
+ msgid "Crop"
659
  msgstr ""
ml-slider.php CHANGED
@@ -5,9 +5,9 @@
5
  * Plugin Name: Meta Slider
6
  * Plugin URI: http://www.metaslider.com
7
  * Description: Easy to use slideshow plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides.
8
- * Version: 2.9.1
9
  * Author: Matcha Labs
10
- * Author URI: http://www.matchalabs.com
11
  * License: GPL-2.0+
12
  * Copyright: 2014 Matcha Labs LTD
13
  *
@@ -31,7 +31,7 @@ class MetaSliderPlugin {
31
  /**
32
  * @var string
33
  */
34
- public $version = '2.9.1';
35
 
36
 
37
  /**
@@ -263,9 +263,11 @@ class MetaSliderPlugin {
263
  */
264
  public function register_admin_menu() {
265
 
266
- $title = apply_filters( 'metaslider_menu_title', "Meta Slider" );
267
 
268
- $page = add_menu_page( $title, $title, 'edit_others_posts', 'metaslider', array(
 
 
269
  $this, 'render_admin_page'
270
  ), METASLIDER_ASSETS_URL . 'metaslider/matchalabs.png', 9501 );
271
 
@@ -284,17 +286,23 @@ class MetaSliderPlugin {
284
  */
285
  public function register_shortcode( $atts ) {
286
 
287
- if ( !isset( $atts['id'] ) ) {
 
 
 
 
 
 
288
  return false;
289
  }
290
 
291
  // handle [metaslider id=123 restrict_to=home]
292
- if ( isset( $atts['restrict_to'] ) && $atts['restrict_to'] == 'home' && ! is_front_page() ) {
293
  return;
294
  }
295
 
296
  // we have an ID to work with
297
- $slider = get_post( $atts['id'] );
298
 
299
  // check the slider is published and the ID is correct
300
  if ( ! $slider || $slider->post_status != 'publish' || $slider->post_type != 'ml-slider' ) {
@@ -302,7 +310,7 @@ class MetaSliderPlugin {
302
  }
303
 
304
  // lets go
305
- $this->set_slider( $atts['id'], $atts );
306
  $this->slider->enqueue_scripts();
307
 
308
  return $this->slider->render_public_slides();
@@ -407,14 +415,28 @@ class MetaSliderPlugin {
407
 
408
  if ( isset( $_GET['slider_id'] ) && absint( $_GET['slider_id'] ) > 0 ) {
409
  $id = absint( $_GET['slider_id'] );
410
-
411
- echo "<!DOCTYPE html>";
412
- echo "<html><head>";
413
- echo "<style>body, html { overflow: hidden; margin: 0; padding: 0; }</style>";
414
- echo "</head><body>";
415
- echo do_shortcode("[metaslider id={$id}]");
416
- wp_footer();
417
- echo "</body></html>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
418
  }
419
 
420
  die();
@@ -546,6 +568,12 @@ class MetaSliderPlugin {
546
  return;
547
  }
548
 
 
 
 
 
 
 
549
  // handle switching view
550
  if ( isset( $_GET['view'] ) ) {
551
  $this->switch_view();
@@ -721,20 +749,21 @@ class MetaSliderPlugin {
721
 
722
  $args = apply_filters( 'metaslider_all_meta_sliders_args', $args );
723
 
724
- $the_query = new WP_Query( $args );
 
 
725
 
726
- while ( $the_query->have_posts() ) {
727
- $the_query->the_post();
728
- $active = $this->slider && ( $this->slider->id == $the_query->post->ID ) ? true : false;
729
 
730
  $sliders[] = array(
731
  'active' => $active,
732
- 'title' => get_the_title(),
733
- 'id' => $the_query->post->ID
734
  );
735
- }
736
 
737
- wp_reset_query();
738
 
739
  return $sliders;
740
 
@@ -838,7 +867,7 @@ class MetaSliderPlugin {
838
 
839
  // number input type
840
  if ( $row['type'] == 'number' ) {
841
- $return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='number' min='{$row['min']}' max='{$row['max']}' step='{$row['step']}' name='settings[{$id}]' value='{$row['value']}' /><span class='after'>{$row['after']}</span></td></tr>";
842
  }
843
 
844
  // select drop down
@@ -868,7 +897,7 @@ class MetaSliderPlugin {
868
 
869
  // text input type
870
  if ( $row['type'] == 'text' ) {
871
- $return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='text' name='settings[{$id}]' value='{$row['value']}' /></td></tr>";
872
  }
873
 
874
  // text input type
@@ -878,7 +907,7 @@ class MetaSliderPlugin {
878
 
879
  // text input type
880
  if ( $row['type'] == 'title' ) {
881
- $return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='text' name='{$id}' value='{$row['value']}' /></td></tr>";
882
  }
883
  }
884
 
@@ -937,9 +966,9 @@ class MetaSliderPlugin {
937
  foreach ( $tabs as $tab ) {
938
 
939
  if ( $tab['active'] ) {
940
- echo "<div class='nav-tab nav-tab-active'><input type='text' name='title' value='" . $tab['title'] . "' onfocus='this.style.width = ((this.value.length + 1) * 9) + \"px\"' /></div>";
941
  } else {
942
- echo "<a href='?page=metaslider&amp;id={$tab['id']}' class='nav-tab'>" . $tab['title'] . "</a>";
943
  }
944
 
945
  }
@@ -1073,7 +1102,7 @@ class MetaSliderPlugin {
1073
  <span class="spinner"></span>
1074
  </h3>
1075
  <div class="inside">
1076
- <table class="widefat settings">
1077
  <tbody>
1078
  <?php
1079
  $aFields = array(
@@ -1232,10 +1261,15 @@ class MetaSliderPlugin {
1232
  ),
1233
  'smartCrop' => array(
1234
  'priority' => 30,
1235
- 'type' => 'checkbox',
1236
- 'label' => __( "Smart crop", "metaslider" ),
1237
  'class' => 'option coin flex nivo responsive',
1238
- 'checked' => $this->slider->get_setting( 'smartCrop' ) == 'true' ? 'checked' : '',
 
 
 
 
 
1239
  'helptext' => __( "Smart Crop ensures your responsive slides are cropped to a ratio that results in a consistent slideshow size", "metaslider" )
1240
  ),
1241
  'carouselMode' => array(
5
  * Plugin Name: Meta Slider
6
  * Plugin URI: http://www.metaslider.com
7
  * Description: Easy to use slideshow plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides.
8
+ * Version: 3.0.1
9
  * Author: Matcha Labs
10
+ * Author URI: http://www.metaslider.com
11
  * License: GPL-2.0+
12
  * Copyright: 2014 Matcha Labs LTD
13
  *
31
  /**
32
  * @var string
33
  */
34
+ public $version = '3.0.1';
35
 
36
 
37
  /**
263
  */
264
  public function register_admin_menu() {
265
 
266
+ $title = apply_filters( 'metaslider_menu_title', 'Meta Slider' );
267
 
268
+ $capability = apply_filters( 'metaslider_capability', 'edit_others_posts' );
269
+
270
+ $page = add_menu_page( $title, $title, $capability, 'metaslider', array(
271
  $this, 'render_admin_page'
272
  ), METASLIDER_ASSETS_URL . 'metaslider/matchalabs.png', 9501 );
273
 
286
  */
287
  public function register_shortcode( $atts ) {
288
 
289
+ extract( shortcode_atts( array(
290
+ 'id' => false,
291
+ 'restrict_to' => false
292
+ ), $atts, 'metaslider' ) );
293
+
294
+
295
+ if ( ! $id ) {
296
  return false;
297
  }
298
 
299
  // handle [metaslider id=123 restrict_to=home]
300
+ if ( $restrict_to == 'home' && ! is_front_page() ) {
301
  return;
302
  }
303
 
304
  // we have an ID to work with
305
+ $slider = get_post( $id );
306
 
307
  // check the slider is published and the ID is correct
308
  if ( ! $slider || $slider->post_status != 'publish' || $slider->post_type != 'ml-slider' ) {
310
  }
311
 
312
  // lets go
313
+ $this->set_slider( $id, $atts );
314
  $this->slider->enqueue_scripts();
315
 
316
  return $this->slider->render_public_slides();
415
 
416
  if ( isset( $_GET['slider_id'] ) && absint( $_GET['slider_id'] ) > 0 ) {
417
  $id = absint( $_GET['slider_id'] );
418
+
419
+ ?>
420
+ <!DOCTYPE html>
421
+ <html>
422
+ <head>
423
+ <style type='text/css'>
424
+ body, html {
425
+ overflow: hidden;
426
+ margin: 0;
427
+ padding: 0;
428
+ }
429
+ </style>
430
+ <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
431
+ <meta http-equiv="Pragma" content="no-cache" />
432
+ <meta http-equiv="Expires" content="0" />
433
+ </head>
434
+ <body>
435
+ <?php echo do_shortcode("[metaslider id={$id}]"); ?>
436
+ <?php wp_footer(); ?>
437
+ </body>
438
+ </html>
439
+ <?php
440
  }
441
 
442
  die();
568
  return;
569
  }
570
 
571
+ $capability = apply_filters( 'metaslider_capability', 'edit_others_posts' );
572
+
573
+ if ( ! current_user_can( $capability ) ) {
574
+ return;
575
+ }
576
+
577
  // handle switching view
578
  if ( isset( $_GET['view'] ) ) {
579
  $this->switch_view();
749
 
750
  $args = apply_filters( 'metaslider_all_meta_sliders_args', $args );
751
 
752
+ // WP_Query causes issues with other plugins using admin_footer to insert scripts
753
+ // use get_posts instead
754
+ $all_sliders = get_posts( $args );
755
 
756
+ foreach( $all_sliders as $slideshow ) {
757
+
758
+ $active = $this->slider && ( $this->slider->id == $slideshow->ID ) ? true : false;
759
 
760
  $sliders[] = array(
761
  'active' => $active,
762
+ 'title' => $slideshow->post_title,
763
+ 'id' => $slideshow->ID
764
  );
 
765
 
766
+ }
767
 
768
  return $sliders;
769
 
867
 
868
  // number input type
869
  if ( $row['type'] == 'number' ) {
870
+ $return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='number' min='{$row['min']}' max='{$row['max']}' step='{$row['step']}' name='settings[{$id}]' value='" . absint( $row['value'] ) . "' /><span class='after'>{$row['after']}</span></td></tr>";
871
  }
872
 
873
  // select drop down
897
 
898
  // text input type
899
  if ( $row['type'] == 'text' ) {
900
+ $return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='text' name='settings[{$id}]' value='" . esc_attr( $row['value'] ) . "' /></td></tr>";
901
  }
902
 
903
  // text input type
907
 
908
  // text input type
909
  if ( $row['type'] == 'title' ) {
910
+ $return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='text' name='{$id}' value='" . esc_attr( $row['value'] ) . "' /></td></tr>";
911
  }
912
  }
913
 
966
  foreach ( $tabs as $tab ) {
967
 
968
  if ( $tab['active'] ) {
969
+ echo "<div class='nav-tab nav-tab-active'><input type='text' name='title' value='" . esc_attr( $tab['title'] ) . "' onfocus='this.style.width = ((this.value.length + 1) * 9) + \"px\"' /></div>";
970
  } else {
971
+ echo "<a href='?page=metaslider&amp;id={$tab['id']}' class='nav-tab'>" . esc_html( $tab['title'] ) . "</a>";
972
  }
973
 
974
  }
1102
  <span class="spinner"></span>
1103
  </h3>
1104
  <div class="inside">
1105
+ <table class="settings">
1106
  <tbody>
1107
  <?php
1108
  $aFields = array(
1261
  ),
1262
  'smartCrop' => array(
1263
  'priority' => 30,
1264
+ 'type' => 'select',
1265
+ 'label' => __( "Image Crop", "metaslider" ),
1266
  'class' => 'option coin flex nivo responsive',
1267
+ 'value' => $this->slider->get_setting( 'smartCrop' ),
1268
+ 'options' => array(
1269
+ 'true' => array( 'label' => __( "Smart", "metaslider" ), 'class' => '' ),
1270
+ 'false' => array( 'label' => __( "Standard", "metaslider" ), 'class' => '' ),
1271
+ 'disabled' => array( 'label' => __( "Disabled", "metaslider" ), 'class' => '' ),
1272
+ ),
1273
  'helptext' => __( "Smart Crop ensures your responsive slides are cropped to a ratio that results in a consistent slideshow size", "metaslider" )
1274
  ),
1275
  'carouselMode' => array(
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: matchalabs
3
  Tags: wordpress slideshow,seo,slideshow,slider,widget,wordpress slider,image slider,flexslider,flex slider,nivoslider,nivo slider,responsive,responsive slides,coinslider,coin slider,slideshow,carousel,responsive slider,vertical slides
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CQ84KC4X8YKW8
5
  Requires at least: 3.5
6
- Tested up to: 3.9
7
- Stable tag: 2.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,7 +12,7 @@ Easy to use WordPress slider plugin. Create SEO optimised responsive slideshows
12
 
13
  == Description ==
14
 
15
- http://www.youtube.com/watch?v=I7IfkV6iLqo
16
 
17
  The most popular WordPress slider plugin. Creating slideshows with [Meta Slider](http://www.metaslider.com/) is fast and easy. Simply select images from your WordPress Media Library, drag and drop them into place, set slide captions, links and SEO fields all from one page. You can choose from 4 different slideshow types (Flex Slider, Nivo Slider, Responsive Slides & Coin Slider) and use the provided shortcode or template include to easily embed slideshows in your blog.
18
 
@@ -32,6 +32,7 @@ The most popular WordPress slider plugin. Creating slideshows with [Meta Slider]
32
  * Drag and drop slide reordering
33
  * Admin preview
34
  * Intelligent image cropping
 
35
  * Built in Widget and Shortcode
36
  * Loads of slideshow configuration options - transition effect, speed etc (per slideshow)
37
  * Fully localised
@@ -39,7 +40,8 @@ The most popular WordPress slider plugin. Creating slideshows with [Meta Slider]
39
  * Compatible with translation plugins (WPML, PolyLang & qTranslate)
40
  * Extensive Developer API (hooks & filters)
41
  * Fast - only the minimum JavaScript/CSS is included on your page
42
- * Free, active, basic support (covering installation issues and theme/plugin conflicts)
 
43
 
44
  Upgrade to [Meta Slider Pro](http://www.metaslider.com/upgrade) to add support for:
45
 
@@ -69,13 +71,15 @@ Upgrade to [Meta Slider Pro](http://www.metaslider.com/upgrade) to add support f
69
 
70
  Read more and thanks to:
71
 
72
- * [http://flexslider.woothemes.com/](http://flexslider.woothemes.com/)
73
- * [http://responsive-slides.viljamis.com/](http://responsive-slides.viljamis.com/)
74
- * [http://workshop.rs/projects/coin-slider/](http://workshop.rs/projects/coin-slider/)
75
- * [http://dev7studios.com/nivo-slider/](http://dev7studios.com/nivo-slider/)
76
 
77
  Find out more at http://www.metaslider.com
78
 
 
 
79
  == Installation ==
80
 
81
  The easy way:
@@ -140,6 +144,21 @@ See www.metaslider.com/documentation/image-cropping/
140
 
141
  == Changelog ==
142
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  = 2.9.1 [15/07/14] =
144
 
145
  * New feature: Hungarian Language Pack added
3
  Tags: wordpress slideshow,seo,slideshow,slider,widget,wordpress slider,image slider,flexslider,flex slider,nivoslider,nivo slider,responsive,responsive slides,coinslider,coin slider,slideshow,carousel,responsive slider,vertical slides
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CQ84KC4X8YKW8
5
  Requires at least: 3.5
6
+ Tested up to: 4.0
7
+ Stable tag: 3.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ http://www.youtube.com/watch?v=o0f3uAvL6Ic
16
 
17
  The most popular WordPress slider plugin. Creating slideshows with [Meta Slider](http://www.metaslider.com/) is fast and easy. Simply select images from your WordPress Media Library, drag and drop them into place, set slide captions, links and SEO fields all from one page. You can choose from 4 different slideshow types (Flex Slider, Nivo Slider, Responsive Slides & Coin Slider) and use the provided shortcode or template include to easily embed slideshows in your blog.
18
 
32
  * Drag and drop slide reordering
33
  * Admin preview
34
  * Intelligent image cropping
35
+ * Set image crop position
36
  * Built in Widget and Shortcode
37
  * Loads of slideshow configuration options - transition effect, speed etc (per slideshow)
38
  * Fully localised
40
  * Compatible with translation plugins (WPML, PolyLang & qTranslate)
41
  * Extensive Developer API (hooks & filters)
42
  * Fast - only the minimum JavaScript/CSS is included on your page
43
+ * Free basic support (covering installation issues and theme/plugin conflicts)
44
+ * Lightbox support with the [Meta Slider Lightbox](http://wordpress.org/plugins/ml-slider-lightbox/) addon
45
 
46
  Upgrade to [Meta Slider Pro](http://www.metaslider.com/upgrade) to add support for:
47
 
71
 
72
  Read more and thanks to:
73
 
74
+ * [Flex Slider](http://flexslider.woothemes.com/)
75
+ * [Responsive Slides](http://responsive-slides.viljamis.com/)
76
+ * [Coin Slider](http://workshop.rs/projects/coin-slider/)
77
+ * [Nivo Slider](http://dev7studios.com/nivo-slider/)
78
 
79
  Find out more at http://www.metaslider.com
80
 
81
+ Follow us on Twitter: [@wpmetaslider](https://twitter.com/wpmetaslider)
82
+
83
  == Installation ==
84
 
85
  The easy way:
144
 
145
  == Changelog ==
146
 
147
+ = 3.0.1 [19/08/14] =
148
+
149
+ * Fix: Escape admin setting text fields
150
+ * Fix: Escape admin tab names (thanks to Dylan Irzi for spotting and reporting this!)
151
+ * Change: Allow shortcode parameters to be filtered
152
+
153
+ = 3.0 [30/07/14] =
154
+
155
+ **This is not a major update. We're just following the WordPress versioning conventions (3.0 comes after 2.9)**
156
+
157
+ * New feature: Set crop position for slides (requires WP 3.9+)
158
+ * New feature: Disable cropping setting
159
+ * Fix: Use get_posts instead of WP_Query to extract slideshows (fix conflicts with plugins using get_post_type in admin_footer hooks)
160
+ * Change: Add filter for capability required to use meta slider
161
+
162
  = 2.9.1 [15/07/14] =
163
 
164
  * New feature: Hungarian Language Pack added