Skip to content

Commit 4a2a07a

Browse files
authored
Merge pull request #676 from wp-shortcake/release-v0.7.1
Bump version number and add changelog for v0.7.1
2 parents b653929 + a321b40 commit 4a2a07a

File tree

5 files changed

+140
-84
lines changed

5 files changed

+140
-84
lines changed

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
**Tags:** shortcodes
44
**Requires at least:** 4.5
55
**Tested up to:** 4.7
6-
**Stable tag:** 0.7.0
6+
**Stable tag:** 0.7.1
77
**License:** GPLv2 or later
88
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
99

@@ -27,9 +27,9 @@ New in 0.4.0 is the ability to [attach javascript functions to event attribute u
2727

2828
## Frequently Asked Questions ##
2929

30-
= How do I register UI for arbitrary key=>value pairs as shortcode attributes? =
30+
### How do I register UI for arbitrary key/value pairs as shortcode attributes? ###
3131

32-
Shortcake doesn't support custom key=>value pairs as shortcode attributes because it isn't a great user experience.
32+
Shortcake doesn't support custom key => value pairs as shortcode attributes because it isn't a great user experience.
3333

3434
### 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? ###
3535

@@ -76,6 +76,16 @@ We've removed the compatibility shim for the magical `content` attribute. If you
7676

7777
## Changelog ##
7878

79+
### 0.7.1 (December 16, 2016) ###
80+
* Change shortcode formatting to add a space before the self-closing trailing slash.
81+
* Fix alignment of attachment previews with long filenames.
82+
* 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).
83+
* 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.
84+
* 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.
85+
* 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.
86+
* Added Norwegian translation.
87+
* Multiple coding style fixes.
88+
7989
### 0.7.0 (November 18, 2016) ###
8090
* 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.
8191
* Added "Term Select" field type.
@@ -196,7 +206,7 @@ We've removed the compatibility shim for the magical `content` attribute. If you
196206

