Shortcodes Ultimate - Version 4.0.7

Version Description

  • Added backward compatibility for [frame]
Download this release

Release Info

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

Code changes from version 4.0.6 to 4.0.7

assets/css/content-shortcodes.css CHANGED
@@ -139,6 +139,44 @@
139
  text-align: left;
140
  }
141
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  /* List
143
  ---------------------------------------------------------------*/
144
 
139
  text-align: left;
140
  }
141
 
142
+ /* Frame
143
+ ---------------------------------------------------------------*/
144
+
145
+ .su-frame,
146
+ .su-frame-inner { display: block; }
147
+ .su-frame-align-left {
148
+ float: left;
149
+ margin: 0 1em 1em 0;
150
+ }
151
+ .su-frame-align-center {
152
+ float: none;
153
+ margin: 1em auto;
154
+ }
155
+ .su-frame-align-right {
156
+ float: right;
157
+ margin: 0 0 1em 1em;
158
+ }
159
+ .su-frame img {
160
+ display: block !important;
161
+ float: none !important;
162
+ padding: 0 !important;
163
+ margin: 0 !important;
164
+ border: none !important;
165
+ box-shadow: none !important;
166
+ }
167
+ .su-frame-style-default {
168
+ padding: 2px;
169
+ border: 1px solid #999;
170
+ background: #fff;
171
+ -webkit-box-shadow: 1px 1px 4px #ccc;
172
+ -moz-box-shadow: 1px 1px 4px #ccc;
173
+ box-shadow: 1px 1px 4px #ccc;
174
+ }
175
+ .su-frame-style-default .su-frame-inner {
176
+ padding: 2px;
177
+ border: 4px solid #eee;
178
+ }
179
+
180
  /* List
181
  ---------------------------------------------------------------*/
182
 
assets/images/demo/frame.png ADDED
Binary file
assets/images/icons/frame.png ADDED
Binary file
assets/js/other-shortcodes.js CHANGED
@@ -52,4 +52,9 @@ jQuery(document).ready(function ($) {
52
  }
53
  });
54
  });
 
 
 
 
 
55
  });
52
  }
53
  });
54
  });
55
+ // Frame
56
+ $('.su-frame-align-center, .su-frame-align-none').each(function() {
57
+ var frame_width = $(this).find('img').width();
58
+ $(this).css('width', frame_width + 12);
59
+ });
60
  });
