Version Description
This update fix various issues related to version 5.4.0
Download this release
Release Info
Developer | gn_themes |
Plugin | Shortcodes Ultimate |
Version | 5.4.1 |
Comparing to | |
See all releases |
Code changes from version 5.4.0 to 5.4.1
- admin/class-shortcodes-ultimate-admin-addons.php +1 -1
- admin/class-shortcodes-ultimate-admin-settings.php +1 -1
- admin/class-shortcodes-ultimate-admin-shortcodes.php +8 -8
- admin/class-shortcodes-ultimate-admin.php +2 -2
- admin/class-shortcodes-ultimate-notice.php +1 -1
- admin/partials/pages/settings.php +1 -1
- admin/partials/pages/shortcodes-list.php +0 -7
- includes/functions-helpers.php +18 -14
- readme.txt +6 -1
- shortcodes-ultimate.php +2 -2
admin/class-shortcodes-ultimate-admin-addons.php
CHANGED
@@ -102,7 +102,7 @@ final class Shortcodes_Ultimate_Admin_Addons extends Shortcodes_Ultimate_Admin {
|
|
102 |
* @access private
|
103 |
* @return array The plugin add-ons collection.
|
104 |
*/
|
105 |
-
|
106 |
|
107 |
if ( empty( $this->addons ) ) {
|
108 |
$this->addons = $this->load_addons();
|
102 |
* @access private
|
103 |
* @return array The plugin add-ons collection.
|
104 |
*/
|
105 |
+
public function get_addons() {
|
106 |
|
107 |
if ( empty( $this->addons ) ) {
|
108 |
$this->addons = $this->load_addons();
|
admin/class-shortcodes-ultimate-admin-settings.php
CHANGED
@@ -47,7 +47,7 @@ final class Shortcodes_Ultimate_Admin_Settings extends Shortcodes_Ultimate_Admin
|
|
47 |
'description' => '',
|
48 |
'page' => $this->plugin_prefix . 'settings',
|
49 |
'section' => $this->plugin_prefix . 'general',
|
50 |
-
'group' => $this->plugin_prefix
|
51 |
'callback' => array( $this, 'the_settings_field' ),
|
52 |
'sanitize' => 'sanitize_text_field',
|
53 |
);
|
47 |
'description' => '',
|
48 |
'page' => $this->plugin_prefix . 'settings',
|
49 |
'section' => $this->plugin_prefix . 'general',
|
50 |
+
'group' => rtrim( $this->plugin_prefix, '-_' ),
|
51 |
'callback' => array( $this, 'the_settings_field' ),
|
52 |
'sanitize' => 'sanitize_text_field',
|
53 |
);
|
admin/class-shortcodes-ultimate-admin-shortcodes.php
CHANGED
@@ -90,7 +90,7 @@ final class Shortcodes_Ultimate_Admin_Shortcodes extends Shortcodes_Ultimate_Adm
|
|
90 |
* @since 5.0.0
|
91 |
* @return string Shortcode code
|
92 |
*/
|
93 |
-
|
94 |
|
95 |
$defaults = array(
|
96 |
'id' => '',
|
@@ -182,7 +182,7 @@ final class Shortcodes_Ultimate_Admin_Shortcodes extends Shortcodes_Ultimate_Adm
|
|
182 |
* @since 5.0.0
|
183 |
* @return array Shortcodes data.
|
184 |
*/
|
185 |
-
|
186 |
|
187 |
$shortcodes = su_get_all_shortcodes();
|
188 |
$available = array();
|
@@ -230,7 +230,7 @@ final class Shortcodes_Ultimate_Admin_Shortcodes extends Shortcodes_Ultimate_Adm
|
|
230 |
* @since 5.0.0
|
231 |
* @return mixed Array with shortcode data, or FALSE if shortcode was not found.
|
232 |
*/
|
233 |
-
|
234 |
|
235 |
return isset( $_GET['shortcode'] )
|
236 |
? su_get_shortcode( sanitize_key( $_GET['shortcode'] ) )
|
@@ -266,7 +266,7 @@ final class Shortcodes_Ultimate_Admin_Shortcodes extends Shortcodes_Ultimate_Adm
|
|
266 |
* @since 5.0.0
|
267 |
* @return array Array with groups data.
|
268 |
*/
|
269 |
-
|
270 |
|
271 |
$groups = su_get_config( 'groups' );
|
272 |
$groups['all'] = __( 'All shortcodes', 'shortcodes-ultimate' );
|
@@ -300,7 +300,7 @@ final class Shortcodes_Ultimate_Admin_Shortcodes extends Shortcodes_Ultimate_Adm
|
|
300 |
* @since 5.0.0
|
301 |
* @return mixed Array with shortcode data, or FALSE if shortcode was not found.
|
302 |
*/
|
303 |
-
|
304 |
|
305 |
$options = array();
|
306 |
$shortcode = $this->get_current_shortcode();
|
@@ -331,7 +331,7 @@ final class Shortcodes_Ultimate_Admin_Shortcodes extends Shortcodes_Ultimate_Adm
|
|
331 |
* @since 5.0.0
|
332 |
* @return boolean True on success, false on failure.
|
333 |
*/
|
334 |
-
|
335 |
return isset( $_GET['shortcode'] );
|
336 |
}
|
337 |
|
@@ -342,7 +342,7 @@ final class Shortcodes_Ultimate_Admin_Shortcodes extends Shortcodes_Ultimate_Adm
|
|
342 |
* @param array $args Attribute details.
|
343 |
* @return string Possible values.
|
344 |
*/
|
345 |
-
|
346 |
|
347 |
$args = wp_parse_args(
|
348 |
$args,
|
@@ -391,7 +391,7 @@ final class Shortcodes_Ultimate_Admin_Shortcodes extends Shortcodes_Ultimate_Adm
|
|
391 |
* @param array $args Attribute details.
|
392 |
* @return string Default value.
|
393 |
*/
|
394 |
-
|
395 |
|
396 |
if ( isset( $args['default'] ) && $args['default'] !== '' ) {
|
397 |
return $args['default'];
|
90 |
* @since 5.0.0
|
91 |
* @return string Shortcode code
|
92 |
*/
|
93 |
+
public function get_shortcode_code( $args ) {
|
94 |
|
95 |
$defaults = array(
|
96 |
'id' => '',
|
182 |
* @since 5.0.0
|
183 |
* @return array Shortcodes data.
|
184 |
*/
|
185 |
+
public function get_available_shortcodes() {
|
186 |
|
187 |
$shortcodes = su_get_all_shortcodes();
|
188 |
$available = array();
|
230 |
* @since 5.0.0
|
231 |
* @return mixed Array with shortcode data, or FALSE if shortcode was not found.
|
232 |
*/
|
233 |
+
public function get_current_shortcode() {
|
234 |
|
235 |
return isset( $_GET['shortcode'] )
|
236 |
? su_get_shortcode( sanitize_key( $_GET['shortcode'] ) )
|
266 |
* @since 5.0.0
|
267 |
* @return array Array with groups data.
|
268 |
*/
|
269 |
+
public function get_groups() {
|
270 |
|
271 |
$groups = su_get_config( 'groups' );
|
272 |
$groups['all'] = __( 'All shortcodes', 'shortcodes-ultimate' );
|
300 |
* @since 5.0.0
|
301 |
* @return mixed Array with shortcode data, or FALSE if shortcode was not found.
|
302 |
*/
|
303 |
+
public function get_single_shortcode_options() {
|
304 |
|
305 |
$options = array();
|
306 |
$shortcode = $this->get_current_shortcode();
|
331 |
* @since 5.0.0
|
332 |
* @return boolean True on success, false on failure.
|
333 |
*/
|
334 |
+
public function is_single_shortcode_page() {
|
335 |
return isset( $_GET['shortcode'] );
|
336 |
}
|
337 |
|
342 |
* @param array $args Attribute details.
|
343 |
* @return string Possible values.
|
344 |
*/
|
345 |
+
public function get_possible_values( $args ) {
|
346 |
|
347 |
$args = wp_parse_args(
|
348 |
$args,
|
391 |
* @param array $args Attribute details.
|
392 |
* @return string Default value.
|
393 |
*/
|
394 |
+
public function get_default_value( $args ) {
|
395 |
|
396 |
if ( isset( $args['default'] ) && $args['default'] !== '' ) {
|
397 |
return $args['default'];
|
admin/class-shortcodes-ultimate-admin.php
CHANGED
@@ -276,7 +276,7 @@ abstract class Shortcodes_Ultimate_Admin {
|
|
276 |
* @since 5.0.0
|
277 |
* @access protected
|
278 |
*/
|
279 |
-
|
280 |
echo $this->get_page_title();
|
281 |
}
|
282 |
|
@@ -377,7 +377,7 @@ abstract class Shortcodes_Ultimate_Admin {
|
|
377 |
* @access protected
|
378 |
* @return array The URL of the component menu page.
|
379 |
*/
|
380 |
-
|
381 |
return $this->component_url;
|
382 |
}
|
383 |
|
276 |
* @since 5.0.0
|
277 |
* @access protected
|
278 |
*/
|
279 |
+
public function the_page_title() {
|
280 |
echo $this->get_page_title();
|
281 |
}
|
282 |
|
377 |
* @access protected
|
378 |
* @return array The URL of the component menu page.
|
379 |
*/
|
380 |
+
public function get_component_url() {
|
381 |
return $this->component_url;
|
382 |
}
|
383 |
|
admin/class-shortcodes-ultimate-notice.php
CHANGED
@@ -183,7 +183,7 @@ abstract class Shortcodes_Ultimate_Notice {
|
|
183 |
* @param string $redirect Custom redirect URL.
|
184 |
* @return string The admin url.
|
185 |
*/
|
186 |
-
|
187 |
|
188 |
$link = admin_url( sprintf(
|
189 |
'admin-post.php?action=%s&nonce=%s&id=%s',
|
183 |
* @param string $redirect Custom redirect URL.
|
184 |
* @return string The admin url.
|
185 |
*/
|
186 |
+
public function get_dismiss_link( $defer = false, $redirect = '' ) {
|
187 |
|
188 |
$link = admin_url( sprintf(
|
189 |
'admin-post.php?action=%s&nonce=%s&id=%s',
|
admin/partials/pages/settings.php
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
|
21 |
<?php else : ?>
|
22 |
|
23 |
-
<?php settings_fields( $this->plugin_prefix
|
24 |
<?php do_settings_sections( $this->plugin_prefix . 'settings' ); ?>
|
25 |
|
26 |
<?php endif; ?>
|
20 |
|
21 |
<?php else : ?>
|
22 |
|
23 |
+
<?php settings_fields( rtrim( $this->plugin_prefix, '-_' ) ); ?>
|
24 |
<?php do_settings_sections( $this->plugin_prefix . 'settings' ); ?>
|
25 |
|
26 |
<?php endif; ?>
|
admin/partials/pages/shortcodes-list.php
CHANGED
@@ -21,13 +21,6 @@
|
|
21 |
<?php endforeach; ?>
|
22 |
|
23 |
</ul>
|
24 |
-
|
25 |
-
<?php /*
|
26 |
-
<form class="search-form" action="<?php echo $this->component_url; ?>">
|
27 |
-
<label class="screen-reader-text" for="wp-filter-search-input"><?php _e( 'Search shortcodes', 'shortcodes-ultimate' ); ?></label>
|
28 |
-
<input placeholder="<?php _e( 'Search shortcodes', 'shortcodes-ultimate' ); ?>…" type="search" id="wp-filter-search-input" class="wp-filter-search">
|
29 |
-
</form>
|
30 |
-
*/ ?>
|
31 |
</div>
|
32 |
|
33 |
<div class="su-admin-shortcodes-list wp-clearfix">
|
21 |
<?php endforeach; ?>
|
22 |
|
23 |
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
</div>
|
25 |
|
26 |
<div class="su-admin-shortcodes-list wp-clearfix">
|
includes/functions-helpers.php
CHANGED
@@ -274,13 +274,24 @@ function su_is_valid_template_name( $path ) {
|
|
274 |
|
275 |
$path = su_set_file_extension( $path, 'php' );
|
276 |
|
277 |
-
$
|
278 |
-
|
279 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
|
281 |
-
|
|
|
282 |
|
283 |
-
if ( strpos(
|
284 |
return true;
|
285 |
}
|
286 |
|
@@ -302,19 +313,12 @@ function su_set_file_extension( $path, $extension ) {
|
|
302 |
|
303 |
$path_info = pathinfo( $path );
|
304 |
|
305 |
-
// Remove file extension
|
306 |
if ( ! $extension ) {
|
307 |
-
|
308 |
-
return path_join(
|
309 |
-
$path_info( $path, PATHINFO_DIRNAME ),
|
310 |
-
$path_info( $path, PATHINFO_FILENAME )
|
311 |
-
);
|
312 |
-
|
313 |
}
|
314 |
|
315 |
-
// Add file extension, if needed
|
316 |
if ( $path_info['extension'] !== $extension ) {
|
317 |
-
$path .= $extension;
|
318 |
}
|
319 |
|
320 |
return $path;
|
274 |
|
275 |
$path = su_set_file_extension( $path, 'php' );
|
276 |
|
277 |
+
$allowed = apply_filters(
|
278 |
+
'su/allowed_template_paths',
|
279 |
+
array(
|
280 |
+
get_stylesheet_directory(),
|
281 |
+
get_template_directory(),
|
282 |
+
plugin_dir_path( dirname( __FILE__ ) ),
|
283 |
+
)
|
284 |
+
);
|
285 |
+
|
286 |
+
foreach ( $allowed as $dir ) {
|
287 |
+
|
288 |
+
$dir = untrailingslashit( $dir );
|
289 |
+
$real = realpath( $dir . DIRECTORY_SEPARATOR . $path );
|
290 |
|
291 |
+
$dir = str_replace( '\\', '/', $dir );
|
292 |
+
$real = str_replace( '\\', '/', $real );
|
293 |
|
294 |
+
if ( strpos( $real, $dir ) === 0 ) {
|
295 |
return true;
|
296 |
}
|
297 |
|
313 |
|
314 |
$path_info = pathinfo( $path );
|
315 |
|
|
|
316 |
if ( ! $extension ) {
|
317 |
+
return path_join( $path_info['dirname'], $path_info['filename'] );
|
|
|
|
|
|
|
|
|
|
|
318 |
}
|
319 |
|
|
|
320 |
if ( $path_info['extension'] !== $extension ) {
|
321 |
+
$path .= ".{$extension}";
|
322 |
}
|
323 |
|
324 |
return $path;
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: https://paypal.me/anovladimir
|
|
5 |
Tags: shortcode, toggle, columns, button, slider, video, map, visual, responsive, shortcodes, youtube, vimeo, audio, mp3, tabs, jquery, box, accordion, toggle, pullquote, list, image, gallery, navigation, permalink, feed, rss, members, membership, guests, carousel, icons, rtl, multilingual
|
6 |
Requires at least: 3.5
|
7 |
Requires PHP: 5.2.4
|
8 |
-
Tested up to: 5.
|
9 |
Stable tag: trunk
|
10 |
|
11 |
A comprehensive collection of visual components for your site
|
@@ -151,6 +151,11 @@ For help with premium add-ons, please [open new support ticket](https://getshort
|
|
151 |
|
152 |
== Changelog ==
|
153 |
|
|
|
|
|
|
|
|
|
|
|
154 |
= 5.4.0 =
|
155 |
|
156 |
**What's new**
|
5 |
Tags: shortcode, toggle, columns, button, slider, video, map, visual, responsive, shortcodes, youtube, vimeo, audio, mp3, tabs, jquery, box, accordion, toggle, pullquote, list, image, gallery, navigation, permalink, feed, rss, members, membership, guests, carousel, icons, rtl, multilingual
|
6 |
Requires at least: 3.5
|
7 |
Requires PHP: 5.2.4
|
8 |
+
Tested up to: 5.3
|
9 |
Stable tag: trunk
|
10 |
|
11 |
A comprehensive collection of visual components for your site
|
151 |
|
152 |
== Changelog ==
|
153 |
|
154 |
+
= 5.4.1 =
|
155 |
+
|
156 |
+
This update fix various issues related to version 5.4.0
|
157 |
+
|
158 |
+
|
159 |
= 5.4.0 =
|
160 |
|
161 |
**What's new**
|
shortcodes-ultimate.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Shortcodes Ultimate
|
4 |
* Plugin URI: https://getshortcodes.com/
|
5 |
-
* Version: 5.4.
|
6 |
* Author: Vladimir Anokhin
|
7 |
* Author URI: https://vanokhin.com/
|
8 |
* Description: A comprehensive collection of visual components for WordPress
|
@@ -15,7 +15,7 @@
|
|
15 |
* Define plugin constants.
|
16 |
*/
|
17 |
define( 'SU_PLUGIN_FILE', __FILE__ );
|
18 |
-
define( 'SU_PLUGIN_VERSION', '5.4.
|
19 |
|
20 |
/**
|
21 |
* Load dependencies.
|
2 |
/**
|
3 |
* Plugin Name: Shortcodes Ultimate
|
4 |
* Plugin URI: https://getshortcodes.com/
|
5 |
+
* Version: 5.4.1
|
6 |
* Author: Vladimir Anokhin
|
7 |
* Author URI: https://vanokhin.com/
|
8 |
* Description: A comprehensive collection of visual components for WordPress
|
15 |
* Define plugin constants.
|
16 |
*/
|
17 |
define( 'SU_PLUGIN_FILE', __FILE__ );
|
18 |
+
define( 'SU_PLUGIN_VERSION', '5.4.1' );
|
19 |
|
20 |
/**
|
21 |
* Load dependencies.
|