Shortcodes Ultimate - Version 4.0.5

Version Description

  • Added backward compatibility for [tabs]. Now it accepts style=3 and vertical attributes
  • Added backward compatibility for [spoiler]. Now it accepts 0 and 1 as values for attribute open. Also, it now accepts style attribute (1, 2, default, fancy, simple)
  • Added custom CSS import from previous versions. Styles will be imported automatically and prepended to the existing CSS-code
Download this release

Release Info

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

Code changes from version 4.0.4 to 4.0.5

assets/css/box-shortcodes.css CHANGED
@@ -71,6 +71,10 @@
71
 
72
  .su-spoiler { margin-bottom: 1.5em; }
73
  .su-spoiler .su-spoiler:last-child { margin-bottom: 0; }
 
 
 
 
74
  .su-spoiler-content {
75
  -webkit-transition: padding-top .2s;
76
  -moz-transition: padding-top .2s;
@@ -87,17 +91,15 @@
87
  border: none;
88
  opacity: 0;
89
  }
90
- .su-spoiler-title {
91
- position: relative;
92
  min-height: 16px;
93
  padding: 4px 0 4px 24px;
94
  background: #fff;
95
  color: #333;
96
  font-weight: bold;
97
  line-height: 16px;
98
- cursor: pointer;
99
  }
100
- .su-spoiler-title > .su-spoiler-icon {
101
  position: absolute;
102
  top: 4px;
103
  left: 0;
@@ -106,12 +108,69 @@
106
  height: 16px;
107
  background: 0 -16px url('../images/spoiler.png') no-repeat;
108
  }
