diff --git a/README.md b/README.md index bd689082..6450b981 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ **Tags:** shortcodes **Requires at least:** 4.5 **Tested up to:** 4.7 -**Stable tag:** 0.7.0 +**Stable tag:** 0.7.1 **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html @@ -27,9 +27,9 @@ New in 0.4.0 is the ability to [attach javascript functions to event attribute u ## Frequently Asked Questions ## -= How do I register UI for arbitrary key=>value pairs as shortcode attributes? = +### How do I register UI for arbitrary key/value pairs as shortcode attributes? ### -Shortcake doesn't support custom key=>value pairs as shortcode attributes because it isn't a great user experience. +Shortcake doesn't support custom key => value pairs as shortcode attributes because it isn't a great user experience. ### After upgrading to Shortcake 0.7.x, some of the shortcode UI fields (post select, user select, etc) don't work as expected. What can I do? ### @@ -76,6 +76,16 @@ We've removed the compatibility shim for the magical `content` attribute. If you ## Changelog ## +### 0.7.1 (December 16, 2016) ### +* Change shortcode formatting to add a space before the self-closing trailing slash. +* Fix alignment of attachment previews with long filenames. +* Bug fix: Set an initial value on select fields (previously, no value would be set for a select field unless the user interacts with the field). +* Enhancement/fix: Reuse one copy of the media modal and reset its state upon closing, rather than creating duplicate markup each time the modal is accessed. +* Compatability: Uses "full" version of select2.js 4.0.3 to prevent plugin conflicts with other plugins which expect the full version to be enqueued. +* Compatability: Add `SELECT2_NOCONFLICT` flag to load Select2 in a unique namespace to prevent conflicts with other plugins which are loading select2.js version 3. +* Added Norwegian translation. +* Multiple coding style fixes. + ### 0.7.0 (November 18, 2016) ### * Adds "Add post element" button to media buttons - one click to open the shortcode list, rather than clicking "Add media" button and then finding "insert post element" in the menu. * Added "Term Select" field type. @@ -196,7 +206,7 @@ We've removed the compatibility shim for the magical `content` attribute. If you * Supports all HTML5 input types for form fields. * Shortcode preview tab within the editing experience. -* Re-labeled the UI around “Post Elements”, which is more descriptive than “Content Items.” + }* Re-labeled the UI around “Post Elements”, which is more descriptive than “Content Items.” * Many bug fixes. * [Full release notes](http://next.fusion.net/2014/12/23/shortcake-v0-1-0-live-previews-fieldmanager-integration/). diff --git a/dev.php b/dev.php index 4145d8ab..7a52bd56 100644 --- a/dev.php +++ b/dev.php @@ -65,7 +65,7 @@ function shortcode_ui_dev_example_notices() { if ( current_user_can( 'activate_plugins' ) ) { ?>
esc_html__( 'Shortcake With No Attributes', 'shortcode-ui-example' ), + 'label' => esc_html__( 'Shortcake With No Attributes', 'shortcode-ui-example', 'shortcode-ui' ), ) ); } @@ -156,7 +156,7 @@ function shortcode_ui_dev_advanced_example() { */ $fields = array( array( - 'label' => esc_html__( 'Attachment', 'shortcode-ui-example' ), + 'label' => esc_html__( 'Attachment', 'shortcode-ui-example', 'shortcode-ui' ), 'attr' => 'attachment', 'type' => 'attachment', /* @@ -166,13 +166,13 @@ function shortcode_ui_dev_advanced_example() { * 'frameTitle' - Title for the modal UI once the library is open. */ 'libraryType' => array( 'image' ), - 'addButton' => esc_html__( 'Select Image', 'shortcode-ui-example' ), - 'frameTitle' => esc_html__( 'Select Image', 'shortcode-ui-example' ), + 'addButton' => esc_html__( 'Select Image', 'shortcode-ui-example', 'shortcode-ui' ), + 'frameTitle' => esc_html__( 'Select Image', 'shortcode-ui-example', 'shortcode-ui' ), ), array( 'label' => 'Gallery', 'attr' => 'gallery', - 'description' => esc_html__( 'You can select multiple images.' ), + 'description' => esc_html__( 'You can select multiple images.', 'shortcode-ui' ), 'type' => 'attachment', 'libraryType' => array( 'image' ), 'multiple' => true, @@ -180,65 +180,65 @@ function shortcode_ui_dev_advanced_example() { 'frameTitle' => 'Select Images', ), array( - 'label' => esc_html__( 'Citation Source', 'shortcode-ui-example' ), + 'label' => esc_html__( 'Citation Source', 'shortcode-ui-example', 'shortcode-ui' ), 'attr' => 'source', 'type' => 'text', 'encode' => true, 'meta' => array( - 'placeholder' => esc_html__( 'Test placeholder', 'shortcode-ui-example' ), + 'placeholder' => esc_html__( 'Test placeholder', 'shortcode-ui-example', 'shortcode-ui' ), 'data-test' => 1, ), ), array( - 'label' => esc_html__( 'Select Page', 'shortcode-ui-example' ), + 'label' => esc_html__( 'Select Page', 'shortcode-ui-example', 'shortcode-ui' ), 'attr' => 'page', 'type' => 'post_select', 'query' => array( 'post_type' => 'page' ), 'multiple' => true, ), array( - 'label' => __( 'Select Term', 'shortcode-ui-example' ), + 'label' => __( 'Select Term', 'shortcode-ui-example', 'shortcode-ui' ), 'attr' => 'term', 'type' => 'term_select', 'taxonomy' => 'post_tag', 'multiple' => true, ), array( - 'label' => __( 'User Select', 'shortcode-ui-example' ), + 'label' => __( 'User Select', 'shortcode-ui-example', 'shortcode-ui' ), 'attr' => 'users', 'type' => 'user_select', 'multiple' => true, ), array( - 'label' => esc_html__( 'Color', 'shortcode-ui-example' ), + 'label' => esc_html__( 'Color', 'shortcode-ui-example', 'shortcode-ui' ), 'attr' => 'color', 'type' => 'color', 'encode' => false, 'meta' => array( - 'placeholder' => esc_html__( 'Hex color code', 'shortcode-ui-example' ), + 'placeholder' => esc_html__( 'Hex color code', 'shortcode-ui-example', 'shortcode-ui' ), ), ), array( - 'label' => esc_html__( 'Alignment', 'shortcode-ui-example' ), - 'description' => esc_html__( 'Whether the quotation should be displayed as pull-left, pull-right, or neither.', 'shortcode-ui-example' ), + 'label' => esc_html__( 'Alignment', 'shortcode-ui-example', 'shortcode-ui' ), + 'description' => esc_html__( 'Whether the quotation should be displayed as pull-left, pull-right, or neither.', 'shortcode-ui-example', 'shortcode-ui' ), 'attr' => 'alignment', 'type' => 'select', 'options' => array( - array( 'value' => '', 'label' => esc_html__( 'None', 'shortcode-ui-example' ) ), - array( 'value' => 'left', 'label' => esc_html__( 'Pull Left', 'shortcode-ui-example' ) ), - array( 'value' => 'right', 'label' => esc_html__( 'Pull Right', 'shortcode-ui-example' ) ), + array( 'value' => '', 'label' => esc_html__( 'None', 'shortcode-ui-example', 'shortcode-ui' ) ), + array( 'value' => 'left', 'label' => esc_html__( 'Pull Left', 'shortcode-ui-example', 'shortcode-ui' ) ), + array( 'value' => 'right', 'label' => esc_html__( 'Pull Right', 'shortcode-ui-example', 'shortcode-ui' ) ), array( 'label' => 'Test Optgroup', 'options' => array( - array( 'value' => 'left-2', 'label' => esc_html__( 'Pull Left', 'shortcode-ui-example' ) ), - array( 'value' => 'right-2', 'label' => esc_html__( 'Pull Right', 'shortcode-ui-example' ) ), + array( 'value' => 'left-2', 'label' => esc_html__( 'Pull Left', 'shortcode-ui-example', 'shortcode-ui' ) ), + array( 'value' => 'right-2', 'label' => esc_html__( 'Pull Right', 'shortcode-ui-example', 'shortcode-ui' ) ), ) ), ), ), array( - 'label' => esc_html__( 'Year', 'shortcode-ui-example' ), - 'description' => esc_html__( 'Optional. The year the quotation is from.', 'shortcode-ui-example' ), + 'label' => esc_html__( 'Year', 'shortcode-ui-example', 'shortcode-ui' ), + 'description' => esc_html__( 'Optional. The year the quotation is from.', 'shortcode-ui-example', 'shortcode-ui' ), 'attr' => 'year', 'type' => 'number', 'meta' => array( @@ -257,7 +257,7 @@ function shortcode_ui_dev_advanced_example() { /* * How the shortcode should be labeled in the UI. Required argument. */ - 'label' => esc_html__( 'Shortcake Dev', 'shortcode-ui-example' ), + 'label' => esc_html__( 'Shortcake Dev', 'shortcode-ui-example', 'shortcode-ui' ), /* * Include an icon with your shortcode. Optional. @@ -276,8 +276,8 @@ function shortcode_ui_dev_advanced_example() { * data present will be backed-up during editing. */ 'inner_content' => array( - 'label' => esc_html__( 'Quote', 'shortcode-ui-example' ), - 'description' => esc_html__( 'Include a statement from someone famous.', 'shortcode-ui-example' ), + 'label' => esc_html__( 'Quote', 'shortcode-ui-example', 'shortcode-ui' ), + 'description' => esc_html__( 'Include a statement from someone famous.', 'shortcode-ui-example', 'shortcode-ui' ), ), /* @@ -349,19 +349,19 @@ function( $user_id ) {- + - + - + - + @@ -369,27 +369,27 @@ function( $user_id ) { - + - + - + - + - + - +
diff --git a/languages/shortcode-ui.pot b/languages/shortcode-ui.pot index e373a71c..b2aee75f 100644 --- a/languages/shortcode-ui.pot +++ b/languages/shortcode-ui.pot @@ -2,9 +2,9 @@ # This file is distributed under the GPL v2 or later. msgid "" msgstr "" -"Project-Id-Version: Shortcake (Shortcode UI) 0.7.0-alpha\n" +"Project-Id-Version: Shortcake (Shortcode UI) 0.7.1\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/shortcode-ui\n" -"POT-Creation-Date: 2016-04-20 14:44:36+00:00\n" +"POT-Creation-Date: 2016-12-16 22:19:41+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -42,117 +42,161 @@ msgstr "" msgid "Select Image" msgstr "" -#: dev.php:173 +#: dev.php:175 +msgid "You can select multiple images." +msgstr "" + +#: dev.php:183 msgid "Citation Source" msgstr "" -#: dev.php:178 +#: dev.php:188 msgid "Test placeholder" msgstr "" -#: dev.php:183 +#: dev.php:193 msgid "Select Page" msgstr "" -#: dev.php:190 -msgid "Background Color" +#: dev.php:200 +msgid "Select Term" +msgstr "" + +#: dev.php:207 +msgid "User Select" msgstr "" -#: dev.php:195 +#: dev.php:213 +msgid "Color" +msgstr "" + +#: dev.php:218 msgid "Hex color code" msgstr "" -#: dev.php:199 +#: dev.php:222 msgid "Alignment" msgstr "" -#: dev.php:200 +#: dev.php:223 msgid "" "Whether the quotation should be displayed as pull-left, pull-right, or " "neither." msgstr "" -#: dev.php:204 +#: dev.php:227 msgid "None" msgstr "" -#: dev.php:205 +#: dev.php:228 dev.php:233 msgid "Pull Left" msgstr "" -#: dev.php:206 +#: dev.php:229 dev.php:234 msgid "Pull Right" msgstr "" -#: dev.php:210 +#: dev.php:240 msgid "Year" msgstr "" -#: dev.php:211 +#: dev.php:241 msgid "Optional. The year the quotation is from." msgstr "" -#: dev.php:230 +#: dev.php:260 msgid "Shortcake Dev" msgstr "" -#: dev.php:249 +#: dev.php:279 msgid "Quote" msgstr "" -#: dev.php:250 +#: dev.php:280 msgid "Include a statement from someone famous." msgstr "" -#: dev.php:288 +#: dev.php:352 msgid "Content:" msgstr "" -#: dev.php:289 +#: dev.php:356 msgid "Source:" msgstr "" -#: dev.php:290 +#: dev.php:360 msgid "Image:" msgstr "" -#: inc/class-shortcode-ui.php:109 +#: dev.php:364 +msgid "Gallery:" +msgstr "" + +#: dev.php:372 +msgid "Pages:" +msgstr "" + +#: dev.php:376 +msgid "Terms:" +msgstr "" + +#: dev.php:380 +msgid "Users:" +msgstr "" + +#: dev.php:384 +msgid "Color:" +msgstr "" + +#: dev.php:388 +msgid "Alignment:" +msgstr "" + +#: dev.php:392 +msgid "Year:" +msgstr "" + +#: inc/class-shortcode-ui.php:110 msgid "Inner Content" msgstr "" -#: inc/class-shortcode-ui.php:236 inc/class-shortcode-ui.php:237 +#: inc/class-shortcode-ui.php:249 inc/class-shortcode-ui.php:250 msgid "Insert Post Element" msgstr "" -#: inc/class-shortcode-ui.php:238 +#: inc/class-shortcode-ui.php:251 msgid "%s Details" msgstr "" -#: inc/class-shortcode-ui.php:239 +#: inc/class-shortcode-ui.php:252 msgid "Insert Element" msgstr "" -#: inc/class-shortcode-ui.php:240 +#: inc/class-shortcode-ui.php:253 msgid "Update" msgstr "" -#: inc/class-shortcode-ui.php:241 +#: inc/class-shortcode-ui.php:254 msgid "There are no attributes to configure for this Post Element." msgstr "" -#: inc/class-shortcode-ui.php:242 +#: inc/class-shortcode-ui.php:255 msgid "Failed to load preview" msgstr "" -#: inc/class-shortcode-ui.php:243 +#: inc/class-shortcode-ui.php:256 msgid "Search" msgstr "" -#: inc/class-shortcode-ui.php:244 +#: inc/class-shortcode-ui.php:257 msgid "Insert Content" msgstr "" -#: inc/class-shortcode-ui.php:339 +#: inc/class-shortcode-ui.php:297 +msgid "Add Post Element" +msgstr "" + +#: inc/class-shortcode-ui.php:365 msgid "Something's rotten in the state of Denmark" msgstr "" @@ -161,14 +205,6 @@ msgstr "" msgid "Select Attachment" msgstr "" -#: inc/fields/class-field-attachment.php:104 -msgid "Thumbnail Details" -msgstr "" - -#: inc/fields/class-field-attachment.php:109 -msgid "Edit Attachment" -msgstr "" - #: inc/templates/edit-form.tpl.php:3 msgid "Back to list" msgstr "" diff --git a/readme.txt b/readme.txt index 384adea5..91ec38be 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: fusionengineering, mattheu, danielbachhuber, zebulonj, goldenapple Tags: shortcodes Requires at least: 4.5 Tested up to: 4.7 -Stable tag: 0.7.0 +Stable tag: 0.7.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -27,9 +27,9 @@ New in 0.4.0 is the ability to [attach javascript functions to event attribute u == Frequently Asked Questions == -= How do I register UI for arbitrary key=>value pairs as shortcode attributes? = += How do I register UI for arbitrary key/value pairs as shortcode attributes? = -Shortcake doesn't support custom key=>value pairs as shortcode attributes because it isn't a great user experience. +Shortcake doesn't support custom key => value pairs as shortcode attributes because it isn't a great user experience. = After upgrading to Shortcake 0.7.x, some of the shortcode UI fields (post select, user select, etc) don't work as expected. What can I do? = @@ -68,6 +68,16 @@ We've removed the compatibility shim for the magical `content` attribute. If you == Changelog == += 0.7.1 (December 16, 2016) = +* Change shortcode formatting to add a space before the self-closing trailing slash. +* Fix alignment of attachment previews with long filenames. +* Bug fix: Set an initial value on select fields (previously, no value would be set for a select field unless the user interacts with the field). +* Enhancement/fix: Reuse one copy of the media modal and reset its state upon closing, rather than creating duplicate markup each time the modal is accessed. +* Compatability: Uses "full" version of select2.js 4.0.3 to prevent plugin conflicts with other plugins which expect the full version to be enqueued. +* Compatability: Add `SELECT2_NOCONFLICT` flag to load Select2 in a unique namespace to prevent conflicts with other plugins which are loading select2.js version 3. +* Added Norwegian translation. +* Multiple coding style fixes. + = 0.7.0 (November 18, 2016) = * Adds "Add post element" button to media buttons - one click to open the shortcode list, rather than clicking "Add media" button and then finding "insert post element" in the menu. * Added "Term Select" field type. @@ -188,7 +198,7 @@ We've removed the compatibility shim for the magical `content` attribute. If you * Supports all HTML5 input types for form fields. * Shortcode preview tab within the editing experience. -* Re-labeled the UI around “Post Elements”, which is more descriptive than “Content Items.” + }* Re-labeled the UI around “Post Elements”, which is more descriptive than “Content Items.” * Many bug fixes. * [Full release notes](http://next.fusion.net/2014/12/23/shortcake-v0-1-0-live-previews-fieldmanager-integration/). diff --git a/shortcode-ui.php b/shortcode-ui.php index 6dd63bbf..56062e53 100644 --- a/shortcode-ui.php +++ b/shortcode-ui.php @@ -1,7 +1,7 @@