Version Description
- Fix: Shortcodes inside shortcode content not getting executed.
- Fix: Disable Gutenberg block for older not supported WordPress versions.
Download this release
Release Info
Developer | vaakash |
Plugin | Shortcoder |
Version | 5.0.2 |
Comparing to | |
See all releases |
Code changes from version 5.0 to 5.0.2
- admin/js/script.js +5 -0
- admin/tools.php +4 -0
- readme.txt +11 -1
- shortcoder.php +4 -3
admin/js/script.js
CHANGED
@@ -68,6 +68,11 @@ $(document).ready(function(){
|
|
68 |
};
|
69 |
|
70 |
var load_cm_sc_mode = function(){
|
|
|
|
|
|
|
|
|
|
|
71 |
CodeMirror.defineMode('sc_mode', function(config, parserConfig){
|
72 |
var mustacheOverlay = {
|
73 |
token: function(stream, state){
|
68 |
};
|
69 |
|
70 |
var load_cm_sc_mode = function(){
|
71 |
+
|
72 |
+
if(typeof CodeMirror.overlayMode === 'undefined'){
|
73 |
+
return false;
|
74 |
+
}
|
75 |
+
|
76 |
CodeMirror.defineMode('sc_mode', function(config, parserConfig){
|
77 |
var mustacheOverlay = {
|
78 |
token: function(stream, state){
|
admin/tools.php
CHANGED
@@ -49,6 +49,10 @@ class SC_Admin_Tools{
|
|
49 |
|
50 |
public static function register_block(){
|
51 |
|
|
|
|
|
|
|
|
|
52 |
wp_register_script(
|
53 |
'shortcoder', SC_ADMIN_URL . '/js/blocks/shortcoder.js', array( 'wp-blocks', 'wp-element' )
|
54 |
);
|
49 |
|
50 |
public static function register_block(){
|
51 |
|
52 |
+
if( !function_exists( 'register_block_type' ) ){
|
53 |
+
return false;
|
54 |
+
}
|
55 |
+
|
56 |
wp_register_script(
|
57 |
'shortcoder', SC_ADMIN_URL . '/js/blocks/shortcoder.js', array( 'wp-blocks', 'wp-element' )
|
58 |
);
|
readme.txt
CHANGED
@@ -8,7 +8,7 @@ License: GPLv2 or later
|
|
8 |
Requires PHP: 5.3
|
9 |
Requires at least: 4.4
|
10 |
Tested up to: 5.3.2
|
11 |
-
Stable tag: 5.0
|
12 |
|
13 |
Create custom "Shortcodes" easily for HTML, JavaScript snippets and use the shortcodes within posts, pages & widgets.
|
14 |
|
@@ -88,6 +88,16 @@ Please check the following if you notice that the shortcode content is not print
|
|
88 |
|
89 |
== Changelog ==
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
= 5.0 =
|
92 |
* New: Brand new version. Plugin rewritten from scratch.
|
93 |
* New: Shortcoder block for the block editor.
|
8 |
Requires PHP: 5.3
|
9 |
Requires at least: 4.4
|
10 |
Tested up to: 5.3.2
|
11 |
+
Stable tag: 5.0.2
|
12 |
|
13 |
Create custom "Shortcodes" easily for HTML, JavaScript snippets and use the shortcodes within posts, pages & widgets.
|
14 |
|
88 |
|
89 |
== Changelog ==
|
90 |
|
91 |
+
= 5.0.2 =
|
92 |
+
* Fix: Shortcodes inside shortcode content not getting executed.
|
93 |
+
* Fix: Disable Gutenberg block for older not supported WordPress versions.
|
94 |
+
|
95 |
+
= 5.0.1 =
|
96 |
+
* Fix: Code editor escaping HTML characters.
|
97 |
+
* Fix: `get_current_screen()` undefined.
|
98 |
+
* Fix: Code editor breaks if there is any other plugin which loads codemirror.
|
99 |
+
* Fix: `tools.php` is not found.
|
100 |
+
|
101 |
= 5.0 =
|
102 |
* New: Brand new version. Plugin rewritten from scratch.
|
103 |
* New: Shortcoder block for the block editor.
|
shortcoder.php
CHANGED
@@ -4,11 +4,11 @@ Plugin Name: Shortcoder
|
|
4 |
Plugin URI: https://www.aakashweb.com/wordpress-plugins/shortcoder/
|
5 |
Description: Shortcoder plugin allows to create a custom shortcodes for HTML, JavaScript and other snippets. Now the shortcodes can be used in posts/pages and the snippet will be replaced in place.
|
6 |
Author: Aakash Chakravarthy
|
7 |
-
Version: 5.0
|
8 |
Author URI: https://www.aakashweb.com/
|
9 |
*/
|
10 |
|
11 |
-
define( 'SC_VERSION', '5.0' );
|
12 |
define( 'SC_PATH', plugin_dir_path( __FILE__ ) ); // All have trailing slash
|
13 |
define( 'SC_URL', plugin_dir_url( __FILE__ ) );
|
14 |
define( 'SC_ADMIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) . 'admin' ) );
|
@@ -18,7 +18,7 @@ define( 'SC_POST_TYPE', 'shortcoder' );
|
|
18 |
// error_reporting(E_ALL);
|
19 |
|
20 |
final class Shortcoder{
|
21 |
-
|
22 |
static public $shortcodes = array();
|
23 |
|
24 |
public static function init(){
|
@@ -68,6 +68,7 @@ final class Shortcoder{
|
|
68 |
$sc_content = self::replace_sc_params( $sc_content, $atts );
|
69 |
$sc_content = self::replace_wp_params( $sc_content, $enclosed_content );
|
70 |
$sc_content = self::replace_custom_fields( $sc_content );
|
|
|
71 |
|
72 |
return $sc_content;
|
73 |
|
4 |
Plugin URI: https://www.aakashweb.com/wordpress-plugins/shortcoder/
|
5 |
Description: Shortcoder plugin allows to create a custom shortcodes for HTML, JavaScript and other snippets. Now the shortcodes can be used in posts/pages and the snippet will be replaced in place.
|
6 |
Author: Aakash Chakravarthy
|
7 |
+
Version: 5.0.2
|
8 |
Author URI: https://www.aakashweb.com/
|
9 |
*/
|
10 |
|
11 |
+
define( 'SC_VERSION', '5.0.2' );
|
12 |
define( 'SC_PATH', plugin_dir_path( __FILE__ ) ); // All have trailing slash
|
13 |
define( 'SC_URL', plugin_dir_url( __FILE__ ) );
|
14 |
define( 'SC_ADMIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) . 'admin' ) );
|
18 |
// error_reporting(E_ALL);
|
19 |
|
20 |
final class Shortcoder{
|
21 |
+
|
22 |
static public $shortcodes = array();
|
23 |
|
24 |
public static function init(){
|
68 |
$sc_content = self::replace_sc_params( $sc_content, $atts );
|
69 |
$sc_content = self::replace_wp_params( $sc_content, $enclosed_content );
|
70 |
$sc_content = self::replace_custom_fields( $sc_content );
|
71 |
+
$sc_content = do_shortcode( $sc_content );
|
72 |
|
73 |
return $sc_content;
|
74 |
|