Shortcodes Ultimate - Version 4.5.2

Version Description

  • Updated custom formatting filter
  • Updated Japanese translation
  • Added NL translation
  • Minor fixes
Download this release

Release Info

Developer gn_themes
Plugin Icon 128x128 Shortcodes Ultimate
Version 4.5.2
Comparing to
See all releases

Code changes from version 4.5.1 to 4.5.2

assets/js/generator.js CHANGED
@@ -637,7 +637,7 @@ jQuery(document).ready(function ($) {
637
  // Presets manager - mouseenter
638
  $('#su-generator').on('mouseenter click', '.su-generator-presets', function () {
639
  clearTimeout(gp_hover_timer);
640
- $('.su-gp-popup').fadeIn(200);
641
  });
642
  // Presets manager - mouseleave
643
  $('#su-generator').on('mouseleave', '.su-generator-presets', function () {
@@ -775,7 +775,9 @@ jQuery(document).ready(function ($) {
775
  else value = $this.val();
776
  // Check that value is not empty
777
  if (value == null) value = '';
778
- else if (value !== '') result += ' ' + $(this).attr('name') + '="' + $(this).val().toString().replace(/"/gi, "'") + '"';
 
 
779
  });
780
  // End of opening tag
781
  result += ']';
637
  // Presets manager - mouseenter
638
  $('#su-generator').on('mouseenter click', '.su-generator-presets', function () {
639
  clearTimeout(gp_hover_timer);
640
+ $('.su-gp-popup').show();
641
  });
642
  // Presets manager - mouseleave
643
  $('#su-generator').on('mouseleave', '.su-generator-presets', function () {
775
  else value = $this.val();
776
  // Check that value is not empty
777
  if (value == null) value = '';
778
+ else if (typeof value === 'array') value = value.join(',');
779
+ // Add attribute
780
+ if (value !== '') result += ' ' + $(this).attr('name') + '="' + $(this).val().toString().replace(/"/gi, "'") + '"';
781
  });
782
  // End of opening tag
783
  result += ']';
inc/core/generator-views.php CHANGED
@@ -27,15 +27,11 @@ class Su_Generator_Views {
27
  }
28
 
29
  public static function select( $id, $field ) {
30
- // Detect array type (numbers or strings with translations)
31
- $is_numbers = is_numeric( implode( '', array_keys( $field['values'] ) ) );
32
  // Multiple selects
33
  $multiple = ( isset( $field['multiple'] ) ) ? ' multiple' : '';
34
  $return = '<select name="' . $id . '" id="su-generator-attr-' . $id . '" class="su-generator-attr"' . $multiple . '>';
35
  // Create options
36
  foreach ( $field['values'] as $option_value => $option_title ) {
37
- // Values is indexed array, replace array keys by titles
38
- if ( $is_numbers ) $option_value = $option_title;
39
  // Is this option selected
40
  $selected = ( $field['default'] === $option_value ) ? ' selected="selected"' : '';
41
  // Create option
27
  }
28
 
29
  public static function select( $id, $field ) {
 
 
30
  // Multiple selects
31
  $multiple = ( isset( $field['multiple'] ) ) ? ' multiple' : '';
32
  $return = '<select name="' . $id . '" id="su-generator-attr-' . $id . '" class="su-generator-attr"' . $multiple . '>';
33
  // Create options
34
  foreach ( $field['values'] as $option_value => $option_title ) {
 
 
35
  // Is this option selected
36
  $selected = ( $field['default'] === $option_value ) ? ' selected="selected"' : '';
37
  // Create option
inc/core/generator.php CHANGED
@@ -185,6 +185,7 @@ class Su_Generator {
185
  // Output results
186
  do_action( 'su/generator/preview/before' );
187
  echo '<h5>' . __( 'Preview', 'su' ) . '</h5>';
 
188
  echo do_shortcode( str_replace( '\"', '"', $_POST['shortcode'] ) );
189
  echo '<div style="clear:both"></div>';
190
  do_action( 'su/generator/preview/after' );
185
  // Output results
186
  do_action( 'su/generator/preview/before' );
187
  echo '<h5>' . __( 'Preview', 'su' ) . '</h5>';
188
+ // echo '<hr />' . stripslashes( $_POST['shortcode'] ) . '<hr />'; // Uncomment for debug
189
  echo do_shortcode( str_replace( '\"', '"', $_POST['shortcode'] ) );
190
  echo '<div style="clear:both"></div>';
191
  do_action( 'su/generator/preview/after' );
inc/core/shortcodes.php CHANGED
@@ -1127,7 +1127,7 @@ class Su_Shortcodes {
1127
  $args['post__in'] = $posts_in;
1128
  }
1129
  // Post Author
1130
- if ( !empty( $author ) ) $args['author_name'] = $author;
1131
  // Offset
1132
  if ( !empty( $offset ) ) $args['offset'] = $offset;
1133
  // Post Status
1127
  $args['post__in'] = $posts_in;
1128
  }
1129
  // Post Author
1130
+ if ( !empty( $author ) ) $args['author'] = $author;
1131
  // Offset
1132
  if ( !empty( $offset ) ) $args['offset'] = $offset;
1133
  // Post Status
readme.txt CHANGED
@@ -95,7 +95,7 @@ Activate plugin at "Plugins" administration page.
95
 
96
  == Changelog ==
97
 
98
- = 4.5.1 =
99
  * Updated custom formatting filter
100
  * Updated Japanese translation
101
  * Added NL translation
95
 
96
  == Changelog ==
97
 
98
+ = 4.5.2 =
99
  * Updated custom formatting filter
100
  * Updated Japanese translation
101
  * Added NL translation
shortcodes-ultimate.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Shortcodes Ultimate
4
  Plugin URI: http://gndev.info/shortcodes-ultimate/
5
- Version: 4.5.1
6
  Author: Vladimir Anokhin
7
  Author URI: http://gndev.info/
8
  Description: Supercharge your WordPress theme with mega pack of shortcodes
2
  /*
3
  Plugin Name: Shortcodes Ultimate
4
  Plugin URI: http://gndev.info/shortcodes-ultimate/
5
+ Version: 4.5.2
6
  Author: Vladimir Anokhin
7
  Author URI: http://gndev.info/
8
  Description: Supercharge your WordPress theme with mega pack of shortcodes