Version Description
Download this release
Release Info
Developer | gn_themes |
Plugin | Shortcodes Ultimate |
Version | 5.12.0 |
Comparing to | |
See all releases |
Code changes from version 5.11.1 to 5.12.0
- changelog.txt +20 -0
- inc/core/generator.php +1 -1
- includes/functions-helpers.php +10 -2
- includes/partials/shortcodes/posts/templates/default-loop.php +2 -2
- includes/partials/shortcodes/posts/templates/list-loop.php +2 -2
- includes/partials/shortcodes/posts/templates/single-post.php +2 -2
- includes/partials/shortcodes/posts/templates/teaser-loop.php +2 -2
- includes/shortcodes/posts.php +14 -0
- languages/shortcodes-ultimate.pot +23 -3
- readme.txt +5 -10
- shortcodes-ultimate.php +3 -3
changelog.txt
CHANGED
@@ -1,3 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
### 5.11.0
|
2 |
|
3 |
**What's changed**
|
1 |
+
### 5.11.2
|
2 |
+
|
3 |
+
**Fixed**
|
4 |
+
|
5 |
+
- Fixed *Pro Tip* translation in shortcode generator. Thanks to (Pieterjan Deneys)[https://wordpress.org/support/topic/bug-untranslated-string/]
|
6 |
+
|
7 |
+
|
8 |
+
### 5.11.1
|
9 |
+
|
10 |
+
**What's new**
|
11 |
+
|
12 |
+
- Updated ForkAwesome library, now it includes [52 new icons](https://forkaweso.me/Fork-Awesome/icons/)
|
13 |
+
|
14 |
+
**Fixed**
|
15 |
+
|
16 |
+
- Minor improvements to the plugin settings UX
|
17 |
+
- Fixed some typos
|
18 |
+
- Fixed issue in `[su_posts]` where posts with thumbnails were generating PHP warnings. Thanks to [@dimabr](https://wordpress.org/support/topic/su_posts/#post-14756135)
|
19 |
+
|
20 |
+
|
21 |
### 5.11.0
|
22 |
|
23 |
**What's changed**
|
inc/core/generator.php
CHANGED
@@ -220,7 +220,7 @@ class Su_Generator {
|
|
220 |
<div id="su-generator-header">
|
221 |
<div id="su-generator-tools"><?php echo implode( ' <span></span> ', $tools ); ?></div>
|
222 |
<input type="text" name="su_generator_search" id="su-generator-search" value="" placeholder="<?php _e( 'Search for shortcodes', 'shortcodes-ultimate' ); ?>" />
|
223 |
-
<p id="su-generator-search-pro-tip"><?php printf( '<strong>%s:</strong> %s', __( 'Pro Tip', 'shortcodes-ultimate' ), __( 'Hit enter to select highlighted shortcode, while searching' ) ) ?></p>
|
224 |
<div id="su-generator-filter">
|
225 |
<strong><?php _e( 'Filter by type', 'shortcodes-ultimate' ); ?></strong>
|
226 |
<?php foreach ( su_get_config( 'groups' ) as $group => $label ) echo '<a href="#" data-filter="' . $group . '">' . $label . '</a>'; ?>
|
220 |
<div id="su-generator-header">
|
221 |
<div id="su-generator-tools"><?php echo implode( ' <span></span> ', $tools ); ?></div>
|
222 |
<input type="text" name="su_generator_search" id="su-generator-search" value="" placeholder="<?php _e( 'Search for shortcodes', 'shortcodes-ultimate' ); ?>" />
|
223 |
+
<p id="su-generator-search-pro-tip"><?php printf( '<strong>%s:</strong> %s', __( 'Pro Tip', 'shortcodes-ultimate' ), __( 'Hit enter to select highlighted shortcode, while searching', 'shortcodes-ultimate' ) ) ?></p>
|
224 |
<div id="su-generator-filter">
|
225 |
<strong><?php _e( 'Filter by type', 'shortcodes-ultimate' ); ?></strong>
|
226 |
<?php foreach ( su_get_config( 'groups' ) as $group => $label ) echo '<a href="#" data-filter="' . $group . '">' . $label . '</a>'; ?>
|
includes/functions-helpers.php
CHANGED
@@ -89,7 +89,7 @@ function su_get_config( $key = null, $default = false ) {
|
|
89 |
* @param string $message Error message.
|
90 |
* @return string Error message markup.
|
91 |
*/
|
92 |
-
function su_error_message( $title = '', $message = '' ) {
|
93 |
|
94 |
if ( ! su_current_user_can_insert() ) {
|
95 |
return;
|
@@ -99,12 +99,20 @@ function su_error_message( $title = '', $message = '' ) {
|
|
99 |
$title = "<strong>${title}:</strong> ";
|
100 |
}
|
101 |
|
102 |
-
|
103 |
'<p class="su-error" style="padding:5px 10px;color:#8f3a35;border-left:3px solid #8f3a35;background:#fff7f6;line-height:1.35">%1$s%2$s</p>',
|
104 |
$title,
|
105 |
$message
|
106 |
);
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
}
|
109 |
|
110 |
/**
|
89 |
* @param string $message Error message.
|
90 |
* @return string Error message markup.
|
91 |
*/
|
92 |
+
function su_error_message( $title = '', $message = '', $echo = false ) {
|
93 |
|
94 |
if ( ! su_current_user_can_insert() ) {
|
95 |
return;
|
99 |
$title = "<strong>${title}:</strong> ";
|
100 |
}
|
101 |
|
102 |
+
$output = sprintf(
|
103 |
'<p class="su-error" style="padding:5px 10px;color:#8f3a35;border-left:3px solid #8f3a35;background:#fff7f6;line-height:1.35">%1$s%2$s</p>',
|
104 |
$title,
|
105 |
$message
|
106 |
);
|
107 |
|
108 |
+
if ( $echo ) {
|
109 |
+
// phpcs:disable
|
110 |
+
echo $output;
|
111 |
+
// phpcs:enable
|
112 |
+
}
|
113 |
+
|
114 |
+
return $output;
|
115 |
+
|
116 |
}
|
117 |
|
118 |
/**
|
includes/partials/shortcodes/posts/templates/default-loop.php
CHANGED
@@ -12,13 +12,13 @@
|
|
12 |
*/
|
13 |
?>
|
14 |
|
15 |
-
<div class="su-posts su-posts-default-loop">
|
16 |
|
17 |
<?php if ( $posts->have_posts() ) : ?>
|
18 |
|
19 |
<?php while ( $posts->have_posts() ) : $posts->the_post(); ?>
|
20 |
|
21 |
-
<div id="su-post-<?php the_ID(); ?>" class="su-post">
|
22 |
|
23 |
<?php if ( has_post_thumbnail( get_the_ID() ) ) : ?>
|
24 |
<a class="su-post-thumbnail" href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
|
12 |
*/
|
13 |
?>
|
14 |
|
15 |
+
<div class="su-posts su-posts-default-loop <?php echo esc_attr( $atts['class'] ); ?>">
|
16 |
|
17 |
<?php if ( $posts->have_posts() ) : ?>
|
18 |
|
19 |
<?php while ( $posts->have_posts() ) : $posts->the_post(); ?>
|
20 |
|
21 |
+
<div id="su-post-<?php the_ID(); ?>" class="su-post <?php echo esc_attr( $atts['class_single'] ); ?>">
|
22 |
|
23 |
<?php if ( has_post_thumbnail( get_the_ID() ) ) : ?>
|
24 |
<a class="su-post-thumbnail" href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
|
includes/partials/shortcodes/posts/templates/list-loop.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
*/
|
13 |
?>
|
14 |
|
15 |
-
<ul class="su-posts su-posts-list-loop">
|
16 |
<?php
|
17 |
// Posts are found
|
18 |
if ( $posts->have_posts() ) {
|
@@ -20,7 +20,7 @@ if ( $posts->have_posts() ) {
|
|
20 |
$posts->the_post();
|
21 |
global $post;
|
22 |
?>
|
23 |
-
<li id="su-post-<?php the_ID(); ?>" class="su-post"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
|
24 |
<?php
|
25 |
}
|
26 |
}
|
12 |
*/
|
13 |
?>
|
14 |
|
15 |
+
<ul class="su-posts su-posts-list-loop <?php echo esc_attr( $atts['class'] ); ?>">
|
16 |
<?php
|
17 |
// Posts are found
|
18 |
if ( $posts->have_posts() ) {
|
20 |
$posts->the_post();
|
21 |
global $post;
|
22 |
?>
|
23 |
+
<li id="su-post-<?php the_ID(); ?>" class="su-post <?php echo esc_attr( $atts['class_single'] ); ?>"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
|
24 |
<?php
|
25 |
}
|
26 |
}
|
includes/partials/shortcodes/posts/templates/single-post.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
*/
|
13 |
?>
|
14 |
|
15 |
-
<div class="su-posts su-posts-single-post">
|
16 |
<?php
|
17 |
// Prepare marker to show only one post
|
18 |
$first = true;
|
@@ -26,7 +26,7 @@
|
|
26 |
if ( $first ) {
|
27 |
$first = false;
|
28 |
?>
|
29 |
-
<div id="su-post-<?php the_ID(); ?>" class="su-post">
|
30 |
<h1 class="su-post-title"><?php the_title(); ?></h1>
|
31 |
<div class="su-post-meta"><?php _e( 'Posted', 'shortcodes-ultimate' ); ?>: <?php the_time( get_option( 'date_format' ) ); ?>
|
32 |
<?php if ( have_comments() || comments_open() ) : ?>
|
12 |
*/
|
13 |
?>
|
14 |
|
15 |
+
<div class="su-posts su-posts-single-post <?php echo esc_attr( $atts['class'] ); ?>">
|
16 |
<?php
|
17 |
// Prepare marker to show only one post
|
18 |
$first = true;
|
26 |
if ( $first ) {
|
27 |
$first = false;
|
28 |
?>
|
29 |
+
<div id="su-post-<?php the_ID(); ?>" class="su-post <?php echo esc_attr( $atts['class_single'] ); ?>">
|
30 |
<h1 class="su-post-title"><?php the_title(); ?></h1>
|
31 |
<div class="su-post-meta"><?php _e( 'Posted', 'shortcodes-ultimate' ); ?>: <?php the_time( get_option( 'date_format' ) ); ?>
|
32 |
<?php if ( have_comments() || comments_open() ) : ?>
|
includes/partials/shortcodes/posts/templates/teaser-loop.php
CHANGED
@@ -12,12 +12,12 @@
|
|
12 |
*/
|
13 |
?>
|
14 |
|
15 |
-
<div class="su-posts su-posts-teaser-loop">
|
16 |
<?php if ( $posts->have_posts() ) : ?>
|
17 |
<?php while ( $posts->have_posts() ) : ?>
|
18 |
<?php $posts->the_post(); ?>
|
19 |
|
20 |
-
<div id="su-post-<?php the_ID(); ?>" class="su-post">
|
21 |
<?php if ( has_post_thumbnail() ) : ?>
|
22 |
<a class="su-post-thumbnail" href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
|
23 |
<?php endif; ?>
|
12 |
*/
|
13 |
?>
|
14 |
|
15 |
+
<div class="su-posts su-posts-teaser-loop <?php echo esc_attr( $atts['class'] ); ?>">
|
16 |
<?php if ( $posts->have_posts() ) : ?>
|
17 |
<?php while ( $posts->have_posts() ) : ?>
|
18 |
<?php $posts->the_post(); ?>
|
19 |
|
20 |
+
<div id="su-post-<?php the_ID(); ?>" class="su-post <?php echo esc_attr( $atts['class_single'] ); ?>">
|
21 |
<?php if ( has_post_thumbnail() ) : ?>
|
22 |
<a class="su-post-thumbnail" href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
|
23 |
<?php endif; ?>
|
includes/shortcodes/posts.php
CHANGED
@@ -191,6 +191,18 @@ su_add_shortcode(
|
|
191 |
'shortcodes-ultimate'
|
192 |
),
|
193 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
),
|
195 |
'desc' => __(
|
196 |
'Custom posts query with customizable template',
|
@@ -222,6 +234,8 @@ function su_shortcode_posts( $atts = null, $content = null ) {
|
|
222 |
'post_parent' => false,
|
223 |
'post_status' => 'publish',
|
224 |
'ignore_sticky_posts' => 'no',
|
|
|
|
|
225 |
),
|
226 |
$atts,
|
227 |
'posts'
|
191 |
'shortcodes-ultimate'
|
192 |
),
|
193 |
),
|
194 |
+
'class' => array(
|
195 |
+
'type' => 'text',
|
196 |
+
'name' => __( 'Container CSS class', 'shortcodes-ultimate' ),
|
197 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s) for the container element', 'shortcodes-ultimate' ),
|
198 |
+
'default' => '',
|
199 |
+
),
|
200 |
+
'class_single' => array(
|
201 |
+
'type' => 'text',
|
202 |
+
'name' => __( 'Single CSS class', 'shortcodes-ultimate' ),
|
203 |
+
'desc' => __( 'Additional CSS class name(s) separated by space(s) for each individual post element', 'shortcodes-ultimate' ),
|
204 |
+
'default' => '',
|
205 |
+
),
|
206 |
),
|
207 |
'desc' => __(
|
208 |
'Custom posts query with customizable template',
|
234 |
'post_parent' => false,
|
235 |
'post_status' => 'publish',
|
236 |
'ignore_sticky_posts' => 'no',
|
237 |
+
'class' => '',
|
238 |
+
'class_single' => '',
|
239 |
),
|
240 |
$atts,
|
241 |
'posts'
|
languages/shortcodes-ultimate.pot
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
# Copyright (C)
|
2 |
# This file is distributed under the same license as the Shortcodes Ultimate package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
@@ -399,6 +399,10 @@ msgstr ""
|
|
399 |
msgid "Pro Tip"
|
400 |
msgstr ""
|
401 |
|
|
|
|
|
|
|
|
|
402 |
#: inc/core/generator.php:225
|
403 |
msgid "Filter by type"
|
404 |
msgstr ""
|
@@ -1703,11 +1707,11 @@ msgstr ""
|
|
1703 |
msgid "Anchors lets you link directly to an element on a page"
|
1704 |
msgstr ""
|
1705 |
|
1706 |
-
#: includes/shortcodes/display-posts.php:228, includes/shortcodes/posts.php:
|
1707 |
msgid "Custom posts query with customizable template"
|
1708 |
msgstr ""
|
1709 |
|
1710 |
-
#: includes/shortcodes/display-posts.php:260, includes/shortcodes/posts.php:
|
1711 |
msgid "invalid template name"
|
1712 |
msgstr ""
|
1713 |
|
@@ -2928,6 +2932,22 @@ msgstr ""
|
|
2928 |
msgid "Set to yes to prevent sticky posts from being moved to the start of the returned list of posts. They are still included, but appear in regular order."
|
2929 |
msgstr ""
|
2930 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2931 |
#: includes/shortcodes/private.php:8
|
2932 |
msgid "Private"
|
2933 |
msgstr ""
|
1 |
+
# Copyright (C) 2022 Shortcodes Ultimate
|
2 |
# This file is distributed under the same license as the Shortcodes Ultimate package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
399 |
msgid "Pro Tip"
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: inc/core/generator.php:223
|
403 |
+
msgid "Hit enter to select highlighted shortcode, while searching"
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
#: inc/core/generator.php:225
|
407 |
msgid "Filter by type"
|
408 |
msgstr ""
|
1707 |
msgid "Anchors lets you link directly to an element on a page"
|
1708 |
msgstr ""
|
1709 |
|
1710 |
+
#: includes/shortcodes/display-posts.php:228, includes/shortcodes/posts.php:207
|
1711 |
msgid "Custom posts query with customizable template"
|
1712 |
msgstr ""
|
1713 |
|
1714 |
+
#: includes/shortcodes/display-posts.php:260, includes/shortcodes/posts.php:397, includes/shortcodes/template.php:33
|
1715 |
msgid "invalid template name"
|
1716 |
msgstr ""
|
1717 |
|
2932 |
msgid "Set to yes to prevent sticky posts from being moved to the start of the returned list of posts. They are still included, but appear in regular order."
|
2933 |
msgstr ""
|
2934 |
|
2935 |
+
#: includes/shortcodes/posts.php:196
|
2936 |
+
msgid "Container CSS class"
|
2937 |
+
msgstr ""
|
2938 |
+
|
2939 |
+
#: includes/shortcodes/posts.php:197
|
2940 |
+
msgid "Additional CSS class name(s) separated by space(s) for the container element"
|
2941 |
+
msgstr ""
|
2942 |
+
|
2943 |
+
#: includes/shortcodes/posts.php:202
|
2944 |
+
msgid "Single CSS class"
|
2945 |
+
msgstr ""
|
2946 |
+
|
2947 |
+
#: includes/shortcodes/posts.php:203
|
2948 |
+
msgid "Additional CSS class name(s) separated by space(s) for each individual post element"
|
2949 |
+
msgstr ""
|
2950 |
+
|
2951 |
#: includes/shortcodes/private.php:8
|
2952 |
msgid "Private"
|
2953 |
msgstr ""
|
readme.txt
CHANGED
@@ -3,10 +3,10 @@ Contributors: gn_themes
|
|
3 |
License: GPLv3
|
4 |
Donate link: https://paypal.me/anovladimir
|
5 |
Tags: shortcode, toggle, columns, button, slider
|
6 |
-
Stable tag: 5.
|
7 |
Requires PHP: 5.4
|
8 |
Requires at least: 4.6
|
9 |
-
Tested up to: 5.
|
10 |
|
11 |
|
12 |
A comprehensive collection of visual components for your site
|
@@ -147,17 +147,12 @@ First, visit the [Help Center](https://getshortcodes.com/support/). If you get s
|
|
147 |
## Changelog
|
148 |
|
149 |
|
150 |
-
### 5.
|
151 |
|
152 |
**What's new**
|
153 |
|
154 |
-
-
|
155 |
-
|
156 |
-
**Fixed**
|
157 |
-
|
158 |
-
- Minor improvements to the plugin settings UX
|
159 |
-
- Fixed some typos
|
160 |
-
- Fixed issue in `[su_posts]` where posts with thumbnails were generating PHP warnings. Thanks to [@dimabr](https://wordpress.org/support/topic/su_posts/#post-14756135)
|
161 |
|
162 |
---
|
163 |
[Version history →](https://plugins.trac.wordpress.org/browser/shortcodes-ultimate/trunk/changelog.txt)
|
3 |
License: GPLv3
|
4 |
Donate link: https://paypal.me/anovladimir
|
5 |
Tags: shortcode, toggle, columns, button, slider
|
6 |
+
Stable tag: 5.12.0
|
7 |
Requires PHP: 5.4
|
8 |
Requires at least: 4.6
|
9 |
+
Tested up to: 5.9
|
10 |
|
11 |
|
12 |
A comprehensive collection of visual components for your site
|
147 |
## Changelog
|
148 |
|
149 |
|
150 |
+
### 5.12.0
|
151 |
|
152 |
**What's new**
|
153 |
|
154 |
+
- New options `class` and `class_single` for the *Posts* shortcode. Use new options to specify custom CSS classes for the container and for a single post item respectively.
|
155 |
+
- Tested compatibility with WordPress 5.9
|
|
|
|
|
|
|
|
|
|
|
156 |
|
157 |
---
|
158 |
[Version history →](https://plugins.trac.wordpress.org/browser/shortcodes-ultimate/trunk/changelog.txt)
|
shortcodes-ultimate.php
CHANGED
@@ -7,13 +7,13 @@
|
|
7 |
* Description: A comprehensive collection of visual components for WordPress
|
8 |
* Text Domain: shortcodes-ultimate
|
9 |
* License: GPLv3
|
10 |
-
* Version: 5.
|
11 |
* Requires PHP: 5.4
|
12 |
* Requires at least: 4.6
|
13 |
-
* Tested up to: 5.
|
14 |
*/
|
15 |
|
16 |
define( 'SU_PLUGIN_FILE', __FILE__ );
|
17 |
-
define( 'SU_PLUGIN_VERSION', '5.
|
18 |
|
19 |
require_once dirname( __FILE__ ) . '/plugin.php';
|
7 |
* Description: A comprehensive collection of visual components for WordPress
|
8 |
* Text Domain: shortcodes-ultimate
|
9 |
* License: GPLv3
|
10 |
+
* Version: 5.12.0
|
11 |
* Requires PHP: 5.4
|
12 |
* Requires at least: 4.6
|
13 |
+
* Tested up to: 5.9
|
14 |
*/
|
15 |
|
16 |
define( 'SU_PLUGIN_FILE', __FILE__ );
|
17 |
+
define( 'SU_PLUGIN_VERSION', '5.12.0' );
|
18 |
|
19 |
require_once dirname( __FILE__ ) . '/plugin.php';
|