Version Description
(November 12, 2015) =
* Bug fix: Listens for "change" event on radio buttons and checkboxes to ensure shortcode attributes are updated.
* Bug fix: Ensures register_shortcode_ui
is always run before calling get_shortcodes(). Fixes post select AJAX callback when using register_shortcode_ui
hook.
Download this release
Release Info
Developer | danielbachhuber |
Plugin | Shortcake (Shortcode UI) |
Version | 0.6.2 |
Comparing to | |
See all releases |
Code changes from version 0.6.1 to 0.6.2
- inc/class-shortcode-ui.php +13 -0
- js/build/shortcode-ui.js +5 -3
- js/src/views/edit-attribute-field.js +5 -3
- readme.txt +5 -1
- shortcode-ui.php +2 -2
inc/class-shortcode-ui.php
CHANGED
@@ -129,6 +129,19 @@ class Shortcode_UI {
|
|
129 |
* @return array
|
130 |
*/
|
131 |
public function get_shortcodes() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
/**
|
133 |
* Filter the returned shortcode UI configuration parameters.
|
134 |
*
|
129 |
* @return array
|
130 |
*/
|
131 |
public function get_shortcodes() {
|
132 |
+
|
133 |
+
if ( ! did_action( 'register_shortcode_ui' ) ) {
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Register shortcode UI for shortcodes.
|
137 |
+
*
|
138 |
+
* Can be used to register shortcode UI only when an editor is being enqueued.
|
139 |
+
*
|
140 |
+
* @param array $settings Settings array for the ective WP_Editor.
|
141 |
+
*/
|
142 |
+
do_action( 'register_shortcode_ui', array(), '' );
|
143 |
+
}
|
144 |
+
|
145 |
/**
|
146 |
* Filter the returned shortcode UI configuration parameters.
|
147 |
*
|
js/build/shortcode-ui.js
CHANGED
@@ -1254,9 +1254,11 @@ var editAttributeField = Backbone.View.extend( {
|
|
1254 |
tagName: "div",
|
1255 |
|
1256 |
events: {
|
1257 |
-
'input input':
|
1258 |
-
'input textarea':
|
1259 |
-
'change select':
|
|
|
|
|
1260 |
},
|
1261 |
|
1262 |
render: function() {
|
1254 |
tagName: "div",
|
1255 |
|
1256 |
events: {
|
1257 |
+
'input input': 'inputChanged',
|
1258 |
+
'input textarea': 'inputChanged',
|
1259 |
+
'change select': 'inputChanged',
|
1260 |
+
'change input[type="radio"]': 'inputChanged',
|
1261 |
+
'change input[type="checkbox"]': 'inputChanged'
|
1262 |
},
|
1263 |
|
1264 |
render: function() {
|
js/src/views/edit-attribute-field.js
CHANGED
@@ -7,9 +7,11 @@ var editAttributeField = Backbone.View.extend( {
|
|
7 |
tagName: "div",
|
8 |
|
9 |
events: {
|
10 |
-
'input input':
|
11 |
-
'input textarea':
|
12 |
-
'change select':
|
|
|
|
|
13 |
},
|
14 |
|
15 |
render: function() {
|
7 |
tagName: "div",
|
8 |
|
9 |
events: {
|
10 |
+
'input input': 'inputChanged',
|
11 |
+
'input textarea': 'inputChanged',
|
12 |
+
'change select': 'inputChanged',
|
13 |
+
'change input[type="radio"]': 'inputChanged',
|
14 |
+
'change input[type="checkbox"]': 'inputChanged'
|
15 |
},
|
16 |
|
17 |
render: function() {
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: fusionengineering, mattheu, danielbachhuber, zebulonj, goldenapple
|
|
3 |
Tags: shortcodes
|
4 |
Requires at least: 4.1
|
5 |
Tested up to: 4.4
|
6 |
-
Stable tag: 0.6.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -51,6 +51,10 @@ We've removed the compatibility shim for the magical `content` attribute. If you
|
|
51 |
|
52 |
== Changelog ==
|
53 |
|
|
|
|
|
|
|
|
|
54 |
= 0.6.1 (November 9, 2015) =
|
55 |
* Fixes JavaScript TypeError when clicking media frame menu items.
|
56 |
* Corrects links in readme.
|
3 |
Tags: shortcodes
|
4 |
Requires at least: 4.1
|
5 |
Tested up to: 4.4
|
6 |
+
Stable tag: 0.6.2
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
51 |
|
52 |
== Changelog ==
|
53 |
|
54 |
+
= 0.6.2 (November 12, 2015) =
|
55 |
+
* Bug fix: Listens for "change" event on radio buttons and checkboxes to ensure shortcode attributes are updated.
|
56 |
+
* Bug fix: Ensures `register_shortcode_ui` is always run before calling get_shortcodes(). Fixes post select AJAX callback when using `register_shortcode_ui` hook.
|
57 |
+
|
58 |
= 0.6.1 (November 9, 2015) =
|
59 |
* Fixes JavaScript TypeError when clicking media frame menu items.
|
60 |
* Corrects links in readme.
|
shortcode-ui.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Shortcake (Shortcode UI)
|
4 |
-
* Version: 0.6.
|
5 |
* Description: User Interface for adding shortcodes.
|
6 |
* Author: Fusion Engineering and community
|
7 |
* Author URI: http://next.fusion.net/tag/shortcode-ui/
|
@@ -19,7 +19,7 @@
|
|
19 |
* GNU General Public License for more details.
|
20 |
*/
|
21 |
|
22 |
-
define( 'SHORTCODE_UI_VERSION', '0.6.
|
23 |
|
24 |
require_once dirname( __FILE__ ) . '/inc/class-shortcode-ui.php';
|
25 |
require_once dirname( __FILE__ ) . '/inc/fields/class-shortcode-ui-fields.php';
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Shortcake (Shortcode UI)
|
4 |
+
* Version: 0.6.2
|
5 |
* Description: User Interface for adding shortcodes.
|
6 |
* Author: Fusion Engineering and community
|
7 |
* Author URI: http://next.fusion.net/tag/shortcode-ui/
|
19 |
* GNU General Public License for more details.
|
20 |
*/
|
21 |
|
22 |
+
define( 'SHORTCODE_UI_VERSION', '0.6.2' );
|
23 |
|
24 |
require_once dirname( __FILE__ ) . '/inc/class-shortcode-ui.php';
|
25 |
require_once dirname( __FILE__ ) . '/inc/fields/class-shortcode-ui-fields.php';
|