109
- .su-spoiler-closed > .su-spoiler-title > .su-spoiler-icon { background: 0 0 url('../images/spoiler.png') no-repeat; }
110
- .su-spoiler-content {
111
  padding: 1em 0 0 24px;
112
  background: #fff;
113
  color: #333;
114
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
 
116
  /* Quote
117
  ---------------------------------------------------------------*/
71
 
72
  .su-spoiler { margin-bottom: 1.5em; }
73
  .su-spoiler .su-spoiler:last-child { margin-bottom: 0; }
74
+ .su-spoiler-title {
75
+ position: relative;
76
+ cursor: pointer;
77
+ }
78
  .su-spoiler-content {
79
  -webkit-transition: padding-top .2s;
80
  -moz-transition: padding-top .2s;
91
  border: none;
92
  opacity: 0;
93
  }
94
+ .su-spoiler-style-default > .su-spoiler-title {
 
95
  min-height: 16px;
96
  padding: 4px 0 4px 24px;
97
  background: #fff;
98
  color: #333;
99
  font-weight: bold;
100
  line-height: 16px;
 
101
  }
102
+ .su-spoiler-style-default > .su-spoiler-title > .su-spoiler-icon {
103
  position: absolute;
104
  top: 4px;
105
  left: 0;
108
  height: 16px;
109
  background: 0 -16px url('../images/spoiler.png') no-repeat;
110
  }
111
+ .su-spoiler-style-default.su-spoiler-closed > .su-spoiler-title > .su-spoiler-icon { background: 0 0 url('../images/spoiler.png') no-repeat; }
112
+ .su-spoiler-style-default > .su-spoiler-content {
113
  padding: 1em 0 0 24px;
114
  background: #fff;
115
  color: #333;
116
  }
117
+ .su-spoiler-style-fancy {
118
+ border: 1px solid #ccc;
119
+ -webkit-border-radius: 10px;
120
+ -moz-border-radius: 10px;
121
+ border-radius: 10px;
122
+ }
123
+ .su-spoiler-style-fancy > .su-spoiler-title {
124
+ min-height: 20px;
125
+ padding: 7px 7px 7px 36px;
126
+ border-bottom: 1px solid #ccc;
127
+ -webkit-border-radius: 10px;
128
+ -moz-border-radius: 10px;
129
+ border-radius: 10px;
130
+ background: #f0f0f0;
131
+ color: #333;
132
+ font-weight: bold;
133
+ font-size: 0.9em;
134
+ line-height: 20px;
135
+ }
136
+ .su-spoiler-style-fancy.su-spoiler-closed > .su-spoiler-title { border: none; }
137
+ .su-spoiler-style-fancy > .su-spoiler-title > .su-spoiler-icon {
138
+ position: absolute;
139
+ top: 10px;
140
+ left: 10px;
141
+ display: block;
142
+ width: 16px;
143
+ height: 16px;
144
+ background: 0 -16px url('../images/spoiler.png') no-repeat;
145
+ }
146
+ .su-spoiler-style-fancy.su-spoiler-closed > .su-spoiler-title > .su-spoiler-icon { background: 0 0 url('../images/spoiler.png') no-repeat; }
147
+ .su-spoiler-style-fancy > .su-spoiler-content {
148
+ padding: 1em;
149
+ -webkit-border-radius: 10px;
150
+ -moz-border-radius: 10px;
151
+ border-radius: 10px;
152
+ background: #fff;
153
+ color: #333;
154
+ }
155
+ .su-spoiler-style-simple {
156
+ border-top: 1px solid #ccc;
157
+ border-bottom: 1px solid #ccc;
158
+ }
159
+ .su-spoiler-style-simple > .su-spoiler-title {
160
+ min-height: 20px;
161
+ padding: 5px 10px;
162
+ background: #f0f0f0;
163
+ color: #333;
164
+ font-weight: bold;
165
+ font-size: 0.9em;
166
+ line-height: 20px;
167
+ }
168
+ .su-spoiler-style-simple > .su-spoiler-title > .su-spoiler-icon { display: none; }
169
+ .su-spoiler-style-simple > .su-spoiler-content {
170
+ padding: 1em 10px;
171
+ background: #fff;
172
+ color: #333;
173
+ }
174
 
175
  /* Quote
176
  ---------------------------------------------------------------*/
inc/core/class.data.php CHANGED
@@ -136,6 +136,17 @@ class Shortcodes_Ultimate_Data {
136
  'name' => __( 'Open', 'su' ),
137
  'desc' => __( 'Is spoiler content visible by default', 'su' )
138
  ),
 
 
 
 
 
 
 
 
 
 
 
139
  'class' => array(
140
  'default' => '',
141
  'name' => __( 'Class', 'su' ),
136
  'name' => __( 'Open', 'su' ),
137
  'desc' => __( 'Is spoiler content visible by default', 'su' )
138
  ),
139
+ 'style' => array(
140
+ 'type' => 'select',
141
+ 'values' => array(
142
+ 'default' => __( 'Default', 'su' ),
143
+ 'fancy' => __( 'Fancy', 'su' ),
144
+ 'simple' => __( 'Simple', 'su' )
145
+ ),
146
+ 'default' => 'default',
147
+ 'name' => __( 'Style', 'su' ),
148
+ 'desc' => __( 'Spoiler skin', 'su' )
149
+ ),
150
  'class' => array(
151
  'default' => '',
152
  'name' => __( 'Class', 'su' ),
inc/core/class.shortcodes-ultimate.php CHANGED
@@ -29,6 +29,8 @@ class Shortcodes_Ultimate {
29
  add_filter( 'plugin_action_links_' . $shult->basename, array( __CLASS__, 'actions_links' ), -10 );
30
  // Add plugin meta links
31
  add_filter( 'plugin_row_meta', array( __CLASS__, 'meta_links' ), 10, 2 );
 
 
32
  // Shortcodes Ultimate is ready
33
  do_action( 'su/init' );
34
  }
@@ -94,6 +96,18 @@ class Shortcodes_Ultimate {
94
  if ( !file_exists( $path ) ) mkdir( $path, 0755 );
95
  }
96
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  /**
98
  * Add plugin actions links
99
  */
29
  add_filter( 'plugin_action_links_' . $shult->basename, array( __CLASS__, 'actions_links' ), -10 );
30
  // Add plugin meta links
31
  add_filter( 'plugin_row_meta', array( __CLASS__, 'meta_links' ), 10, 2 );
32
+ // Import custom CSS from previous version
33
+ add_action( 'admin_init', array( __CLASS__, 'import_custom_css' ) );
34
  // Shortcodes Ultimate is ready
35
  do_action( 'su/init' );
36
  }
96
  if ( !file_exists( $path ) ) mkdir( $path, 0755 );
97
  }