inc/core/class.data.php CHANGED
@@ -358,6 +358,33 @@ class Shortcodes_Ultimate_Data {
358
  'usage' => '[dropcap style="default"]D[/dropcap]ropcap', 'content' => __( 'D', 'su' ),
359
  'desc' => __( 'Dropcap', 'su' )
360
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
361
  // row
362
  'row' => array(
363
  'name' => __( 'Row', 'su' ),
358
  'usage' => '[dropcap style="default"]D[/dropcap]ropcap', 'content' => __( 'D', 'su' ),
359
  'desc' => __( 'Dropcap', 'su' )
360
  ),
361
+ // frame
362
+ 'frame' => array(
363
+ 'name' => __( 'Frame', 'su' ),
364
+ 'type' => 'wrap',
365
+ 'group' => 'content',
366
+ 'atts' => array(
367
+ 'align' => array(
368
+ 'type' => 'select',
369
+ 'values' => array(
370
+ 'left',
371
+ 'center',
372
+ 'right'
373
+ ),
374
+ 'default' => 'left',
375
+ 'name' => __( 'Align', 'su' ),
376
+ 'desc' => __( 'Frame alignment', 'su' )
377
+ ),
378
+ 'class' => array(
379
+ 'default' => '',
380
+ 'name' => __( 'Class', 'su' ),
381
+ 'desc' => __( 'Extra CSS class', 'su' )
382
+ )
383
+ ),
384
+ 'usage' => '[frame align="center"]<img src="image.jpg">[/frame]',
385
+ 'content' => __( '<img src="http://lorempixel.com/g/400/200/" />', 'su' ),
386
+ 'desc' => __( 'Styled image frame', 'su' )
387
+ ),
388
  // row
389
  'row' => array(
390
  'name' => __( 'Row', 'su' ),
inc/core/shortcodes.php CHANGED
@@ -227,9 +227,26 @@ function su_dropcap_shortcode( $atts, $content = null ) {
227
  // Calculate font-size
228
  $em = $atts['size'] * 0.5 . 'em';
229
  su_query_asset( 'css', 'su-content-shortcodes' );
230
- return
231
- '<span class="su-dropcap su-dropcap-style-' . $atts['style'] . su_ecssc( $atts ) . '" style="font-size:' .
232
- $em . '">' . $content . '</span>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
233
  }
234
 
235
  /**
227
  // Calculate font-size
228
  $em = $atts['size'] * 0.5 . 'em';
229
  su_query_asset( 'css', 'su-content-shortcodes' );
230
+ return '<span class="su-dropcap su-dropcap-style-' . $atts['style'] . su_ecssc( $atts ) . '" style="font-size:' . $em . '">' . $content . '</span>';
231
+ }
232
+
233
+ /**
234
+ * Shortcode: frame
235
+ *
236
+ * @param array $atts Shortcode attributes
237
+ * @param string $content
238
+ *
239
+ * @return string Output html
240
+ */
241
+ function su_frame_shortcode( $atts, $content = null ) {
242
+ $atts = shortcode_atts( array(
243
+ 'style' => 'default',
244
+ 'align' => 'left',
245
+ 'class' => ''
246
+ ), $atts );
247
+ su_query_asset( 'css', 'su-content-shortcodes' );
248
+ su_query_asset( 'js', 'su-other-shortcodes' );
249
+ return '<span class="su-frame su-frame-align-' . $atts['align'] . ' su-frame-style-' . $atts['style'] . su_ecssc( $atts ) . '"><span class="su-frame-inner">' . $content . '</span></span>';
250
  }
251
 
252
  /**
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
5
  Tags: shortcode, shortcodes, short code, video, responsive, responsive video, youtube, vimeo, audio, mp3, tab, tabs, button, buttons, jquery, box, boxes, toggle, spoiler, column, columns, services, service, pullquote, list, lists, images, image, links, fancy, fancy link, fancy links, fancy buttons, jquery tabs, accordion, slider, plugin, admin, gallery, bloginfo, list pages, sub pages, navigation, siblings pages, children pages, permalink, permalinks, feed, document, member, members, guests, membership, documents, carousel, rss, touch, icon, icons
6
  Requires at least: 3.4
7
  Tested up to: 4.0
8
- Stable tag: 4.0.6
9
 
10
  Supercharge your WordPress theme with mega pack of shortcodes
11
 
@@ -86,6 +86,9 @@ Upgrade normally via your Wordpress admin -> Plugins panel.
86
 
87
  == Changelog ==
88
 
 
 
 
89
  = 4.0.6 =
90
  * Fixed [column] margins
91
 
5
  Tags: shortcode, shortcodes, short code, video, responsive, responsive video, youtube, vimeo, audio, mp3, tab, tabs, button, buttons, jquery, box, boxes, toggle, spoiler, column, columns, services, service, pullquote, list, lists, images, image, links, fancy, fancy link, fancy links, fancy buttons, jquery tabs, accordion, slider, plugin, admin, gallery, bloginfo, list pages, sub pages, navigation, siblings pages, children pages, permalink, permalinks, feed, document, member, members, guests, membership, documents, carousel, rss, touch, icon, icons
6
  Requires at least: 3.4
7
  Tested up to: 4.0
8
+ Stable tag: 4.0.7
9
 
10
  Supercharge your WordPress theme with mega pack of shortcodes
11
 
86
 
87
  == Changelog ==
88
 
89
+ = 4.0.7 =
90
+ * Added backward compatibility for [frame]
91
+
92
  = 4.0.6 =
93
  * Fixed [column] margins
94
 
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.0.6
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.0.7
6
  Author: Vladimir Anokhin
7
  Author URI: http://gndev.info/
8
  Description: Supercharge your WordPress theme with mega pack of shortcodes