197207
* Supports all HTML5 input types for form fields.
198208
* Shortcode preview tab within the editing experience.
199-
* Re-labeled the UI around “Post Elements”, which is more descriptive than “Content Items.”
209+
}* Re-labeled the UI around “Post Elements”, which is more descriptive than “Content Items.”
200210
* Many bug fixes.
201211
* [Full release notes](http://next.fusion.net/2014/12/23/shortcake-v0-1-0-live-previews-fieldmanager-integration/).
202212

dev.php

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function shortcode_ui_dev_example_notices() {
6565
if ( current_user_can( 'activate_plugins' ) ) {
6666
?>
6767
<div class="error message">
68-
<p><?php esc_html_e( 'Shortcode UI plugin must be active for Shortcode UI Example plugin to function.', 'shortcode-ui-example' ); ?></p>
68+
<p><?php esc_html_e( 'Shortcode UI plugin must be active for Shortcode UI Example plugin to function.', 'shortcode-ui-example', 'shortcode-ui' ); ?></p>
6969
</div>
7070
<?php
7171
}
@@ -116,7 +116,7 @@ function shortcode_ui_dev_minimal_example() {
116116
shortcode_ui_register_for_shortcode(
117117
'shortcake-no-attributes', // Shortcode tag this UI is for.
118118
array( // Shortcode UI args.
119-
'label' => esc_html__( 'Shortcake With No Attributes', 'shortcode-ui-example' ),
119+
'label' => esc_html__( 'Shortcake With No Attributes', 'shortcode-ui-example', 'shortcode-ui' ),
120120
)
121121
);
122122
}
@@ -156,7 +156,7 @@ function shortcode_ui_dev_advanced_example() {
156156
*/
157157
$fields = array(
158158
array(
159-
'label' => esc_html__( 'Attachment', 'shortcode-ui-example' ),
159+
'label' => esc_html__( 'Attachment', 'shortcode-ui-example', 'shortcode-ui' ),
160160
'attr' => 'attachment',
161161
'type' => 'attachment',
162162
/*
@@ -166,79 +166,79 @@ function shortcode_ui_dev_advanced_example() {
166166
* 'frameTitle' - Title for the modal UI once the library is open.
167167
*/
168168
'libraryType' => array( 'image' ),
169-
'addButton' => esc_html__( 'Select Image', 'shortcode-ui-example' ),
170-
'frameTitle' => esc_html__( 'Select Image', 'shortcode-ui-example' ),
169+
'addButton' => esc_html__( 'Select Image', 'shortcode-ui-example', 'shortcode-ui' ),
170+
'frameTitle' => esc_html__( 'Select Image', 'shortcode-ui-example', 'shortcode-ui' ),
171171
),
172172
array(
173173
'label' => 'Gallery',
174174
'attr' => 'gallery',
175-
'description' => esc_html__( 'You can select multiple images.' ),
175+
'description' => esc_html__( 'You can select multiple images.', 'shortcode-ui' ),
176176
'type' => 'attachment',
177177
'libraryType' => array( 'image' ),
178178
'multiple' => true,
179179
'addButton' => 'Select Images',
180180
'frameTitle' => 'Select Images',
181181
),
182182
array(
183-
'label' => esc_html__( 'Citation Source', 'shortcode-ui-example' ),
183+
'label' => esc_html__( 'Citation Source', 'shortcode-ui-example', 'shortcode-ui' ),
184184
'attr' => 'source',
185185
'type' => 'text',
186186
'encode' => true,
187187
'meta' => array(
188-
'placeholder' => esc_html__( 'Test placeholder', 'shortcode-ui-example' ),
188+
'placeholder' => esc_html__( 'Test placeholder', 'shortcode-ui-example', 'shortcode-ui' ),
189189
'data-test' => 1,
190190
),
191191
),
192192
array(
193-
'label' => esc_html__( 'Select Page', 'shortcode-ui-example' ),
193+
'label' => esc_html__( 'Select Page', 'shortcode-ui-example', 'shortcode-ui' ),
194194
'attr' => 'page',
195195
'type' => 'post_select',
196196
'query' => array( 'post_type' => 'page' ),
197197
'multiple' => true,
198198
),
199199
array(
200-
'label' => __( 'Select Term', 'shortcode-ui-example' ),
200+
'label' => __( 'Select Term', 'shortcode-ui-example', 'shortcode-ui' ),
201201
'attr' => 'term',
202202
'type' => 'term_select',
203203
'taxonomy' => 'post_tag',
204204
'multiple' => true,
205205
),
206206
array(
207-
'label' => __( 'User Select', 'shortcode-ui-example' ),
207+
'label' => __( 'User Select', 'shortcode-ui-example', 'shortcode-ui' ),
208208
'attr' => 'users',
209209
'type' => 'user_select',
210210
'multiple' => true,
211211
),
212212
array(
213-
'label' => esc_html__( 'Color', 'shortcode-ui-example' ),
213+
'label' => esc_html__( 'Color', 'shortcode-ui-example', 'shortcode-ui' ),
214214
'attr' => 'color',
215215
'type' => 'color',
216216
'encode' => false,
217217
'meta' => array(
218-
'placeholder' => esc_html__( 'Hex color code', 'shortcode-ui-example' ),
218+
'placeholder' => esc_html__( 'Hex color code', 'shortcode-ui-example', 'shortcode-ui' ),
219219
),
220220
),
221221
array(
222-
'label' => esc_html__( 'Alignment', 'shortcode-ui-example' ),
223-
'description' => esc_html__( 'Whether the quotation should be displayed as pull-left, pull-right, or neither.', 'shortcode-ui-example' ),
222+
'label' => esc_html__( 'Alignment', 'shortcode-ui-example', 'shortcode-ui' ),
223+
'description' => esc_html__( 'Whether the quotation should be displayed as pull-left, pull-right, or neither.', 'shortcode-ui-example', 'shortcode-ui' ),
224224
'attr' => 'alignment',
225225
'type' => 'select',
226226
'options' => array(
227-
array( 'value' => '', 'label' => esc_html__( 'None', 'shortcode-ui-example' ) ),
228-
array( 'value' => 'left', 'label' => esc_html__( 'Pull Left', 'shortcode-ui-example' ) ),
229-
array( 'value' => 'right', 'label' => esc_html__( 'Pull Right', 'shortcode-ui-example' ) ),
227+
array( 'value' => '', 'label' => esc_html__( 'None', 'shortcode-ui-example', 'shortcode-ui' ) ),
228+
array( 'value' => 'left', 'label' => esc_html__( 'Pull Left', 'shortcode-ui-example', 'shortcode-ui' ) ),
229+
array( 'value' => 'right', 'label' => esc_html__( 'Pull Right', 'shortcode-ui-example', 'shortcode-ui' ) ),
230230
array(
231231
'label' => 'Test Optgroup',
232232
'options' => array(
233-
array( 'value' => 'left-2', 'label' => esc_html__( 'Pull Left', 'shortcode-ui-example' ) ),
234-
array( 'value' => 'right-2', 'label' => esc_html__( 'Pull Right', 'shortcode-ui-example' ) ),
233+
array( 'value' => 'left-2', 'label' => esc_html__( 'Pull Left', 'shortcode-ui-example', 'shortcode-ui' ) ),
234+
array( 'value' => 'right-2', 'label' => esc_html__( 'Pull Right', 'shortcode-ui-example', 'shortcode-ui' ) ),
235235
)
236236
),
237237
),
238238
),
239239
array(
240-
'label' => esc_html__( 'Year', 'shortcode-ui-example' ),
241-
'description' => esc_html__( 'Optional. The year the quotation is from.', 'shortcode-ui-example' ),
240+
'label' => esc_html__( 'Year', 'shortcode-ui-example', 'shortcode-ui' ),
241+
'description' => esc_html__( 'Optional. The year the quotation is from.', 'shortcode-ui-example', 'shortcode-ui' ),
242242
'attr' => 'year',
243243
'type' => 'number',
244244
'meta' => array(
@@ -257,7 +257,7 @@ function shortcode_ui_dev_advanced_example() {
257257
/*
258258
* How the shortcode should be labeled in the UI. Required argument.
259259
*/
260-
'label' => esc_html__( 'Shortcake Dev', 'shortcode-ui-example' ),
260+
'label' => esc_html__( 'Shortcake Dev', 'shortcode-ui-example', 'shortcode-ui' ),
261261

262262
/*
263263
* Include an icon with your shortcode. Optional.
@@ -276,8 +276,8 @@ function shortcode_ui_dev_advanced_example() {
276276
* data present will be backed-up during editing.
277277
*/
278278
'inner_content' => array(
279-
'label' => esc_html__( 'Quote', 'shortcode-ui-example' ),
280-
'description' => esc_html__( 'Include a statement from someone famous.', 'shortcode-ui-example' ),
279+
'label' => esc_html__( 'Quote', 'shortcode-ui-example', 'shortcode-ui' ),
280+
'description' => esc_html__( 'Include a statement from someone famous.', 'shortcode-ui-example', 'shortcode-ui' ),
281281
),
282282

283283
/*
@@ -349,47 +349,47 @@ function( $user_id ) {
349349
<p style="margin:0; padding: 0;">
350350

351351
<?php if ( ! empty( $content ) ) : ?>
352-
<b><?php esc_html_e( 'Content:', 'shortcode-ui-example' ); ?></b> <?php echo wpautop( wp_kses_post( $content ) ); ?></br>
352+
<b><?php esc_html_e( 'Content:', 'shortcode-ui-example', 'shortcode-ui' ); ?></b> <?php echo wpautop( wp_kses_post( $content ) ); ?></br>
353353
<?php endif; ?>
354354

355355
<?php if ( ! empty( $attr['source'] ) ) : ?>
356-
<b><?php esc_html_e( 'Source:', 'shortcode-ui-example' ); ?></b> <?php echo wp_kses_post( $attr['source'] ); ?></br>
356+
<b><?php esc_html_e( 'Source:', 'shortcode-ui-example', 'shortcode-ui' ); ?></b> <?php echo wp_kses_post( $attr['source'] ); ?></br>
357357
<?php endif; ?>
358358

359359
<?php if ( ! empty( $attr['attachment'] ) ) : ?>
360-
<b><?php esc_html_e( 'Image:', 'shortcode-ui-example' ); ?></b> <?php echo wp_kses_post( wp_get_attachment_image( $attr['attachment'], array( 50, 50 ) ) ); ?></br>
360+
<b><?php esc_html_e( 'Image:', 'shortcode-ui-example', 'shortcode-ui' ); ?></b> <?php echo wp_kses_post( wp_get_attachment_image( $attr['attachment'], array( 50, 50 ) ) ); ?></br>
361361
<?php endif; ?>
362362

363363
<?php if ( ! empty( $attr['gallery'] ) ) : ?>
364-
<b><?php esc_html_e( 'Gallery:', 'shortcode-ui-example' ); ?></b>
364+
<b><?php esc_html_e( 'Gallery:', 'shortcode-ui-example', 'shortcode-ui' ); ?></b>
365365
<?php foreach ( explode( ',', $attr['gallery'] ) as $attachment ) : ?>
366366
<?php echo wp_kses_post( wp_get_attachment_image( $attachment, array( 50, 50 ) ) ); ?>
367367
<?php endforeach; ?>
368368
<br />
369369
<?php endif; ?>
370370

371371
<?php if ( ! empty( $attr['page'] ) ) : ?>
372-
<b><?php esc_html_e( 'Pages:', 'shortcode-ui-example' ); ?></b> <?php echo esc_html( implode( ', ', $attr['page'] ) ); ?></br>
372+
<b><?php esc_html_e( 'Pages:', 'shortcode-ui-example', 'shortcode-ui' ); ?></b> <?php echo esc_html( implode( ', ', $attr['page'] ) ); ?></br>
373373
<?php endif; ?>
374374

375375
<?php if ( ! empty( $attr['term'] ) ) : ?>
376-
<b><?php esc_html_e( 'Terms:', 'shortcode-ui-example' ); ?></b> <?php echo esc_html( implode( ', ', $attr['term'] ) ); ?></br>
376+
<b><?php esc_html_e( 'Terms:', 'shortcode-ui-example', 'shortcode-ui' ); ?></b> <?php echo esc_html( implode( ', ', $attr['term'] ) ); ?></br>
377377
<?php endif; ?>
378378

379379
<?php if ( ! empty( $attr['users'] ) ) : ?>
380-
<b><?php esc_html_e( 'Users:', 'shortcode-ui-example' ); ?></b> <?php echo esc_html( implode( ', ', $attr['users'] ) ); ?></br>
380+
<b><?php esc_html_e( 'Users:', 'shortcode-ui-example', 'shortcode-ui' ); ?></b> <?php echo esc_html( implode( ', ', $attr['users'] ) ); ?></br>
381381
<?php endif; ?>
382382

383383
<?php if ( ! empty( $attr['color'] ) ) : ?>
384-
<b><?php esc_html_e( 'Color:', 'shortcode-ui-example' ); ?></b> <span style="display: inline-block; width: 1.5em; height: 1.5em; vertical-align: bottom; background-color: <?php echo esc_html( $attr['color'] ); ?>"></span></br>
384+
<b><?php esc_html_e( 'Color:', 'shortcode-ui-example', 'shortcode-ui' ); ?></b> <span style="display: inline-block; width: 1.5em; height: 1.5em; vertical-align: bottom; background-color: <?php echo esc_html( $attr['color'] ); ?>"></span></br>
385385
<?php endif; ?>
386386

387387
<?php if ( ! empty( $attr['alignment'] ) ) : ?>
388-
<b><?php esc_html_e( 'Alignment:', 'shortcode-ui-example' ); ?></b> <?php echo esc_html( $attr['alignment'] ); ?></br>
388+
<b><?php esc_html_e( 'Alignment:', 'shortcode-ui-example', 'shortcode-ui' ); ?></b> <?php echo esc_html( $attr['alignment'] ); ?></br>
389389
<?php endif; ?>
390390

391391
<?php if ( ! empty( $attr['year'] ) ) : ?>
392-
<b><?php esc_html_e( 'Year:', 'shortcode-ui-example' ); ?></b> <?php echo esc_html( $attr['year'] ); ?></br>
392+
<b><?php esc_html_e( 'Year:', 'shortcode-ui-example', 'shortcode-ui' ); ?></b> <?php echo esc_html( $attr['year'] ); ?></br>
393393
<?php endif; ?>
394394

395395
</p>

0 commit comments

Comments
 (0)