98
 
99
+ /**
100
+ * Import custom CSS from previous version
101
+ */
102
+ public static function import_custom_css() {
103
+ $shult = shortcodes_ultimate();
104
+ $old = get_option( 'su_custom_css' );
105
+ if ( !$old ) return;
106
+ $current = $shult->get_option( 'custom_css' );
107
+ $shult->update_option( 'custom_css', "/* Custom CSS from v3 - begin */\n" . $old . "\n/* Custom CSS from v3 - end*/\n\n" . $current );
108
+ delete_option( 'su_custom_css' );
109
+ }
110
+
111
  /**
112
  * Add plugin actions links
113
  */
inc/core/shortcodes.php CHANGED
@@ -25,7 +25,12 @@ function su_heading_shortcode( $atts, $content = null ) {
25
  * @return string Output html
26
  */
27
  function su_tabs_shortcode( $atts, $content ) {
28
- $atts = shortcode_atts( array( 'vertical' => 'no', 'class' => '' ), $atts );
 
 
 
 
 
29
  $GLOBALS['tab_count'] = 0;
30
  do_shortcode( $content );
31
  $return = '';
@@ -74,17 +79,18 @@ function su_tab_shortcode( $atts, $content ) {
74
  * @return string Output html
75
  */
76
  function su_spoiler_shortcode( $atts, $content = null ) {
77
- $atts = shortcode_atts( array( 'title' => __( 'Spoiler title', 'su' ),
78
- 'open' => 'no',
79
- 'class' => '' ), $atts );
80
- $open = ( $atts['open'] === 'no' ) ? ' su-spoiler-closed' : '';
 
 
 
 
81
  su_query_asset( 'css', 'su-box-shortcodes' );
82
  su_query_asset( 'js', 'jquery' );
83
  su_query_asset( 'js', 'su-other-shortcodes' );
84
- return
85
- '<div class="su-spoiler' . $open . su_ecssc( $atts ) .
86
- '"><div class="su-spoiler-title"><span class="su-spoiler-icon"></span>' . $atts['title'] .
87
- '</div><div class="su-spoiler-content">' . su_do_shortcode( $content, 's' ) . '</div></div>';
88
  }
89
 
90
  /**
@@ -109,8 +115,7 @@ function su_accordion_shortcode( $atts = null, $content = null ) {
109
  * @return string Output html
110
  */
111
  function su_divider_shortcode( $atts, $content = null ) {
112
- $atts = shortcode_atts( array( 'top' => 'yes', 'text' => __( 'Go to top', 'su' ), 'class' => '' ),
113
- $atts );
114
  $top = ( $atts['top'] === 'yes' ) ? '<a href="#">' . $atts['text'] . '</a>' : '';
115
  su_query_asset( 'css', 'su-content-shortcodes' );
116
  return '<div class="su-divider' . su_ecssc( $atts ) . '">' . $top . '</div>';
25
  * @return string Output html
26
  */
27
  function su_tabs_shortcode( $atts, $content ) {
28
+ $atts = shortcode_atts( array(
29
+ 'vertical' => 'no',
30
+ 'style' => null, // 3.x
31
+ 'class' => ''
32
+ ), $atts );
33
+ if ( $atts['style'] == '3' ) $atts['vertical'] = 'yes';
34
  $GLOBALS['tab_count'] = 0;
35
  do_shortcode( $content );
36
  $return = '';
79
  * @return string Output html
80
  */
81
  function su_spoiler_shortcode( $atts, $content = null ) {
82
+ $atts = shortcode_atts( array(
83
+ 'title' => __( 'Spoiler title', 'su' ),
84
+ 'open' => 'no',
85
+ 'style' => 'default',
86
+ 'class' => ''
87
+ ), $atts );
88
+ $atts['style'] = str_replace( array( '1', '2' ), array( 'default', 'fancy' ), $atts['style'] );
89
+ $closed = ( $atts['open'] !== 'yes' ) ? ' su-spoiler-closed' : '';
90
  su_query_asset( 'css', 'su-box-shortcodes' );
91
  su_query_asset( 'js', 'jquery' );
92
  su_query_asset( 'js', 'su-other-shortcodes' );
93
+ return '<div class="su-spoiler su-spoiler-style-' . $atts['style'] . $closed . su_ecssc( $atts ) . '"><div class="su-spoiler-title"><span class="su-spoiler-icon"></span>' . $atts['title'] . '</div><div class="su-spoiler-content">' . su_do_shortcode( $content, 's' ) . '</div></div>';
 
 
 
94
  }
95
 
96
  /**
115
  * @return string Output html
116
  */
117
  function su_divider_shortcode( $atts, $content = null ) {
118
+ $atts = shortcode_atts( array( 'top' => 'yes', 'text' => __( 'Go to top', 'su' ), 'class' => '' ), $atts );
 
119
  $top = ( $atts['top'] === 'yes' ) ? '<a href="#">' . $atts['text'] . '</a>' : '';
120
  su_query_asset( 'css', 'su-content-shortcodes' );
121
  return '<div class="su-divider' . su_ecssc( $atts ) . '">' . $top . '</div>';
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.4
9
 
10
  Supercharge your WordPress theme with mega pack of shortcodes
11
 
@@ -86,17 +86,22 @@ Upgrade normally via your Wordpress admin -> Plugins panel.
86
 
87
  == Changelog ==
88
 
 
 
 
 
 
89
  = 4.0.4 =
90
- * Added backward compatibility for [highlight]. Now it accepts bg and background attributes.
91
- * Added backward compatibility for [label]. Now it accepts style and type attributes.
92
- * Added backward compatibility for [dropcap]. Now it accepts 1, 2 and 3 as style values.
93
- * Added backward compatibility for [permalink]. Now it accepts p and id attributes.
94
- * Added backward compatibility for [button]. Need to test.
95
- * Added backward compatibility for [members]. Now it accepts style and login attributes.
96
- * Added backward compatibility for [box]. Now it accepts color and box_color attributes.
97
- * Added backward compatibility for [note]. Now it accepts color and note_color attributes.
98
- * Added backward compatibility for [column]. Now it accepts attribute last and can be not wrapped with [row].
99
- * Added backward compatibility for [document]. Now it accepts file and url attributes.
100
 
101
  = 4.0 =
102
  * [Official plugin page](http://gndev.info/shortcodes-ultimate/)
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.5
9
 
10
  Supercharge your WordPress theme with mega pack of shortcodes
11
 
86
 
87
  == Changelog ==
88
 
89
+ = 4.0.5 =
90
+ * Added backward compatibility for [tabs]. Now it accepts style=3 and vertical attributes
91
+ * Added backward compatibility for [spoiler]. Now it accepts 0 and 1 as values for attribute open. Also, it now accepts style attribute (1, 2, default, fancy, simple)
92
+ * Added custom CSS import from previous versions. Styles will be imported automatically and prepended to the existing CSS-code
93
+
94
  = 4.0.4 =
95
+ * Added backward compatibility for [highlight]. Now it accepts bg and background attributes
96
+ * Added backward compatibility for [label]. Now it accepts style and type attributes
97
+ * Added backward compatibility for [dropcap]. Now it accepts 1, 2 and 3 as style values
98
+ * Added backward compatibility for [permalink]. Now it accepts p and id attributes
99
+ * Added backward compatibility for [button]. Need to test
100
+ * Added backward compatibility for [members]. Now it accepts style and login attributes
101
+ * Added backward compatibility for [box]. Now it accepts color and box_color attributes
102
+ * Added backward compatibility for [note]. Now it accepts color and note_color attributes
103
+ * Added backward compatibility for [column]. Now it accepts attribute last and can be not wrapped with [row]
104
+ * Added backward compatibility for [document]. Now it accepts file and url attributes
105
 
106
  = 4.0 =
107
  * [Official plugin page](http://gndev.info/shortcodes-ultimate/)
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.4
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.5
6
  Author: Vladimir Anokhin
7
  Author URI: http://gndev.info/
8
  Description: Supercharge your WordPress theme with mega pack of shortcodes