Version Description
(September 5, 2017) = * Security: Use nonce validation in ajax render shortcode callback to protect against CSRF. * Bug fix: Make sure that the same js hooks fire on all field types. * Bug fix: Fix bugs affecting multiple select fields (values could not be unset once set, and multiple default values couldn't be set). * Bug fix: Prevent encoded fields containing two percent characters from breaking. * Bug fix: Fix some issues where the media modal state was not reset properly if a shortcode was closed without saving. * Bug fix: Support cases where there are multiple WP_Editor instances on a page, and make sure that the shortcode being edited is sent to the correct page. * Enhancement: When post_select field is selecting from more than one post type, show the post type alongside the post name for easier selection. * Enhancement: Show attachment thumbnails for any attachment type, not just images. * Enhancement: Add more helpful error messages if no shortcodes with Shortcake UI are registered. * Update Norwegian translation
Release Info
Developer | goldenapples |
Plugin | Shortcake (Shortcode UI) |
Version | 0.7.3 |
Comparing to | |
See all releases |
Code changes from version 0.7.2 to 0.7.3
- composer.json +3 -2
- css/sass/_select2-fields.scss +4 -9
- css/shortcode-ui.css +5 -9
- css/shortcode-ui.css.map +1 -1
- inc/class-shortcode-ui.php +55 -2
- inc/fields/class-shortcode-ui-field-attachment.php +1 -1
- inc/fields/class-shortcode-ui-field-post-select.php +11 -1
- inc/templates/edit-form.tpl.php +2 -2
- js/build/shortcode-ui.js +57 -31
- js/src/controllers/media-controller.js +30 -3
- js/src/models/shortcode.js +1 -1
- js/src/shortcode-ui.js +4 -6
- js/src/utils/fetcher.js +2 -1
- js/src/utils/shortcode-view-constructor.js +7 -14
- js/src/views/edit-attribute-field-attachment.js +2 -0
- js/src/views/media-frame.js +5 -6
- js/src/views/select2-field.js +6 -0
- languages/shortcode-ui-nb_NO.mo +0 -0
- languages/shortcode-ui-nb_NO.po +112 -59
- languages/shortcode-ui-zh_CN.mo +0 -0
- languages/shortcode-ui-zh_CN.po +190 -47
- languages/shortcode-ui-zh_TW.mo +0 -0
- languages/shortcode-ui-zh_TW.po +240 -0
- languages/shortcode-ui.pot +73 -30
- readme.txt +14 -2
- shortcode-ui.php +13 -2
@@ -1,8 +1,9 @@
|
|
1 |
{
|
2 |
-
"name": "fusioneng/
|
3 |
"description": "Shortcake makes using WordPress shortcodes a piece of cake.",
|
4 |
"type": "wordpress-plugin",
|
5 |
"homepage": "https://github.com/fusioneng/Shortcake",
|
|
|
6 |
"authors": [
|
7 |
{
|
8 |
"name": "Fusion",
|
@@ -11,7 +12,7 @@
|
|
11 |
}
|
12 |
],
|
13 |
"require-dev": {
|
14 |
-
"squizlabs/php_codesniffer": "2.
|
15 |
"wp-coding-standards/wpcs": "dev-develop"
|
16 |
},
|
17 |
"scripts": {
|
1 |
{
|
2 |
+
"name": "fusioneng/shortcake",
|
3 |
"description": "Shortcake makes using WordPress shortcodes a piece of cake.",
|
4 |
"type": "wordpress-plugin",
|
5 |
"homepage": "https://github.com/fusioneng/Shortcake",
|
6 |
+
"license": "GPL-2.0+",
|
7 |
"authors": [
|
8 |
{
|
9 |
"name": "Fusion",
|
12 |
}
|
13 |
],
|
14 |
"require-dev": {
|
15 |
+
"squizlabs/php_codesniffer": "2.9.*",
|
16 |
"wp-coding-standards/wpcs": "dev-develop"
|
17 |
},
|
18 |
"scripts": {
|
@@ -1,5 +1,7 @@
|
|
1 |
.edit-shortcode-form {
|
2 |
.select2-container {
|
|
|
|
|
3 |
min-width: 300px;
|
4 |
}
|
5 |
|
@@ -8,7 +10,8 @@
|
|
8 |
-webkit-transition: none;
|
9 |
}
|
10 |
|
11 |
-
.select2-
|
|
|
12 |
z-index: 160001;
|
13 |
}
|
14 |
|
@@ -40,11 +43,3 @@
|
|
40 |
|
41 |
}
|
42 |
|
43 |
-
.select2-container {
|
44 |
-
z-index: 160000; // Make sure Select2 UI is visible above media modal
|
45 |
-
max-width: 300px;
|
46 |
-
}
|
47 |
-
|
48 |
-
.select2-results li {
|
49 |
-
margin: 0;
|
50 |
-
}
|
1 |
.edit-shortcode-form {
|
2 |
.select2-container {
|
3 |
+
z-index: 160000; // Make sure Select2 UI is visible above media modal
|
4 |
+
width: 300px;
|
5 |
min-width: 300px;
|
6 |
}
|
7 |
|
10 |
-webkit-transition: none;
|
11 |
}
|
12 |
|
13 |
+
.select2-dropdown {
|
14 |
+
transform: translateY(-2px); // Account for container border radius in select2--default theme
|
15 |
z-index: 160001;
|
16 |
}
|
17 |
|
43 |
|
44 |
}
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -82,7 +82,6 @@
|
|
82 |
background-color: #fff;
|
83 |
color: #333;
|
84 |
outline: none;
|
85 |
-
-webkit-transition: 0.05s border-color ease-in-out;
|
86 |
transition: 0.05s border-color ease-in-out;
|
87 |
max-width: 100%; }
|
88 |
.edit-shortcode-form input[type="range"] {
|
@@ -210,13 +209,17 @@
|
|
210 |
margin-left: 60px; } }
|
211 |
|
212 |
.edit-shortcode-form .select2-container {
|
|
|
|
|
213 |
min-width: 300px; }
|
214 |
|
215 |
.edit-shortcode-form .select2-container a {
|
216 |
transition: none;
|
217 |
-webkit-transition: none; }
|
218 |
|
219 |
-
.edit-shortcode-form .select2-
|
|
|
|
|
220 |
z-index: 160001; }
|
221 |
|
222 |
.edit-shortcode-form .select2 li {
|
@@ -239,11 +242,4 @@
|
|
239 |
.edit-shortcode-form .select2-container--default.select2-container--focus .select2-selection--multiple {
|
240 |
border-color: #5b9dd9;
|
241 |
box-shadow: 0 0 2px rgba(30, 140, 190, 0.8); }
|
242 |
-
|
243 |
-
.select2-container {
|
244 |
-
z-index: 160000;
|
245 |
-
max-width: 300px; }
|
246 |
-
|
247 |
-
.select2-results li {
|
248 |
-
margin: 0; }
|
249 |
/*# sourceMappingURL=shortcode-ui.css.map */
|
82 |
background-color: #fff;
|
83 |
color: #333;
|
84 |
outline: none;
|
|
|
85 |
transition: 0.05s border-color ease-in-out;
|
86 |
max-width: 100%; }
|
87 |
.edit-shortcode-form input[type="range"] {
|
209 |
margin-left: 60px; } }
|
210 |
|
211 |
.edit-shortcode-form .select2-container {
|
212 |
+
z-index: 160000;
|
213 |
+
width: 300px;
|
214 |
min-width: 300px; }
|
215 |
|
216 |
.edit-shortcode-form .select2-container a {
|
217 |
transition: none;
|
218 |
-webkit-transition: none; }
|
219 |
|
220 |
+
.edit-shortcode-form .select2-dropdown {
|
221 |
+
-webkit-transform: translateY(-2px);
|
222 |
+
transform: translateY(-2px);
|
223 |
z-index: 160001; }
|
224 |
|
225 |
.edit-shortcode-form .select2 li {
|
242 |
.edit-shortcode-form .select2-container--default.select2-container--focus .select2-selection--multiple {
|
243 |
border-color: #5b9dd9;
|
244 |
box-shadow: 0 0 2px rgba(30, 140, 190, 0.8); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
/*# sourceMappingURL=shortcode-ui.css.map */
|
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["sass/shortcode-ui.scss","sass/_field-image.scss","sass/_select2-fields.scss"],"names":[],"mappings":"AAAA;EACC,mBAAmB,EACnB;;AAED;EAGE,iBAAiB;EACjB,kBAAkB;EAClB,aAAa,EACb;;AANF;EASE,UAAU,EACV;;AAIF;EACC,gBAAgB,EAuDhB;EAxDD;IAIE,aAAa;IACb,YAAY;IAEZ,kFAAqE;IACrE,iBAAiB;IACjB,gBAAgB;IAChB,mBAAmB;IACnB,mBAAmB;IACnB,aAAa;IACb,cAAc,EAyCd;IAtDF;MAgBG,mBAAmB;MACnB,cAAc;MACd,gBAAgB,EAgBhB;MAlCH;;QAsBI,mBAAmB;QACnB,SAAS;QACT,UAAU;QACV,yCAAoB;gBAApB,iCAAoB;QACpB,mBAAmB;QACnB,qBAAqB;QACrB,YAAY;QACZ,aAAa;QACb,eAAe;QACf,gBAAgB,EAChB;IAhCJ;MAqCG,uBAAuB;MACvB,mBAAmB;MACnB,UAAU;MACV,QAAQ;MACR,YAAY;MACZ,UAAU;MACV,iBAAiB;MACjB,aAAa;MACb,iBAAiB;MACjB,iBAAiB;MACjB,sBAAsB;MACtB,mBAAmB;MACnB,kBAAkB;MAClB,qCAAgB;MAEhB,gDAAgC,EAChC;;AAKH;EAEE,aAAa;EACb,qBAAqB,EACrB;;AAJF;EAOE,cAAc;EACd,2BAA2B,EAC3B;;AATF;EAYE,8BAA8B,EAC9B;;AAbF;EAgBE,mBAAmB;EACnB,aAAa,EACb;;AAGF;EAEC,kBAAkB,EA2DlB;EA7DD;IAKE,eAAe;IACf,YAAY,EACZ;EAPF;;IAWE,uBAAuB;IAEvB,gDAAgC;IAChC,uBAAuB;IACvB,YAAY;IACZ,cAAc;
|
1 |
+
{"version":3,"sources":["sass/shortcode-ui.scss","sass/_field-image.scss","sass/_select2-fields.scss"],"names":[],"mappings":"AAAA;EACC,mBAAmB,EACnB;;AAED;EAGE,iBAAiB;EACjB,kBAAkB;EAClB,aAAa,EACb;;AANF;EASE,UAAU,EACV;;AAIF;EACC,gBAAgB,EAuDhB;EAxDD;IAIE,aAAa;IACb,YAAY;IAEZ,kFAAqE;IACrE,iBAAiB;IACjB,gBAAgB;IAChB,mBAAmB;IACnB,mBAAmB;IACnB,aAAa;IACb,cAAc,EAyCd;IAtDF;MAgBG,mBAAmB;MACnB,cAAc;MACd,gBAAgB,EAgBhB;MAlCH;;QAsBI,mBAAmB;QACnB,SAAS;QACT,UAAU;QACV,yCAAoB;gBAApB,iCAAoB;QACpB,mBAAmB;QACnB,qBAAqB;QACrB,YAAY;QACZ,aAAa;QACb,eAAe;QACf,gBAAgB,EAChB;IAhCJ;MAqCG,uBAAuB;MACvB,mBAAmB;MACnB,UAAU;MACV,QAAQ;MACR,YAAY;MACZ,UAAU;MACV,iBAAiB;MACjB,aAAa;MACb,iBAAiB;MACjB,iBAAiB;MACjB,sBAAsB;MACtB,mBAAmB;MACnB,kBAAkB;MAClB,qCAAgB;MAEhB,gDAAgC,EAChC;;AAKH;EAEE,aAAa;EACb,qBAAqB,EACrB;;AAJF;EAOE,cAAc;EACd,2BAA2B,EAC3B;;AATF;EAYE,8BAA8B,EAC9B;;AAbF;EAgBE,mBAAmB;EACnB,aAAa,EACb;;AAGF;EAEC,kBAAkB,EA2DlB;EA7DD;IAKE,eAAe;IACf,YAAY,EACZ;EAPF;;IAWE,uBAAuB;IAEvB,gDAAgC;IAChC,uBAAuB;IACvB,YAAY;IACZ,cAAc;IAEd,2CAA2C;IAC3C,gBAAgB,EAChB;EApBF;IAwBE,iBAAiB,EACjB;EAzBF;IA4BE,sBAAsB;IACtB,iBAAiB;IACjB,oBAAoB,EACpB;EA/BF;IAkCE,YAAY;IACZ,gBAAgB;IAChB,kBAAkB,EAClB;EArCF;IAwCU,oBAAoB,EAAI;EAxClC;IA4CE,eAAe,EAKf;IAjDF;MA8CG,eAAe;MACf,oBAAoB,EACpB;EAhDH;IAuDE,kBAAkB,EAClB;IAxDF;MAqDG,sBAAsB,EACtB;EAtDH;IA2DE,YAAY,EACZ;;AC7JF;EAGE,eAAe;EACf,YAAY;EACZ,oBAAoB,EACpB;;AANF;EASE,sBAAsB;EACtB,oBAAoB;EACpB,sBAAsB;EACtB,aAAa,EAKb;EAjBF;IAeG,sBAAsB,EACtB;;AAhBH;EAoBE,eAAe,EACf;;AArBF;EAyBE,wBAAwB;EACxB,yBAAyB;EACzB,sBAAsB;EACtB,mBAAmB;EACnB,mBAAmB;EACnB,WAAW,EAmFX;EAjHF;IAiCG,cAAc,EACd;EAlCH;IAsCG,WAAW;IACX,eAAe;IACf,mBAAmB;IACnB,SAAS;IACT,WAAW;IACX,uBAAuB;IACvB,0CAA0B;IAC1B,kBAAkB;IAClB,mBAAmB;IACnB,YAAY;IACZ,aAAa;IACb,WAAW;IACX,iBAAgB,EAUhB;IA5DH;MAqDI,iBAAiB;MACjB,mBAAmB;MACnB,UAAU;MACV,UAAU;MACV,gBAAgB;MAChB,eAAe,EACf;EA3DJ;IA+DG,gBAAgB;IAChB,iBAAiB;IACjB,YAAY;IACZ,aAAa,EACb;EAnEH;;IAuEG,cAAc,EACd;EAxEH;IA2EG,eAAe;IACf,mBAAmB;IACnB,YAAY;IACZ,aAAa,EACb;EA/EH;IAmFI,gBAAgB;IAChB,cAAc;IACd,mBAAmB;IACnB,YAAY;IACZ,mBAAmB;IACnB,uBAAuB,EACvB;EAzFJ;IA2FI,YAAY;IACZ,YAAY;IACZ,iBAAiB;IACjB,8BAA8B;IAC9B,qBAAqB,EAWrB;IA1GJ;MAkGK,0BAA0B;MAC1B,oBAAoB;MACpB,YAAY;MACZ,YAAY;MACZ,eAAe;MACf,sEAAsE;MACtE,8DAA8D,EAC9D;EAzGL;IA8GG,mBACA,EAAC;;AAMJ;EACC,cAAc,EAKd;EAND;IAIE,eAAe,EACf;;AAGF;EACC;IACC,mBAAmB,EAAA;EAEpB;IACC,kBAAkB,EAAA,EAAA;;AAIpB;EACC;IACC,mBAAmB,EAAA;EAEpB;IACC,kBAAkB,EAAA,EAAA;;AC3IpB;EAEE,gBAAgB;EAChB,aAAa;EACb,iBAAiB,EACjB;;AALF;EAQE,iBAAiB;EACjB,yBAAyB,EACzB;;AAVF;EAaE,oCAAqB;UAArB,4BAAqB;EACrB,gBAAgB,EAChB;;AAfF;EAkBE,UAAU,EACV;;AAnBF;EAsBE,oBAAoB,EACpB;;AAvBF;EA0BE,gBAAgB,EAChB;;AA3BF;EA8BE,iBAAiB;EACjB,mBAAmB;EACnB,gDAAgC;EAChC,uBAAuB;EACvB,YAAY;EACZ,cAAc,EACd;;AApCF;EAuCE,sBAAsB;EACtB,4CAAwB,EACxB","file":"shortcode-ui.css"}
|
@@ -73,6 +73,7 @@ class Shortcode_UI {
|
|
73 |
* Setup plugin actions.
|
74 |
*/
|
75 |
private function setup_actions() {
|
|
|
76 |
add_action( 'admin_enqueue_scripts', array( $this, 'action_admin_enqueue_scripts' ) );
|
77 |
add_action( 'wp_enqueue_editor', array( $this, 'action_wp_enqueue_editor' ) );
|
78 |
add_action( 'media_buttons', array( $this, 'action_media_buttons' ) );
|
@@ -80,6 +81,44 @@ class Shortcode_UI {
|
|
80 |
add_filter( 'wp_editor_settings', array( $this, 'filter_wp_editor_settings' ), 10, 2 );
|
81 |
}
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
/**
|
84 |
* When a WP_Editor is initialized on a page, call the 'register_shortcode_ui' action.
|
85 |
*
|
@@ -181,6 +220,15 @@ class Shortcode_UI {
|
|
181 |
return $shortcodes;
|
182 |
}
|
183 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
/**
|
185 |
* Get UI configuration parameters for a given shortcode.
|
186 |
*
|
@@ -213,8 +261,8 @@ class Shortcode_UI {
|
|
213 |
);
|
214 |
|
215 |
if ( 'select2' !== self::$select2_handle ) {
|
216 |
-
|
217 |
-
|
218 |
}
|
219 |
|
220 |
wp_register_style( self::$select2_handle,
|
@@ -305,6 +353,10 @@ class Shortcode_UI {
|
|
305 |
* Output an "Add Post Element" button with the media buttons.
|
306 |
*/
|
307 |
public function action_media_buttons( $editor_id ) {
|
|
|
|
|
|
|
|
|
308 |
printf( '<button type="button" class="button shortcake-add-post-element" data-editor="%s">' .
|
309 |
'<span class="wp-media-buttons-icon dashicons dashicons-migrate"></span> %s' .
|
310 |
'</button>',
|
@@ -410,6 +462,7 @@ class Shortcode_UI {
|
|
410 |
* Get a bunch of shortcodes to render in MCE preview.
|
411 |
*/
|
412 |
public function handle_ajax_bulk_do_shortcode() {
|
|
|
413 |
|
414 |
if ( is_array( $_POST['queries'] ) ) {
|
415 |
|
73 |
* Setup plugin actions.
|
74 |
*/
|
75 |
private function setup_actions() {
|
76 |
+
add_action( 'admin_notices', array( $this, 'action_admin_notices' ) );
|
77 |
add_action( 'admin_enqueue_scripts', array( $this, 'action_admin_enqueue_scripts' ) );
|
78 |
add_action( 'wp_enqueue_editor', array( $this, 'action_wp_enqueue_editor' ) );
|
79 |
add_action( 'media_buttons', array( $this, 'action_media_buttons' ) );
|
81 |
add_filter( 'wp_editor_settings', array( $this, 'filter_wp_editor_settings' ), 10, 2 );
|
82 |
}
|
83 |
|
84 |
+
/**
|
85 |
+
* Display an admin notice on activation.
|
86 |
+
*
|
87 |
+
* If no shortcodes with Shortcake UI are registered, this Will display a link to the plugin's wiki for examples.
|
88 |
+
* If there are already plugins with UI registered, will just display a success message.
|
89 |
+
*
|
90 |
+
* @return void
|
91 |
+
*/
|
92 |
+
public function action_admin_notices() {
|
93 |
+
if ( ! get_option( 'shortcode_ui_activation_notice' ) ) {
|
94 |
+
return;
|
95 |
+
}
|
96 |
+
|
97 |
+
if ( ! $this->has_shortcodes() ) {
|
98 |
+
echo '<div class="notice notice-warning is-dismissable"><p>' .
|
99 |
+
sprintf(
|
100 |
+
wp_kses(
|
101 |
+
/* Translators: link to plugin wiki page with examples of shortcodes supporting Shortcake UI */
|
102 |
+
__( 'The Shortcode UI plugin will not do anything unless UI is registered for shortcodes through a theme or plugins. For examples, see <a href="%s" target="_blank">here</a>.', 'shortcode-ui' ),
|
103 |
+
array(
|
104 |
+
'a' => array(
|
105 |
+
'href' => array(),
|
106 |
+
'target' => array(),
|
107 |
+
),
|
108 |
+
)
|
109 |
+
),
|
110 |
+
'https://github.com/wp-shortcake/shortcake/wiki/Shortcode-UI-Examples'
|
111 |
+
) .
|
112 |
+
'</p></div>' . "\n";
|
113 |
+
} else {
|
114 |
+
echo '<div class="notice notice-info is-dismissable"><p>' .
|
115 |
+
esc_html__( 'Shortcode UI is installed. Try out the shortcode UI through the "Add Post element" button in the post edit screen.', 'shortcode-ui' ) .
|
116 |
+
'</p></div>' . "\n";
|
117 |
+
}
|
118 |
+
|
119 |
+
delete_option( 'shortcode_ui_activation_notice' );
|
120 |
+
}
|
121 |
+
|
122 |
/**
|
123 |
* When a WP_Editor is initialized on a page, call the 'register_shortcode_ui' action.
|
124 |
*
|
220 |
return $shortcodes;
|
221 |
}
|
222 |
|
223 |
+
/**
|
224 |
+
* Whether any shortcodes with UI are registered
|
225 |
+
*
|
226 |
+
* @return bool
|
227 |
+
*/
|
228 |
+
public function has_shortcodes() {
|
229 |
+
return (bool) $this->get_shortcodes();
|
230 |
+
}
|
231 |
+
|
232 |
/**
|
233 |
* Get UI configuration parameters for a given shortcode.
|
234 |
*
|
261 |
);
|
262 |
|
263 |
if ( 'select2' !== self::$select2_handle ) {
|
264 |
+
wp_add_inline_script( self::$select2_handle, 'var existingSelect2 = jQuery.fn.select2 || null; if (existingSelect2) { delete jQuery.fn.select2; }', 'before' );
|
265 |
+
wp_add_inline_script( self::$select2_handle, 'jQuery.fn[ shortcodeUIData.select2_handle ] = jQuery.fn.select2; if (existingSelect2) { delete jQuery.fn.select2; jQuery.fn.select2 = existingSelect2; }', 'after' );
|
266 |
}
|
267 |
|
268 |
wp_register_style( self::$select2_handle,
|
353 |
* Output an "Add Post Element" button with the media buttons.
|
354 |
*/
|
355 |
public function action_media_buttons( $editor_id ) {
|
356 |
+
if ( ! $this->has_shortcodes() ) {
|
357 |
+
return;
|
358 |
+
}
|
359 |
+
|
360 |
printf( '<button type="button" class="button shortcake-add-post-element" data-editor="%s">' .
|
361 |
'<span class="wp-media-buttons-icon dashicons dashicons-migrate"></span> %s' .
|
362 |
'</button>',
|
462 |
* Get a bunch of shortcodes to render in MCE preview.
|
463 |
*/
|
464 |
public function handle_ajax_bulk_do_shortcode() {
|
465 |
+
check_ajax_referer( 'shortcode-ui-preview', 'nonce' );
|
466 |
|
467 |
if ( is_array( $_POST['queries'] ) ) {
|
468 |
|
@@ -106,7 +106,7 @@ class Shortcode_UI_Field_Attachment {
|
|
106 |
|
107 |
<button class="button button-small remove" data-id="{{ data.id }}">×</button>
|
108 |
|
109 |
-
<# if ( data.
|
110 |
<div class="thumbnail">
|
111 |
<div class="centered">
|
112 |
<img src="{{ data.sizes.thumbnail.url }}" alt="" width="{{ data.sizes.thumbnail.width }}" height="{{ data.sizes.thumbnail.height }}" />
|
106 |
|
107 |
<button class="button button-small remove" data-id="{{ data.id }}">×</button>
|
108 |
|
109 |
+
<# if ( data.sizes && data.sizes.thumbnail ) { #>
|
110 |
<div class="thumbnail">
|
111 |
<div class="centered">
|
112 |
<img src="{{ data.sizes.thumbnail.url }}" alt="" width="{{ data.sizes.thumbnail.width }}" height="{{ data.sizes.thumbnail.height }}" />
|
@@ -136,12 +136,22 @@ class Shortcode_UI_Field_Post_Select {
|
|
136 |
}
|
137 |
|
138 |
$query = new WP_Query( $query_args );
|
|
|
|
|
139 |
|
140 |
foreach ( $query->posts as $post_id ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
array_push( $response['items'],
|
142 |
array(
|
143 |
'id' => $post_id,
|
144 |
-
'text' =>
|
145 |
)
|
146 |
);
|
147 |
}
|
136 |
}
|
137 |
|
138 |
$query = new WP_Query( $query_args );
|
139 |
+
$post_types = $query->get( 'post_type' );
|
140 |
+
$is_multiple_post_types = count( $post_types ) > 1 || 'any' === $post_types;
|
141 |
|
142 |
foreach ( $query->posts as $post_id ) {
|
143 |
+
$post_type = get_post_type( $post_id );
|
144 |
+
$post_type_obj = get_post_type_object( $post_type );
|
145 |
+
|
146 |
+
$text = html_entity_decode( get_the_title( $post_id ) );
|
147 |
+
|
148 |
+
if ( $is_multiple_post_types && $post_type_obj ) {
|
149 |
+
$text .= sprintf( ' (%1$s)', $post_type_obj->labels->singular_name );
|
150 |
+
}
|
151 |
array_push( $response['items'],
|
152 |
array(
|
153 |
'id' => $post_id,
|
154 |
+
'text' => $text,
|
155 |
)
|
156 |
);
|
157 |
}
|
@@ -54,11 +54,11 @@
|
|
54 |
<# if ( 'options' in option && 'label' in option ) { #>
|
55 |
<optgroup label="{{ option.label }}">
|
56 |
<# _.each( option.options, function( optgroupOption ) { #>
|
57 |
-
<option value="{{ optgroupOption.value }}" <# if (
|
58 |
<# }); #>
|
59 |
</optgroup>
|
60 |
<# } else { #>
|
61 |
-
<option value="{{ option.value }}" <# if (
|
62 |
<# } #>
|
63 |
|
64 |
<# }); #>
|
54 |
<# if ( 'options' in option && 'label' in option ) { #>
|
55 |
<optgroup label="{{ option.label }}">
|
56 |
<# _.each( option.options, function( optgroupOption ) { #>
|
57 |
+
<option value="{{ optgroupOption.value }}" <# if ( _.contains( _.isArray( data.value ) ? data.value : data.value.split(','), optgroupOption.value ) ) { print('selected'); } #>>{{ optgroupOption.label }}</option>
|
58 |
<# }); #>
|
59 |
</optgroup>
|
60 |
<# } else { #>
|
61 |
+
<option value="{{ option.value }}" <# if ( _.contains( _.isArray( data.value ) ? data.value : data.value.split(','), option.value ) ) { print('selected'); } #>>{{ option.label }}</option>
|
62 |
<# } #>
|
63 |
|
64 |
<# }); #>
|
@@ -49,12 +49,19 @@ var MediaController = wp.media.controller.State.extend({
|
|
49 |
action: 'select',
|
50 |
search: null,
|
51 |
insertCallback: this.insertCallback,
|
|
|
52 |
});
|
53 |
|
54 |
this.props.on( 'change:action', this.refresh, this );
|
|
|
55 |
|
56 |
},
|
57 |
|
|
|
|
|
|
|
|
|
|
|
58 |
refresh: function() {
|
59 |
if ( this.frame && this.frame.toolbar ) {
|
60 |
this.frame.toolbar.get().refresh();
|
@@ -74,12 +81,13 @@ var MediaController = wp.media.controller.State.extend({
|
|
74 |
var shortcode = this.props.get( 'currentShortcode' );
|
75 |
var insertCallback = this.props.get( 'insertCallback' );
|
76 |
|
|
|
|
|
77 |
if ( shortcode && insertCallback ) {
|
78 |
insertCallback( shortcode );
|
79 |
}
|
80 |
|
81 |
this.reset();
|
82 |
-
this.resetState();
|
83 |
this.frame.close();
|
84 |
},
|
85 |
|
@@ -92,12 +100,11 @@ var MediaController = wp.media.controller.State.extend({
|
|
92 |
this.props.set( 'currentShortcode', null );
|
93 |
this.props.set( 'search', null );
|
94 |
this.props.set( 'insertCallback', this.insertCallback );
|
95 |
-
},
|
96 |
|
97 |
-
resetState: function() {
|
98 |
var menuItem = this.frame.menu.get().get('shortcode-ui');
|
99 |
menuItem.options.text = shortcodeUIData.strings.media_frame_title;
|
100 |
menuItem.render();
|
|
|
101 |
this.frame.setState( 'insert' );
|
102 |
},
|
103 |
|
@@ -136,6 +143,17 @@ var MediaController = wp.media.controller.State.extend({
|
|
136 |
this.frame.mediaController.toggleSidebar( false );
|
137 |
}.bind( this ) );
|
138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
}.bind( this ) );
|
140 |
|
141 |
},
|
@@ -144,6 +162,15 @@ var MediaController = wp.media.controller.State.extend({
|
|
144 |
this.frame.$el.toggleClass( 'hide-menu', show );
|
145 |
},
|
146 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
});
|
148 |
|
149 |
sui.controllers.MediaController = MediaController;
|
@@ -265,7 +292,7 @@ Shortcode = Backbone.Model.extend({
|
|
265 |
this.get( 'attrs' ).each( function( attr ) {
|
266 |
|
267 |
// Skip empty attributes.
|
268 |
-
if ( ! attr.get( 'value' ) ||
|
269 |
return;
|
270 |
}
|
271 |
|
@@ -347,7 +374,8 @@ $(document).ready(function(){
|
|
347 |
options = {
|
348 |
frame: 'post',
|
349 |
state: 'shortcode-ui',
|
350 |
-
title: shortcodeUIData.strings.media_frame_title
|
|
|
351 |
};
|
352 |
|
353 |
event.preventDefault();
|
@@ -359,6 +387,7 @@ $(document).ready(function(){
|
|
359 |
|
360 |
if ( frame ) {
|
361 |
frame.mediaController.setActionSelect();
|
|
|
362 |
frame.open();
|
363 |
} else {
|
364 |
frame = wp.media.editor.open( editor, options );
|
@@ -366,11 +395,7 @@ $(document).ready(function(){
|
|
366 |
|
367 |
// Make sure to reset state when closed.
|
368 |
frame.once( 'close submit', function() {
|
369 |
-
frame.
|
370 |
-
var menuItem = frame.menu.get().get('shortcode-ui');
|
371 |
-
menuItem.options.text = shortcodeUIData.strings.media_frame_title;
|
372 |
-
menuItem.render();
|
373 |
-
frame.setState( 'insert' );
|
374 |
} );
|
375 |
|
376 |
} );
|
@@ -464,7 +489,8 @@ var Fetcher = (function() {
|
|
464 |
}
|
465 |
|
466 |
var request = wp.ajax.post( 'bulk_do_shortcode', {
|
467 |
-
queries: _.pluck( fetcher.queries, 'query' )
|
|
|
468 |
});
|
469 |
|
470 |
request.done( function( responseData ) {
|
@@ -580,7 +606,7 @@ var shortcodeViewConstructor = {
|
|
580 |
|
581 |
if ( attr && attr.get('encode') ) {
|
582 |
value = decodeURIComponent( value );
|
583 |
-
value = value.replace(
|
584 |
}
|
585 |
|
586 |
if ( attr ) {
|
@@ -666,12 +692,14 @@ var shortcodeViewConstructor = {
|
|
666 |
|
667 |
if ( frame ) {
|
668 |
frame.mediaController.setActionUpdate( currentShortcode );
|
|
|
669 |
frame.open();
|
670 |
} else {
|
671 |
frame = wp.media.editor.open( window.wpActiveEditor, {
|
672 |
frame : "post",
|
673 |
state : 'shortcode-ui',
|
674 |
currentShortcode : currentShortcode,
|
|
|
675 |
});
|
676 |
}
|
677 |
|
@@ -679,19 +707,10 @@ var shortcodeViewConstructor = {
|
|
679 |
update( shortcode.formatShortcode() );
|
680 |
} );
|
681 |
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
* Called as `shortcode-ui.render_edit`.
|
687 |
-
*
|
688 |
-
* @param shortcodeModel (object)
|
689 |
-
* Reference to the shortcode model used in this overlay.
|
690 |
-
*/
|
691 |
-
var hookName = 'shortcode-ui.render_edit';
|
692 |
-
var shortcodeModel = this.shortcodeModel;
|
693 |
-
wp.shortcake.hooks.doAction( hookName, shortcodeModel );
|
694 |
-
|
695 |
}
|
696 |
|
697 |
},
|
@@ -888,6 +907,8 @@ var editAttributeFieldAttachment = sui.views.editAttributeField.extend( {
|
|
888 |
|
889 |
this._renderAll();
|
890 |
|
|
|
|
|
891 |
},
|
892 |
|
893 |
_renderAll: function() {
|
@@ -1538,6 +1559,11 @@ var wp = (typeof window !== "undefined" ? window['wp'] : typeof global !== "unde
|
|
1538 |
var postMediaFrame = wp.media.view.MediaFrame.Post;
|
1539 |
var mediaFrame = postMediaFrame.extend( {
|
1540 |
|
|
|
|
|
|
|
|
|
|
|
1541 |
initialize: function() {
|
1542 |
|
1543 |
postMediaFrame.prototype.initialize.apply( this, arguments );
|
@@ -1568,12 +1594,6 @@ var mediaFrame = postMediaFrame.extend( {
|
|
1568 |
|
1569 |
},
|
1570 |
|
1571 |
-
events: function() {
|
1572 |
-
return _.extend( {}, postMediaFrame.prototype.events, {
|
1573 |
-
'click .media-menu-item' : 'resetMediaController',
|
1574 |
-
} );
|
1575 |
-
},
|
1576 |
-
|
1577 |
resetMediaController: function( event ) {
|
1578 |
if ( this.state() && 'undefined' !== typeof this.state().props && this.state().props.get('currentShortcode') ) {
|
1579 |
this.mediaController.reset();
|
@@ -1750,6 +1770,11 @@ sui.views.editAttributeSelect2Field = sui.views.editAttributeField.extend( {
|
|
1750 |
inputChanged: function(e) {
|
1751 |
var _selected = $( e.currentTarget ).val();
|
1752 |
|
|
|
|
|
|
|
|
|
|
|
1753 |
// Store multiple selections as comma-delimited list
|
1754 |
if ( Array.isArray( _selected ) ) {
|
1755 |
_selected = _selected.join( ',' );
|
@@ -1836,6 +1861,7 @@ sui.views.editAttributeSelect2Field = sui.views.editAttributeField.extend( {
|
|
1836 |
var $fieldSelect2 = $field[ shortcodeUIData.select2_handle ]({
|
1837 |
placeholder: "Search",
|
1838 |
multiple: this.model.get( 'multiple' ),
|
|
|
1839 |
|
1840 |
ajax: {
|
1841 |
url: ajaxurl,
|
49 |
action: 'select',
|
50 |
search: null,
|
51 |
insertCallback: this.insertCallback,
|
52 |
+
editor: wpActiveEditor,
|
53 |
});
|
54 |
|
55 |
this.props.on( 'change:action', this.refresh, this );
|
56 |
+
this.on( 'activate', this.activate, this );
|
57 |
|
58 |
},
|
59 |
|
60 |
+
activate: function() {
|
61 |
+
var $el = this.frame.$el;
|
62 |
+
_.defer( function() { $el.addClass( 'hide-router' ); } );
|
63 |
+
},
|
64 |
+
|
65 |
refresh: function() {
|
66 |
if ( this.frame && this.frame.toolbar ) {
|
67 |
this.frame.toolbar.get().refresh();
|
81 |
var shortcode = this.props.get( 'currentShortcode' );
|
82 |
var insertCallback = this.props.get( 'insertCallback' );
|
83 |
|
84 |
+
this.setActiveEditor( this.props.get( 'editor' ) );
|
85 |
+
|
86 |
if ( shortcode && insertCallback ) {
|
87 |
insertCallback( shortcode );
|
88 |
}
|
89 |
|
90 |
this.reset();
|
|
|
91 |
this.frame.close();
|
92 |
},
|
93 |
|
100 |
this.props.set( 'currentShortcode', null );
|
101 |
this.props.set( 'search', null );
|
102 |
this.props.set( 'insertCallback', this.insertCallback );
|
|
|
103 |
|
|
|
104 |
var menuItem = this.frame.menu.get().get('shortcode-ui');
|
105 |
menuItem.options.text = shortcodeUIData.strings.media_frame_title;
|
106 |
menuItem.render();
|
107 |
+
|
108 |
this.frame.setState( 'insert' );
|
109 |
},
|
110 |
|
143 |
this.frame.mediaController.toggleSidebar( false );
|
144 |
}.bind( this ) );
|
145 |
|
146 |
+
/*
|
147 |
+
* Action run after an edit shortcode overlay is rendered.
|
148 |
+
*
|
149 |
+
* Called as `shortcode-ui.render_edit`.
|
150 |
+
*
|
151 |
+
* @param shortcodeModel (object)
|
152 |
+
* Reference to the shortcode model used in this overlay.
|
153 |
+
*/
|
154 |
+
var hookName = 'shortcode-ui.render_edit';
|
155 |
+
wp.shortcake.hooks.doAction( hookName, currentShortcode );
|
156 |
+
|
157 |
}.bind( this ) );
|
158 |
|
159 |
},
|
162 |
this.frame.$el.toggleClass( 'hide-menu', show );
|
163 |
},
|
164 |
|
165 |
+
setActiveEditor: function( editorId ) {
|
166 |
+
var editor = tinymce.get( editorId );
|
167 |
+
|
168 |
+
if ( editor ) {
|
169 |
+
tinymce.setActive( editor );
|
170 |
+
}
|
171 |
+
|
172 |
+
window.wpActiveEditor = editorId;
|
173 |
+
},
|
174 |
});
|
175 |
|
176 |
sui.controllers.MediaController = MediaController;
|
292 |
this.get( 'attrs' ).each( function( attr ) {
|
293 |
|
294 |
// Skip empty attributes.
|
295 |
+
if ( ! attr.get( 'value' ) || attr.get( 'value' ).length < 1 ) {
|
296 |
return;
|
297 |
}
|
298 |
|
374 |
options = {
|
375 |
frame: 'post',
|
376 |
state: 'shortcode-ui',
|
377 |
+
title: shortcodeUIData.strings.media_frame_title,
|
378 |
+
editor: this.dataset.editor
|
379 |
};
|
380 |
|
381 |
event.preventDefault();
|
387 |
|
388 |
if ( frame ) {
|
389 |
frame.mediaController.setActionSelect();
|
390 |
+
frame.mediaController.props.set( 'editor', this.dataset.editor );
|
391 |
frame.open();
|
392 |
} else {
|
393 |
frame = wp.media.editor.open( editor, options );
|
395 |
|
396 |
// Make sure to reset state when closed.
|
397 |
frame.once( 'close submit', function() {
|
398 |
+
frame.mediaController.reset();
|
|
|
|
|
|
|
|
|
399 |
} );
|
400 |
|
401 |
} );
|
489 |
}
|
490 |
|
491 |
var request = wp.ajax.post( 'bulk_do_shortcode', {
|
492 |
+
queries: _.pluck( fetcher.queries, 'query' ),
|
493 |
+
nonce: shortcodeUIData.nonces.preview
|
494 |
});
|
495 |
|
496 |
request.done( function( responseData ) {
|
606 |
|
607 |
if ( attr && attr.get('encode') ) {
|
608 |
value = decodeURIComponent( value );
|
609 |
+
value = value.replace( /%/g, "%" );
|
610 |
}
|
611 |
|
612 |
if ( attr ) {
|
692 |
|
693 |
if ( frame ) {
|
694 |
frame.mediaController.setActionUpdate( currentShortcode );
|
695 |
+
frame.mediaController.props.set( 'editor', wpActiveEditor );
|
696 |
frame.open();
|
697 |
} else {
|
698 |
frame = wp.media.editor.open( window.wpActiveEditor, {
|
699 |
frame : "post",
|
700 |
state : 'shortcode-ui',
|
701 |
currentShortcode : currentShortcode,
|
702 |
+
editor : wpActiveEditor,
|
703 |
});
|
704 |
}
|
705 |
|
707 |
update( shortcode.formatShortcode() );
|
708 |
} );
|
709 |
|
710 |
+
// Make sure to reset state when closed.
|
711 |
+
frame.once( 'close submit', function() {
|
712 |
+
frame.mediaController.reset();
|
713 |
+
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
}
|
715 |
|
716 |
},
|
907 |
|
908 |
this._renderAll();
|
909 |
|
910 |
+
this.triggerCallbacks();
|
911 |
+
|
912 |
},
|
913 |
|
914 |
_renderAll: function() {
|
1559 |
var postMediaFrame = wp.media.view.MediaFrame.Post;
|
1560 |
var mediaFrame = postMediaFrame.extend( {
|
1561 |
|
1562 |
+
events: _.extend( {}, postMediaFrame.prototype.events, {
|
1563 |
+
'click .media-menu-item' : 'resetMediaController',
|
1564 |
+
}
|
1565 |
+
),
|
1566 |
+
|
1567 |
initialize: function() {
|
1568 |
|
1569 |
postMediaFrame.prototype.initialize.apply( this, arguments );
|
1594 |
|
1595 |
},
|
1596 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1597 |
resetMediaController: function( event ) {
|
1598 |
if ( this.state() && 'undefined' !== typeof this.state().props && this.state().props.get('currentShortcode') ) {
|
1599 |
this.mediaController.reset();
|
1770 |
inputChanged: function(e) {
|
1771 |
var _selected = $( e.currentTarget ).val();
|
1772 |
|
1773 |
+
// Empty fields will have null values. We don't want to coerce that to the string "null".
|
1774 |
+
if ( _selected === null ) {
|
1775 |
+
_selected = '';
|
1776 |
+
}
|
1777 |
+
|
1778 |
// Store multiple selections as comma-delimited list
|
1779 |
if ( Array.isArray( _selected ) ) {
|
1780 |
_selected = _selected.join( ',' );
|
1861 |
var $fieldSelect2 = $field[ shortcodeUIData.select2_handle ]({
|
1862 |
placeholder: "Search",
|
1863 |
multiple: this.model.get( 'multiple' ),
|
1864 |
+
dropdownParent: this.$el,
|
1865 |
|
1866 |
ajax: {
|
1867 |
url: ajaxurl,
|
@@ -12,12 +12,19 @@ var MediaController = wp.media.controller.State.extend({
|
|
12 |
action: 'select',
|
13 |
search: null,
|
14 |
insertCallback: this.insertCallback,
|
|
|
15 |
});
|
16 |
|
17 |
this.props.on( 'change:action', this.refresh, this );
|
|
|
18 |
|
19 |
},
|
20 |
|
|
|
|
|
|
|
|
|
|
|
21 |
refresh: function() {
|
22 |
if ( this.frame && this.frame.toolbar ) {
|
23 |
this.frame.toolbar.get().refresh();
|
@@ -37,12 +44,13 @@ var MediaController = wp.media.controller.State.extend({
|
|
37 |
var shortcode = this.props.get( 'currentShortcode' );
|
38 |
var insertCallback = this.props.get( 'insertCallback' );
|
39 |
|
|
|
|
|
40 |
if ( shortcode && insertCallback ) {
|
41 |
insertCallback( shortcode );
|
42 |
}
|
43 |
|
44 |
this.reset();
|
45 |
-
this.resetState();
|
46 |
this.frame.close();
|
47 |
},
|
48 |
|
@@ -55,12 +63,11 @@ var MediaController = wp.media.controller.State.extend({
|
|
55 |
this.props.set( 'currentShortcode', null );
|
56 |
this.props.set( 'search', null );
|
57 |
this.props.set( 'insertCallback', this.insertCallback );
|
58 |
-
},
|
59 |
|
60 |
-
resetState: function() {
|
61 |
var menuItem = this.frame.menu.get().get('shortcode-ui');
|
62 |
menuItem.options.text = shortcodeUIData.strings.media_frame_title;
|
63 |
menuItem.render();
|
|
|
64 |
this.frame.setState( 'insert' );
|
65 |
},
|
66 |
|
@@ -99,6 +106,17 @@ var MediaController = wp.media.controller.State.extend({
|
|
99 |
this.frame.mediaController.toggleSidebar( false );
|
100 |
}.bind( this ) );
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
}.bind( this ) );
|
103 |
|
104 |
},
|
@@ -107,6 +125,15 @@ var MediaController = wp.media.controller.State.extend({
|
|
107 |
this.frame.$el.toggleClass( 'hide-menu', show );
|
108 |
},
|
109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
});
|
111 |
|
112 |
sui.controllers.MediaController = MediaController;
|
12 |
action: 'select',
|
13 |
search: null,
|
14 |
insertCallback: this.insertCallback,
|
15 |
+
editor: wpActiveEditor,
|
16 |
});
|
17 |
|
18 |
this.props.on( 'change:action', this.refresh, this );
|
19 |
+
this.on( 'activate', this.activate, this );
|
20 |
|
21 |
},
|
22 |
|
23 |
+
activate: function() {
|
24 |
+
var $el = this.frame.$el;
|
25 |
+
_.defer( function() { $el.addClass( 'hide-router' ); } );
|
26 |
+
},
|
27 |
+
|
28 |
refresh: function() {
|
29 |
if ( this.frame && this.frame.toolbar ) {
|
30 |
this.frame.toolbar.get().refresh();
|
44 |
var shortcode = this.props.get( 'currentShortcode' );
|
45 |
var insertCallback = this.props.get( 'insertCallback' );
|
46 |
|
47 |
+
this.setActiveEditor( this.props.get( 'editor' ) );
|
48 |
+
|
49 |
if ( shortcode && insertCallback ) {
|
50 |
insertCallback( shortcode );
|
51 |
}
|
52 |
|
53 |
this.reset();
|
|
|
54 |
this.frame.close();
|
55 |
},
|
56 |
|
63 |
this.props.set( 'currentShortcode', null );
|
64 |
this.props.set( 'search', null );
|
65 |
this.props.set( 'insertCallback', this.insertCallback );
|
|
|
66 |
|
|
|
67 |
var menuItem = this.frame.menu.get().get('shortcode-ui');
|
68 |
menuItem.options.text = shortcodeUIData.strings.media_frame_title;
|
69 |
menuItem.render();
|
70 |
+
|
71 |
this.frame.setState( 'insert' );
|
72 |
},
|
73 |
|
106 |
this.frame.mediaController.toggleSidebar( false );
|
107 |
}.bind( this ) );
|
108 |
|
109 |
+
/*
|
110 |
+
* Action run after an edit shortcode overlay is rendered.
|
111 |
+
*
|
112 |
+
* Called as `shortcode-ui.render_edit`.
|
113 |
+
*
|
114 |
+
* @param shortcodeModel (object)
|
115 |
+
* Reference to the shortcode model used in this overlay.
|
116 |
+
*/
|
117 |
+
var hookName = 'shortcode-ui.render_edit';
|
118 |
+
wp.shortcake.hooks.doAction( hookName, currentShortcode );
|
119 |
+
|
120 |
}.bind( this ) );
|
121 |
|
122 |
},
|
125 |
this.frame.$el.toggleClass( 'hide-menu', show );
|
126 |
},
|
127 |
|
128 |
+
setActiveEditor: function( editorId ) {
|
129 |
+
var editor = tinymce.get( editorId );
|
130 |
+
|
131 |
+
if ( editor ) {
|
132 |
+
tinymce.setActive( editor );
|
133 |
+
}
|
134 |
+
|
135 |
+
window.wpActiveEditor = editorId;
|
136 |
+
},
|
137 |
});
|
138 |
|
139 |
sui.controllers.MediaController = MediaController;
|
@@ -69,7 +69,7 @@ Shortcode = Backbone.Model.extend({
|
|
69 |
this.get( 'attrs' ).each( function( attr ) {
|
70 |
|
71 |
// Skip empty attributes.
|
72 |
-
if ( ! attr.get( 'value' ) ||
|
73 |
return;
|
74 |
}
|
75 |
|
69 |
this.get( 'attrs' ).each( function( attr ) {
|
70 |
|
71 |
// Skip empty attributes.
|
72 |
+
if ( ! attr.get( 'value' ) || attr.get( 'value' ).length < 1 ) {
|
73 |
return;
|
74 |
}
|
75 |
|
@@ -30,7 +30,8 @@ $(document).ready(function(){
|
|
30 |
options = {
|
31 |
frame: 'post',
|
32 |
state: 'shortcode-ui',
|
33 |
-
title: shortcodeUIData.strings.media_frame_title
|
|
|
34 |
};
|
35 |
|
36 |
event.preventDefault();
|
@@ -42,6 +43,7 @@ $(document).ready(function(){
|
|
42 |
|
43 |
if ( frame ) {
|
44 |
frame.mediaController.setActionSelect();
|
|
|
45 |
frame.open();
|
46 |
} else {
|
47 |
frame = wp.media.editor.open( editor, options );
|
@@ -49,11 +51,7 @@ $(document).ready(function(){
|
|
49 |
|
50 |
// Make sure to reset state when closed.
|
51 |
frame.once( 'close submit', function() {
|
52 |
-
frame.
|
53 |
-
var menuItem = frame.menu.get().get('shortcode-ui');
|
54 |
-
menuItem.options.text = shortcodeUIData.strings.media_frame_title;
|
55 |
-
menuItem.render();
|
56 |
-
frame.setState( 'insert' );
|
57 |
} );
|
58 |
|
59 |
} );
|
30 |
options = {
|
31 |
frame: 'post',
|
32 |
state: 'shortcode-ui',
|
33 |
+
title: shortcodeUIData.strings.media_frame_title,
|
34 |
+
editor: this.dataset.editor
|
35 |
};
|
36 |
|
37 |
event.preventDefault();
|
43 |
|
44 |
if ( frame ) {
|
45 |
frame.mediaController.setActionSelect();
|
46 |
+
frame.mediaController.props.set( 'editor', this.dataset.editor );
|
47 |
frame.open();
|
48 |
} else {
|
49 |
frame = wp.media.editor.open( editor, options );
|
51 |
|
52 |
// Make sure to reset state when closed.
|
53 |
frame.once( 'close submit', function() {
|
54 |
+
frame.mediaController.reset();
|
|
|
|
|
|
|
|
|
55 |
} );
|
56 |
|
57 |
} );
|
@@ -82,7 +82,8 @@ var Fetcher = (function() {
|
|
82 |
}
|
83 |
|
84 |
var request = wp.ajax.post( 'bulk_do_shortcode', {
|
85 |
-
queries: _.pluck( fetcher.queries, 'query' )
|
|
|
86 |
});
|
87 |
|
88 |
request.done( function( responseData ) {
|
82 |
}
|
83 |
|
84 |
var request = wp.ajax.post( 'bulk_do_shortcode', {
|
85 |
+
queries: _.pluck( fetcher.queries, 'query' ),
|
86 |
+
nonce: shortcodeUIData.nonces.preview
|
87 |
});
|
88 |
|
89 |
request.done( function( responseData ) {
|
@@ -84,7 +84,7 @@ var shortcodeViewConstructor = {
|
|
84 |
|
85 |
if ( attr && attr.get('encode') ) {
|
86 |
value = decodeURIComponent( value );
|
87 |
-
value = value.replace(
|
88 |
}
|
89 |
|
90 |
if ( attr ) {
|
@@ -170,12 +170,14 @@ var shortcodeViewConstructor = {
|
|
170 |
|
171 |
if ( frame ) {
|
172 |
frame.mediaController.setActionUpdate( currentShortcode );
|
|
|
173 |
frame.open();
|
174 |
} else {
|
175 |
frame = wp.media.editor.open( window.wpActiveEditor, {
|
176 |
frame : "post",
|
177 |
state : 'shortcode-ui',
|
178 |
currentShortcode : currentShortcode,
|
|
|
179 |
});
|
180 |
}
|
181 |
|
@@ -183,19 +185,10 @@ var shortcodeViewConstructor = {
|
|
183 |
update( shortcode.formatShortcode() );
|
184 |
} );
|
185 |
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
* Called as `shortcode-ui.render_edit`.
|
191 |
-
*
|
192 |
-
* @param shortcodeModel (object)
|
193 |
-
* Reference to the shortcode model used in this overlay.
|
194 |
-
*/
|
195 |
-
var hookName = 'shortcode-ui.render_edit';
|
196 |
-
var shortcodeModel = this.shortcodeModel;
|
197 |
-
wp.shortcake.hooks.doAction( hookName, shortcodeModel );
|
198 |
-
|
199 |
}
|
200 |
|
201 |
},
|
84 |
|
85 |
if ( attr && attr.get('encode') ) {
|
86 |
value = decodeURIComponent( value );
|
87 |
+
value = value.replace( /%/g, "%" );
|
88 |
}
|
89 |
|
90 |
if ( attr ) {
|
170 |
|
171 |
if ( frame ) {
|
172 |
frame.mediaController.setActionUpdate( currentShortcode );
|
173 |
+
frame.mediaController.props.set( 'editor', wpActiveEditor );
|
174 |
frame.open();
|
175 |
} else {
|
176 |
frame = wp.media.editor.open( window.wpActiveEditor, {
|
177 |
frame : "post",
|
178 |
state : 'shortcode-ui',
|
179 |
currentShortcode : currentShortcode,
|
180 |
+
editor : wpActiveEditor,
|
181 |
});
|
182 |
}
|
183 |
|
185 |
update( shortcode.formatShortcode() );
|
186 |
} );
|
187 |
|
188 |
+
// Make sure to reset state when closed.
|
189 |
+
frame.once( 'close submit', function() {
|
190 |
+
frame.mediaController.reset();
|
191 |
+
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
}
|
193 |
|
194 |
},
|
@@ -102,6 +102,8 @@ var editAttributeFieldAttachment = sui.views.editAttributeField.extend( {
|
|
102 |
|
103 |
this._renderAll();
|
104 |
|
|
|
|
|
105 |
},
|
106 |
|
107 |
_renderAll: function() {
|
102 |
|
103 |
this._renderAll();
|
104 |
|
105 |
+
this.triggerCallbacks();
|
106 |
+
|
107 |
},
|
108 |
|
109 |
_renderAll: function() {
|
@@ -7,6 +7,11 @@ var wp = require('wp'),
|
|
7 |
var postMediaFrame = wp.media.view.MediaFrame.Post;
|
8 |
var mediaFrame = postMediaFrame.extend( {
|
9 |
|
|
|
|
|
|
|
|
|
|
|
10 |
initialize: function() {
|
11 |
|
12 |
postMediaFrame.prototype.initialize.apply( this, arguments );
|
@@ -37,12 +42,6 @@ var mediaFrame = postMediaFrame.extend( {
|
|
37 |
|
38 |
},
|
39 |
|
40 |
-
events: function() {
|
41 |
-
return _.extend( {}, postMediaFrame.prototype.events, {
|
42 |
-
'click .media-menu-item' : 'resetMediaController',
|
43 |
-
} );
|
44 |
-
},
|
45 |
-
|
46 |
resetMediaController: function( event ) {
|
47 |
if ( this.state() && 'undefined' !== typeof this.state().props && this.state().props.get('currentShortcode') ) {
|
48 |
this.mediaController.reset();
|
7 |
var postMediaFrame = wp.media.view.MediaFrame.Post;
|
8 |
var mediaFrame = postMediaFrame.extend( {
|
9 |
|
10 |
+
events: _.extend( {}, postMediaFrame.prototype.events, {
|
11 |
+
'click .media-menu-item' : 'resetMediaController',
|
12 |
+
}
|
13 |
+
),
|
14 |
+
|
15 |
initialize: function() {
|
16 |
|
17 |
postMediaFrame.prototype.initialize.apply( this, arguments );
|
42 |
|
43 |
},
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
resetMediaController: function( event ) {
|
46 |
if ( this.state() && 'undefined' !== typeof this.state().props && this.state().props.get('currentShortcode') ) {
|
47 |
this.mediaController.reset();
|
@@ -20,6 +20,11 @@ sui.views.editAttributeSelect2Field = sui.views.editAttributeField.extend( {
|
|
20 |
inputChanged: function(e) {
|
21 |
var _selected = $( e.currentTarget ).val();
|
22 |
|
|
|
|
|
|
|
|
|
|
|
23 |
// Store multiple selections as comma-delimited list
|
24 |
if ( Array.isArray( _selected ) ) {
|
25 |
_selected = _selected.join( ',' );
|
@@ -106,6 +111,7 @@ sui.views.editAttributeSelect2Field = sui.views.editAttributeField.extend( {
|
|
106 |
var $fieldSelect2 = $field[ shortcodeUIData.select2_handle ]({
|
107 |
placeholder: "Search",
|
108 |
multiple: this.model.get( 'multiple' ),
|
|
|
109 |
|
110 |
ajax: {
|
111 |
url: ajaxurl,
|
20 |
inputChanged: function(e) {
|
21 |
var _selected = $( e.currentTarget ).val();
|
22 |
|
23 |
+
// Empty fields will have null values. We don't want to coerce that to the string "null".
|
24 |
+
if ( _selected === null ) {
|
25 |
+
_selected = '';
|
26 |
+
}
|
27 |
+
|
28 |
// Store multiple selections as comma-delimited list
|
29 |
if ( Array.isArray( _selected ) ) {
|
30 |
_selected = _selected.join( ',' );
|
111 |
var $fieldSelect2 = $field[ shortcodeUIData.select2_handle ]({
|
112 |
placeholder: "Search",
|
113 |
multiple: this.model.get( 'multiple' ),
|
114 |
+
dropdownParent: this.$el,
|
115 |
|
116 |
ajax: {
|
117 |
url: ajaxurl,
|
Binary file
|
@@ -1,19 +1,27 @@
|
|
|
|
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"Project-Id-Version: \n"
|
4 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/shortcode-"
|
5 |
"ui\n"
|
6 |
-
"POT-Creation-Date: 2017-
|
7 |
-
"PO-Revision-Date: 2017-03-07 12:47+0100\n"
|
8 |
-
"Last-Translator: \n"
|
9 |
-
"Language-Team: \n"
|
10 |
-
"Language: nb\n"
|
11 |
"MIME-Version: 1.0\n"
|
12 |
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
"Content-Transfer-Encoding: 8bit\n"
|
14 |
-
"
|
15 |
-
"
|
|
|
|
|
|
|
|
|
16 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
#: dev.php:68
|
19 |
msgid ""
|
@@ -35,137 +43,182 @@ msgstr "Vedlegg"
|
|
35 |
msgid "Select Image"
|
36 |
msgstr "Velg bilde"
|
37 |
|
38 |
-
#: dev.php:
|
|
|
|
|
|
|
|
|
39 |
msgid "Citation Source"
|
40 |
msgstr "Kilde"
|
41 |
|
42 |
-
#: dev.php:
|
43 |
msgid "Test placeholder"
|
44 |
-
msgstr "
|
45 |
|
46 |
-
#: dev.php:
|
47 |
msgid "Select Page"
|
48 |
msgstr "Velg Side"
|
49 |
|
50 |
-
#: dev.php:
|
51 |
-
msgid "
|
52 |
-
msgstr "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
-
#: dev.php:
|
55 |
msgid "Hex color code"
|
56 |
-
msgstr "
|
57 |
|
58 |
-
#: dev.php:
|
59 |
msgid "Alignment"
|
60 |
msgstr "Justering"
|
61 |
|
62 |
-
#: dev.php:
|
63 |
msgid ""
|
64 |
"Whether the quotation should be displayed as pull-left, pull-right, or "
|
65 |
"neither."
|
66 |
-
msgstr "
|
67 |
|
68 |
-
#: dev.php:
|
69 |
msgid "None"
|
70 |
msgstr "Ingen"
|
71 |
|
72 |
-
#: dev.php:
|
73 |
msgid "Pull Left"
|
74 |
-
msgstr "
|
75 |
|
76 |
-
#: dev.php:
|
77 |
msgid "Pull Right"
|
78 |
-
msgstr "
|
79 |
|
80 |
-
#: dev.php:
|
81 |
msgid "Year"
|
82 |
msgstr "År"
|
83 |
|
84 |
-
#: dev.php:
|
85 |
msgid "Optional. The year the quotation is from."
|
86 |
-
msgstr "Valgfri.
|
87 |
|
88 |
-
#: dev.php:
|
89 |
msgid "Shortcake Dev"
|
90 |
-
msgstr "
|
91 |
|
92 |
-
#: dev.php:
|
93 |
msgid "Quote"
|
94 |
msgstr "Sitat"
|
95 |
|
96 |
-
#: dev.php:
|
97 |
msgid "Include a statement from someone famous."
|
98 |
-
msgstr "Inkluder
|
99 |
|
100 |
-
#: dev.php:
|
101 |
msgid "Content:"
|
102 |
msgstr "Innhold:"
|
103 |
|
104 |
-
#: dev.php:
|
105 |
msgid "Source:"
|
106 |
msgstr "Kilde:"
|
107 |
|
108 |
-
#: dev.php:
|
109 |
msgid "Image:"
|
110 |
msgstr "Bilde:"
|
111 |
|
112 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
msgid "Inner Content"
|
114 |
-
msgstr "Indre
|
115 |
|
116 |
-
#: inc/class-shortcode-ui.php:
|
117 |
msgid "Insert Post Element"
|
118 |
-
msgstr "Sett inn
|
119 |
|
120 |
-
|
|
|
|
|
121 |
msgid "%s Details"
|
122 |
-
msgstr "%
|
123 |
|
124 |
-
#: inc/class-shortcode-ui.php:
|
125 |
msgid "Insert Element"
|
126 |
msgstr "Sett inn element"
|
127 |
|
128 |
-
#: inc/class-shortcode-ui.php:
|
129 |
msgid "Update"
|
130 |
msgstr "Oppdater"
|
131 |
|
132 |
-
#: inc/class-shortcode-ui.php:
|
133 |
msgid "There are no attributes to configure for this Post Element."
|
134 |
msgstr ""
|
135 |
-
"Det er ingen attributter for å konfigurere dette Innleggselementet."
|
136 |
|
137 |
-
#: inc/class-shortcode-ui.php:
|
138 |
msgid "Failed to load preview"
|
139 |
msgstr "Fikk ikke lastet forhåndsvisning"
|
140 |
|
141 |
-
#: inc/class-shortcode-ui.php:
|
142 |
msgid "Search"
|
143 |
msgstr "Søk"
|
144 |
|
145 |
-
#: inc/class-shortcode-ui.php:
|
146 |
msgid "Insert Content"
|
147 |
msgstr "Sett inn innhold"
|
148 |
|
149 |
-
#: inc/class-shortcode-ui.php:
|
|
|
|
|
|
|
|
|
150 |
msgid "Something's rotten in the state of Denmark"
|
151 |
-
msgstr "
|
152 |
|
153 |
-
#: inc/fields/class-field-attachment.php:79
|
154 |
-
#: inc/fields/class-field-attachment.php:80
|
155 |
msgid "Select Attachment"
|
156 |
msgstr "Velg vedlegg"
|
157 |
|
158 |
-
#: inc/fields/class-field-attachment.php:
|
159 |
-
msgid "
|
160 |
-
msgstr "
|
161 |
|
162 |
-
#: inc/fields/class-field-attachment.php:
|
163 |
msgid "Edit Attachment"
|
164 |
msgstr "Endre vedlegg"
|
165 |
|
166 |
#: inc/templates/edit-form.tpl.php:3
|
167 |
msgid "Back to list"
|
168 |
-
msgstr "Tilbake til
|
169 |
|
170 |
#. Plugin Name of the plugin/theme
|
171 |
msgid "Shortcake (Shortcode UI)"
|
@@ -173,7 +226,7 @@ msgstr ""
|
|
173 |
|
174 |
#. Description of the plugin/theme
|
175 |
msgid "User Interface for adding shortcodes."
|
176 |
-
msgstr "Brukergrensesnitt for å legge
|
177 |
|
178 |
#. Author of the plugin/theme
|
179 |
msgid "Fusion Engineering and community"
|
1 |
+
# Copyright (C) 2017 Fusion Engineering and community
|
2 |
+
# This file is distributed under the GPL v2 or later.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Shortcake (Shortcode UI) 0.7.2\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/shortcode-"
|
7 |
"ui\n"
|
8 |
+
"POT-Creation-Date: 2017-05-08 13:39+0200\n"
|
|
|
|
|
|
|
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"PO-Revision-Date: 2017-05-08 13:50+0200\n"
|
13 |
+
"Language-Team: \n"
|
14 |
+
"X-Generator: Poedit 2.0.1\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;"
|
16 |
+
"_n_noop:1,2;_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;"
|
17 |
+
"esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c\n"
|
18 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
20 |
+
"X-Poedit-Basepath: ..\n"
|
21 |
+
"X-Textdomain-Support: yes\n"
|
22 |
+
"Last-Translator: \n"
|
23 |
+
"Language: nb\n"
|
24 |
+
"X-Poedit-SearchPath-0: .\n"
|
25 |
|
26 |
#: dev.php:68
|
27 |
msgid ""
|
43 |
msgid "Select Image"
|
44 |
msgstr "Velg bilde"
|
45 |
|
46 |
+
#: dev.php:175
|
47 |
+
msgid "You can select multiple images."
|
48 |
+
msgstr "Du kan velge felre bilder."
|
49 |
+
|
50 |
+
#: dev.php:183
|
51 |
msgid "Citation Source"
|
52 |
msgstr "Kilde"
|
53 |
|
54 |
+
#: dev.php:188
|
55 |
msgid "Test placeholder"
|
56 |
+
msgstr "Text placeholder"
|
57 |
|
58 |
+
#: dev.php:193
|
59 |
msgid "Select Page"
|
60 |
msgstr "Velg Side"
|
61 |
|
62 |
+
#: dev.php:200
|
63 |
+
msgid "Select Term"
|
64 |
+
msgstr "Bakgrunnsfarge"
|
65 |
+
|
66 |
+
#: dev.php:207
|
67 |
+
msgid "User Select"
|
68 |
+
msgstr "Velg bruker"
|
69 |
+
|
70 |
+
#: dev.php:213
|
71 |
+
msgid "Color"
|
72 |
+
msgstr "Farge"
|
73 |
|
74 |
+
#: dev.php:218
|
75 |
msgid "Hex color code"
|
76 |
+
msgstr "Hex fargekode"
|
77 |
|
78 |
+
#: dev.php:222
|
79 |
msgid "Alignment"
|
80 |
msgstr "Justering"
|
81 |
|
82 |
+
#: dev.php:223
|
83 |
msgid ""
|
84 |
"Whether the quotation should be displayed as pull-left, pull-right, or "
|
85 |
"neither."
|
86 |
+
msgstr ""
|
87 |
|
88 |
+
#: dev.php:227
|
89 |
msgid "None"
|
90 |
msgstr "Ingen"
|
91 |
|
92 |
+
#: dev.php:228 dev.php:233
|
93 |
msgid "Pull Left"
|
94 |
+
msgstr "Juster venstre"
|
95 |
|
96 |
+
#: dev.php:229 dev.php:234
|
97 |
msgid "Pull Right"
|
98 |
+
msgstr "Juster høyre"
|
99 |
|
100 |
+
#: dev.php:240
|
101 |
msgid "Year"
|
102 |
msgstr "År"
|
103 |
|
104 |
+
#: dev.php:241
|
105 |
msgid "Optional. The year the quotation is from."
|
106 |
+
msgstr "Valgfri. År for sitat"
|
107 |
|
108 |
+
#: dev.php:260
|
109 |
msgid "Shortcake Dev"
|
110 |
+
msgstr ""
|
111 |
|
112 |
+
#: dev.php:279
|
113 |
msgid "Quote"
|
114 |
msgstr "Sitat"
|
115 |
|
116 |
+
#: dev.php:280
|
117 |
msgid "Include a statement from someone famous."
|
118 |
+
msgstr "Inkluder sitat fra noen berømt"
|
119 |
|
120 |
+
#: dev.php:352
|
121 |
msgid "Content:"
|
122 |
msgstr "Innhold:"
|
123 |
|
124 |
+
#: dev.php:356
|
125 |
msgid "Source:"
|
126 |
msgstr "Kilde:"
|
127 |
|
128 |
+
#: dev.php:360
|
129 |
msgid "Image:"
|
130 |
msgstr "Bilde:"
|
131 |
|
132 |
+
#: dev.php:364
|
133 |
+
msgid "Gallery:"
|
134 |
+
msgstr "Galleri:"
|
135 |
+
|
136 |
+
#: dev.php:372
|
137 |
+
msgid "Pages:"
|
138 |
+
msgstr "Sider:"
|
139 |
+
|
140 |
+
#: dev.php:376
|
141 |
+
msgid "Terms:"
|
142 |
+
msgstr "Betingelser:"
|
143 |
+
|
144 |
+
#: dev.php:380
|
145 |
+
msgid "Users:"
|
146 |
+
msgstr "Brukere:"
|
147 |
+
|
148 |
+
#: dev.php:384
|
149 |
+
msgid "Color:"
|
150 |
+
msgstr "Farge:"
|
151 |
+
|
152 |
+
#: dev.php:388
|
153 |
+
msgid "Alignment:"
|
154 |
+
msgstr "Justering:"
|
155 |
+
|
156 |
+
#: dev.php:392
|
157 |
+
msgid "Year:"
|
158 |
+
msgstr "År:"
|
159 |
+
|
160 |
+
#: inc/class-shortcode-ui.php:118
|
161 |
msgid "Inner Content"
|
162 |
+
msgstr "Indre Innhold"
|
163 |
|
164 |
+
#: inc/class-shortcode-ui.php:262 inc/class-shortcode-ui.php:263
|
165 |
msgid "Insert Post Element"
|
166 |
+
msgstr "Sett inn innleggselement"
|
167 |
|
168 |
+
#. Translators: Ignore placeholder. This is replaced with the Shortcode name
|
169 |
+
#. string in JS
|
170 |
+
#: inc/class-shortcode-ui.php:265
|
171 |
msgid "%s Details"
|
172 |
+
msgstr "% Detaljer"
|
173 |
|
174 |
+
#: inc/class-shortcode-ui.php:266
|
175 |
msgid "Insert Element"
|
176 |
msgstr "Sett inn element"
|
177 |
|
178 |
+
#: inc/class-shortcode-ui.php:267
|
179 |
msgid "Update"
|
180 |
msgstr "Oppdater"
|
181 |
|
182 |
+
#: inc/class-shortcode-ui.php:268
|
183 |
msgid "There are no attributes to configure for this Post Element."
|
184 |
msgstr ""
|
|
|
185 |
|
186 |
+
#: inc/class-shortcode-ui.php:269
|
187 |
msgid "Failed to load preview"
|
188 |
msgstr "Fikk ikke lastet forhåndsvisning"
|
189 |
|
190 |
+
#: inc/class-shortcode-ui.php:270
|
191 |
msgid "Search"
|
192 |
msgstr "Søk"
|
193 |
|
194 |
+
#: inc/class-shortcode-ui.php:271
|
195 |
msgid "Insert Content"
|
196 |
msgstr "Sett inn innhold"
|
197 |
|
198 |
+
#: inc/class-shortcode-ui.php:312
|
199 |
+
msgid "Add Post Element"
|
200 |
+
msgstr "Sett inn innleggselement"
|
201 |
+
|
202 |
+
#: inc/class-shortcode-ui.php:380
|
203 |
msgid "Something's rotten in the state of Denmark"
|
204 |
+
msgstr ""
|
205 |
|
206 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:79
|
207 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:80
|
208 |
msgid "Select Attachment"
|
209 |
msgstr "Velg vedlegg"
|
210 |
|
211 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:138
|
212 |
+
msgid "Attachment Details"
|
213 |
+
msgstr "Vedleggsdetaljer"
|
214 |
|
215 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:145
|
216 |
msgid "Edit Attachment"
|
217 |
msgstr "Endre vedlegg"
|
218 |
|
219 |
#: inc/templates/edit-form.tpl.php:3
|
220 |
msgid "Back to list"
|
221 |
+
msgstr "Tilbake til oversikten"
|
222 |
|
223 |
#. Plugin Name of the plugin/theme
|
224 |
msgid "Shortcake (Shortcode UI)"
|
226 |
|
227 |
#. Description of the plugin/theme
|
228 |
msgid "User Interface for adding shortcodes."
|
229 |
+
msgstr "Brukergrensesnitt for å legge inn shortcodes"
|
230 |
|
231 |
#. Author of the plugin/theme
|
232 |
msgid "Fusion Engineering and community"
|
Binary file
|
@@ -1,97 +1,240 @@
|
|
1 |
-
# Copyright (C)
|
2 |
# This file is distributed under the GPL v2 or later.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Shortcode UI
|
6 |
-
"Report-Msgid-Bugs-To:
|
7 |
-
"
|
8 |
-
"POT-Creation-Date: 2015-04-22 16:48:40+00:00\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"PO-Revision-Date:
|
13 |
-
"
|
14 |
-
"
|
15 |
-
"
|
16 |
-
"
|
|
|
|
|
17 |
"Language: zh_CN\n"
|
18 |
-
"Plural-Forms: nplurals=
|
|
|
19 |
"X-Poedit-SourceCharset: UTF-8\n"
|
20 |
"X-Poedit-Basepath: ../\n"
|
21 |
-
"X-Textdomain-Support: yes\n"
|
22 |
-
"Last-Translator: Amos Lee <iwillhappy1314@gmail.com>\n"
|
23 |
-
"Language-Team: Amos Lee <iwillhappy1314@gmail.com>\n"
|
24 |
"X-Poedit-SearchPath-0: .\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
msgid "Inner Content"
|
28 |
-
msgstr "
|
29 |
|
30 |
-
#: inc/class-shortcode-ui.php:
|
31 |
msgid "Insert Post Element"
|
32 |
-
msgstr "
|
33 |
|
34 |
-
#: inc/class-shortcode-ui.php:
|
|
|
|
|
35 |
msgid "%s Details"
|
36 |
msgstr "%s 详情"
|
37 |
|
38 |
-
#: inc/class-shortcode-ui.php:
|
39 |
msgid "Insert Element"
|
40 |
-
msgstr "
|
41 |
|
42 |
-
#: inc/class-shortcode-ui.php:
|
43 |
msgid "Update"
|
44 |
msgstr "更新"
|
45 |
|
46 |
-
#: inc/class-shortcode-ui.php:
|
47 |
msgid "There are no attributes to configure for this Post Element."
|
48 |
-
msgstr "
|
49 |
-
|
50 |
-
#: inc/class-shortcode-ui.php:107
|
51 |
-
msgid "Edit"
|
52 |
-
msgstr "编辑"
|
53 |
|
54 |
-
#: inc/class-shortcode-ui.php:
|
55 |
-
msgid "Preview"
|
56 |
-
msgstr "预览"
|
57 |
-
|
58 |
-
#: inc/class-shortcode-ui.php:109
|
59 |
msgid "Failed to load preview"
|
60 |
-
msgstr "
|
61 |
|
62 |
-
#: inc/class-shortcode-ui.php:
|
63 |
msgid "Search"
|
64 |
-
msgstr "
|
65 |
|
66 |
-
#: inc/class-shortcode-ui.php:
|
67 |
msgid "Insert Content"
|
68 |
msgstr "插入内容"
|
69 |
|
70 |
-
#: inc/class-shortcode-ui.php:
|
|
|
|
|
|
|
|
|
71 |
msgid "Something's rotten in the state of Denmark"
|
72 |
-
msgstr "
|
73 |
|
74 |
-
#: inc/fields/class-field-attachment.php:
|
75 |
-
#: inc/fields/class-field-attachment.php:
|
76 |
msgid "Select Attachment"
|
77 |
msgstr "选择附件"
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
#: inc/templates/edit-form.tpl.php:3
|
80 |
msgid "Back to list"
|
81 |
msgstr "返回列表"
|
82 |
|
83 |
#. Plugin Name of the plugin/theme
|
84 |
-
msgid "Shortcode UI"
|
85 |
-
msgstr "
|
86 |
|
87 |
#. Description of the plugin/theme
|
88 |
msgid "User Interface for adding shortcodes."
|
89 |
-
msgstr "
|
90 |
|
91 |
#. Author of the plugin/theme
|
92 |
msgid "Fusion Engineering and community"
|
93 |
-
msgstr "Fusion Engineering
|
94 |
|
95 |
#. Author URI of the plugin/theme
|
96 |
msgid "http://next.fusion.net/tag/shortcode-ui/"
|
97 |
-
msgstr "http://next.fusion.net/tag/shortcode-ui/"
|
1 |
+
# Copyright (C) 2017 Fusion Engineering and community
|
2 |
# This file is distributed under the GPL v2 or later.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Shortcake (Shortcode UI) 0.7.2\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/shortcode-ui\n"
|
7 |
+
"POT-Creation-Date: 2017-04-26 19:49:27+00:00\n"
|
|
|
8 |
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2017-06-06 23:04+0800\n"
|
12 |
+
"Last-Translator: Gabriel Chi Hong Lee <chihonglee777@gmail.com>\n"
|
13 |
+
"Language-Team: \n"
|
14 |
+
"X-Generator: grunt-wp-i18n 0.5.4\n"
|
15 |
+
"X-Poedit-KeywordsList: "
|
16 |
+
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
|
17 |
+
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
|
18 |
"Language: zh_CN\n"
|
19 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
20 |
+
"X-Poedit-Country: United States\n"
|
21 |
"X-Poedit-SourceCharset: UTF-8\n"
|
22 |
"X-Poedit-Basepath: ../\n"
|
|
|
|
|
|
|
23 |
"X-Poedit-SearchPath-0: .\n"
|
24 |
+
"X-Poedit-Bookmarks: \n"
|
25 |
+
"X-Textdomain-Support: yes\n"
|
26 |
+
|
27 |
+
#: dev.php:68
|
28 |
+
msgid ""
|
29 |
+
"Shortcode UI plugin must be active for Shortcode UI Example plugin to "
|
30 |
+
"function."
|
31 |
+
msgstr ""
|
32 |
+
"请启用 Shortcode UI 以容许 Shortcode UI Example plugin "
|
33 |
+
"函数."
|
34 |
+
|
35 |
+
#: dev.php:119
|
36 |
+
msgid "Shortcake With No Attributes"
|
37 |
+
msgstr "没有属性的 Shortcake"
|
38 |
+
|
39 |
+
#: dev.php:159
|
40 |
+
msgid "Attachment"
|
41 |
+
msgstr "附件"
|
42 |
+
|
43 |
+
#: dev.php:169 dev.php:170
|
44 |
+
msgid "Select Image"
|
45 |
+
msgstr "挑选图片"
|
46 |
+
|
47 |
+
#: dev.php:175
|
48 |
+
msgid "You can select multiple images."
|
49 |
+
msgstr "你可以选多于一张图片"
|
50 |
+
|
51 |
+
#: dev.php:183
|
52 |
+
msgid "Citation Source"
|
53 |
+
msgstr "引用来源"
|
54 |
+
|
55 |
+
#: dev.php:188
|
56 |
+
msgid "Test placeholder"
|
57 |
+
msgstr "测试占位符"
|
58 |
+
|
59 |
+
#: dev.php:193
|
60 |
+
msgid "Select Page"
|
61 |
+
msgstr "选择页面"
|
62 |
+
|
63 |
+
#: dev.php:200
|
64 |
+
msgid "Select Term"
|
65 |
+
msgstr "选择团队"
|
66 |
+
|
67 |
+
#: dev.php:207
|
68 |
+
msgid "User Select"
|
69 |
+
msgstr "选择用户"
|
70 |
+
|
71 |
+
#: dev.php:213
|
72 |
+
msgid "Color"
|
73 |
+
msgstr "颜色"
|
74 |
+
|
75 |
+
#: dev.php:218
|
76 |
+
msgid "Hex color code"
|
77 |
+
msgstr "Hex 颜色代码"
|
78 |
+
|
79 |
+
#: dev.php:222
|
80 |
+
msgid "Alignment"
|
81 |
+
msgstr "对准"
|
82 |
+
|
83 |
+
#: dev.php:223
|
84 |
+
msgid ""
|
85 |
+
"Whether the quotation should be displayed as pull-left, pull-right, or "
|
86 |
+
"neither."
|
87 |
+
msgstr ""
|
88 |
+
"引文应靠左,靠右,或"
|
89 |
+
"两者都不是。"
|
90 |
+
|
91 |
+
#: dev.php:227
|
92 |
+
msgid "None"
|
93 |
+
msgstr "没有"
|
94 |
+
|
95 |
+
#: dev.php:228 dev.php:233
|
96 |
+
msgid "Pull Left"
|
97 |
+
msgstr "靠左"
|
98 |
+
|
99 |
+
#: dev.php:229 dev.php:234
|
100 |
+
msgid "Pull Right"
|
101 |
+
msgstr "靠右"
|
102 |
|
103 |
+
#: dev.php:240
|
104 |
+
msgid "Year"
|
105 |
+
msgstr "年"
|
106 |
+
|
107 |
+
#: dev.php:241
|
108 |
+
msgid "Optional. The year the quotation is from."
|
109 |
+
msgstr "可选的。引文的年份。"
|
110 |
+
|
111 |
+
#: dev.php:260
|
112 |
+
msgid "Shortcake Dev"
|
113 |
+
msgstr "Shortcake 开发"
|
114 |
+
|
115 |
+
#: dev.php:279
|
116 |
+
msgid "Quote"
|
117 |
+
msgstr "引文"
|
118 |
+
|
119 |
+
#: dev.php:280
|
120 |
+
msgid "Include a statement from someone famous."
|
121 |
+
msgstr "加入一句名人名言。"
|
122 |
+
|
123 |
+
#: dev.php:352
|
124 |
+
msgid "Content:"
|
125 |
+
msgstr "内容:"
|
126 |
+
|
127 |
+
#: dev.php:356
|
128 |
+
msgid "Source:"
|
129 |
+
msgstr "来源:"
|
130 |
+
|
131 |
+
#: dev.php:360
|
132 |
+
msgid "Image:"
|
133 |
+
msgstr "图片:"
|
134 |
+
|
135 |
+
#: dev.php:364
|
136 |
+
msgid "Gallery:"
|
137 |
+
msgstr "图库:"
|
138 |
+
|
139 |
+
#: dev.php:372
|
140 |
+
msgid "Pages:"
|
141 |
+
msgstr "页面:"
|
142 |
+
|
143 |
+
#: dev.php:376
|
144 |
+
msgid "Terms:"
|
145 |
+
msgstr "Terms:"
|
146 |
+
|
147 |
+
#: dev.php:380
|
148 |
+
msgid "Users:"
|
149 |
+
msgstr "用户:"
|
150 |
+
|
151 |
+
#: dev.php:384
|
152 |
+
msgid "Color:"
|
153 |
+
msgstr "颜色:"
|
154 |
+
|
155 |
+
#: dev.php:388
|
156 |
+
msgid "Alignment:"
|
157 |
+
msgstr "对准:"
|
158 |
+
|
159 |
+
#: dev.php:392
|
160 |
+
msgid "Year:"
|
161 |
+
msgstr "年份:"
|
162 |
+
|
163 |
+
#: inc/class-shortcode-ui.php:118
|
164 |
msgid "Inner Content"
|
165 |
+
msgstr "内文:"
|
166 |
|
167 |
+
#: inc/class-shortcode-ui.php:262 inc/class-shortcode-ui.php:263
|
168 |
msgid "Insert Post Element"
|
169 |
+
msgstr "插入帖子元件"
|
170 |
|
171 |
+
#: inc/class-shortcode-ui.php:265
|
172 |
+
#. Translators: Ignore placeholder. This is replaced with the Shortcode name
|
173 |
+
#. string in JS
|
174 |
msgid "%s Details"
|
175 |
msgstr "%s 详情"
|
176 |
|
177 |
+
#: inc/class-shortcode-ui.php:266
|
178 |
msgid "Insert Element"
|
179 |
+
msgstr "插入元件"
|
180 |
|
181 |
+
#: inc/class-shortcode-ui.php:267
|
182 |
msgid "Update"
|
183 |
msgstr "更新"
|
184 |
|
185 |
+
#: inc/class-shortcode-ui.php:268
|
186 |
msgid "There are no attributes to configure for this Post Element."
|
187 |
+
msgstr "此元件没有需要设置的属性。"
|
|
|
|
|
|
|
|
|
188 |
|
189 |
+
#: inc/class-shortcode-ui.php:269
|
|
|
|
|
|
|
|
|
190 |
msgid "Failed to load preview"
|
191 |
+
msgstr "预览载入失败"
|
192 |
|
193 |
+
#: inc/class-shortcode-ui.php:270
|
194 |
msgid "Search"
|
195 |
+
msgstr "搜寻"
|
196 |
|
197 |
+
#: inc/class-shortcode-ui.php:271
|
198 |
msgid "Insert Content"
|
199 |
msgstr "插入内容"
|
200 |
|
201 |
+
#: inc/class-shortcode-ui.php:312
|
202 |
+
msgid "Add Post Element"
|
203 |
+
msgstr "加入帖子元件"
|
204 |
+
|
205 |
+
#: inc/class-shortcode-ui.php:380
|
206 |
msgid "Something's rotten in the state of Denmark"
|
207 |
+
msgstr ""
|
208 |
|
209 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:79
|
210 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:80
|
211 |
msgid "Select Attachment"
|
212 |
msgstr "选择附件"
|
213 |
|
214 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:138
|
215 |
+
msgid "Attachment Details"
|
216 |
+
msgstr "附件详情"
|
217 |
+
|
218 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:145
|
219 |
+
msgid "Edit Attachment"
|
220 |
+
msgstr "编辑附件"
|
221 |
+
|
222 |
#: inc/templates/edit-form.tpl.php:3
|
223 |
msgid "Back to list"
|
224 |
msgstr "返回列表"
|
225 |
|
226 |
#. Plugin Name of the plugin/theme
|
227 |
+
msgid "Shortcake (Shortcode UI)"
|
228 |
+
msgstr "Shortcake (Shortcode UI)"
|
229 |
|
230 |
#. Description of the plugin/theme
|
231 |
msgid "User Interface for adding shortcodes."
|
232 |
+
msgstr "用于加入簡碼的用户界面。"
|
233 |
|
234 |
#. Author of the plugin/theme
|
235 |
msgid "Fusion Engineering and community"
|
236 |
+
msgstr "Fusion Engineering 及其社区"
|
237 |
|
238 |
#. Author URI of the plugin/theme
|
239 |
msgid "http://next.fusion.net/tag/shortcode-ui/"
|
240 |
+
msgstr "http://next.fusion.net/tag/shortcode-ui/"
|
Binary file
|
@@ -0,0 +1,240 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2017 Fusion Engineering and community
|
2 |
+
# This file is distributed under the GPL v2 or later.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Shortcake (Shortcode UI) 0.7.2\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/shortcode-ui\n"
|
7 |
+
"POT-Creation-Date: 2017-04-26 19:49:27+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2017-06-06 23:04+0800\n"
|
12 |
+
"Last-Translator: Gabriel Chi Hong Lee <chihonglee777@gmail.com>\n"
|
13 |
+
"Language-Team: \n"
|
14 |
+
"X-Generator: grunt-wp-i18n 0.5.4\n"
|
15 |
+
"X-Poedit-KeywordsList: "
|
16 |
+
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
|
17 |
+
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
|
18 |
+
"Language: zh_TW\n"
|
19 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
20 |
+
"X-Poedit-Country: United States\n"
|
21 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
22 |
+
"X-Poedit-Basepath: ../\n"
|
23 |
+
"X-Poedit-SearchPath-0: .\n"
|
24 |
+
"X-Poedit-Bookmarks: \n"
|
25 |
+
"X-Textdomain-Support: yes\n"
|
26 |
+
|
27 |
+
#: dev.php:68
|
28 |
+
msgid ""
|
29 |
+
"Shortcode UI plugin must be active for Shortcode UI Example plugin to "
|
30 |
+
"function."
|
31 |
+
msgstr ""
|
32 |
+
"請啟用 Shortcode UI 以容許 Shortcode UI Example plugin "
|
33 |
+
"函數."
|
34 |
+
|
35 |
+
#: dev.php:119
|
36 |
+
msgid "Shortcake With No Attributes"
|
37 |
+
msgstr "沒有屬性的 Shortcake"
|
38 |
+
|
39 |
+
#: dev.php:159
|
40 |
+
msgid "Attachment"
|
41 |
+
msgstr "附件"
|
42 |
+
|
43 |
+
#: dev.php:169 dev.php:170
|
44 |
+
msgid "Select Image"
|
45 |
+
msgstr "挑選圖片"
|
46 |
+
|
47 |
+
#: dev.php:175
|
48 |
+
msgid "You can select multiple images."
|
49 |
+
msgstr "你可以選多於一張圖片"
|
50 |
+
|
51 |
+
#: dev.php:183
|
52 |
+
msgid "Citation Source"
|
53 |
+
msgstr "引用來源"
|
54 |
+
|
55 |
+
#: dev.php:188
|
56 |
+
msgid "Test placeholder"
|
57 |
+
msgstr "測試佔位符"
|
58 |
+
|
59 |
+
#: dev.php:193
|
60 |
+
msgid "Select Page"
|
61 |
+
msgstr "選擇頁面"
|
62 |
+
|
63 |
+
#: dev.php:200
|
64 |
+
msgid "Select Term"
|
65 |
+
msgstr "選擇團隊"
|
66 |
+
|
67 |
+
#: dev.php:207
|
68 |
+
msgid "User Select"
|
69 |
+
msgstr "選擇用戶"
|
70 |
+
|
71 |
+
#: dev.php:213
|
72 |
+
msgid "Color"
|
73 |
+
msgstr "顏色"
|
74 |
+
|
75 |
+
#: dev.php:218
|
76 |
+
msgid "Hex color code"
|
77 |
+
msgstr "Hex 顏色代碼"
|
78 |
+
|
79 |
+
#: dev.php:222
|
80 |
+
msgid "Alignment"
|
81 |
+
msgstr "對準"
|
82 |
+
|
83 |
+
#: dev.php:223
|
84 |
+
msgid ""
|
85 |
+
"Whether the quotation should be displayed as pull-left, pull-right, or "
|
86 |
+
"neither."
|
87 |
+
msgstr ""
|
88 |
+
"引文應靠左,靠右,或"
|
89 |
+
"兩者都不是。"
|
90 |
+
|
91 |
+
#: dev.php:227
|
92 |
+
msgid "None"
|
93 |
+
msgstr "沒有"
|
94 |
+
|
95 |
+
#: dev.php:228 dev.php:233
|
96 |
+
msgid "Pull Left"
|
97 |
+
msgstr "靠左"
|
98 |
+
|
99 |
+
#: dev.php:229 dev.php:234
|
100 |
+
msgid "Pull Right"
|
101 |
+
msgstr "靠右"
|
102 |
+
|
103 |
+
#: dev.php:240
|
104 |
+
msgid "Year"
|
105 |
+
msgstr "年"
|
106 |
+
|
107 |
+
#: dev.php:241
|
108 |
+
msgid "Optional. The year the quotation is from."
|
109 |
+
msgstr "可選的。引文的年份。"
|
110 |
+
|
111 |
+
#: dev.php:260
|
112 |
+
msgid "Shortcake Dev"
|
113 |
+
msgstr "Shortcake 開發"
|
114 |
+
|
115 |
+
#: dev.php:279
|
116 |
+
msgid "Quote"
|
117 |
+
msgstr "引文"
|
118 |
+
|
119 |
+
#: dev.php:280
|
120 |
+
msgid "Include a statement from someone famous."
|
121 |
+
msgstr "加入一句名人名言。"
|
122 |
+
|
123 |
+
#: dev.php:352
|
124 |
+
msgid "Content:"
|
125 |
+
msgstr "內容:"
|
126 |
+
|
127 |
+
#: dev.php:356
|
128 |
+
msgid "Source:"
|
129 |
+
msgstr "來源:"
|
130 |
+
|
131 |
+
#: dev.php:360
|
132 |
+
msgid "Image:"
|
133 |
+
msgstr "圖片:"
|
134 |
+
|
135 |
+
#: dev.php:364
|
136 |
+
msgid "Gallery:"
|
137 |
+
msgstr "圖庫:"
|
138 |
+
|
139 |
+
#: dev.php:372
|
140 |
+
msgid "Pages:"
|
141 |
+
msgstr "頁面:"
|
142 |
+
|
143 |
+
#: dev.php:376
|
144 |
+
msgid "Terms:"
|
145 |
+
msgstr "Terms:"
|
146 |
+
|
147 |
+
#: dev.php:380
|
148 |
+
msgid "Users:"
|
149 |
+
msgstr "用戶:"
|
150 |
+
|
151 |
+
#: dev.php:384
|
152 |
+
msgid "Color:"
|
153 |
+
msgstr "顏色:"
|
154 |
+
|
155 |
+
#: dev.php:388
|
156 |
+
msgid "Alignment:"
|
157 |
+
msgstr "對準:"
|
158 |
+
|
159 |
+
#: dev.php:392
|
160 |
+
msgid "Year:"
|
161 |
+
msgstr "年份:"
|
162 |
+
|
163 |
+
#: inc/class-shortcode-ui.php:118
|
164 |
+
msgid "Inner Content"
|
165 |
+
msgstr "內文:"
|
166 |
+
|
167 |
+
#: inc/class-shortcode-ui.php:262 inc/class-shortcode-ui.php:263
|
168 |
+
msgid "Insert Post Element"
|
169 |
+
msgstr "插入帖子元件"
|
170 |
+
|
171 |
+
#: inc/class-shortcode-ui.php:265
|
172 |
+
#. Translators: Ignore placeholder. This is replaced with the Shortcode name
|
173 |
+
#. string in JS
|
174 |
+
msgid "%s Details"
|
175 |
+
msgstr "%s 詳情"
|
176 |
+
|
177 |
+
#: inc/class-shortcode-ui.php:266
|
178 |
+
msgid "Insert Element"
|
179 |
+
msgstr "插入元件"
|
180 |
+
|
181 |
+
#: inc/class-shortcode-ui.php:267
|
182 |
+
msgid "Update"
|
183 |
+
msgstr "更新"
|
184 |
+
|
185 |
+
#: inc/class-shortcode-ui.php:268
|
186 |
+
msgid "There are no attributes to configure for this Post Element."
|
187 |
+
msgstr "此元件沒有需要設置的屬性。"
|
188 |
+
|
189 |
+
#: inc/class-shortcode-ui.php:269
|
190 |
+
msgid "Failed to load preview"
|
191 |
+
msgstr "預覽載入失敗"
|
192 |
+
|
193 |
+
#: inc/class-shortcode-ui.php:270
|
194 |
+
msgid "Search"
|
195 |
+
msgstr "搜尋"
|
196 |
+
|
197 |
+
#: inc/class-shortcode-ui.php:271
|
198 |
+
msgid "Insert Content"
|
199 |
+
msgstr "插入內容"
|
200 |
+
|
201 |
+
#: inc/class-shortcode-ui.php:312
|
202 |
+
msgid "Add Post Element"
|
203 |
+
msgstr "加入帖子元件"
|
204 |
+
|
205 |
+
#: inc/class-shortcode-ui.php:380
|
206 |
+
msgid "Something's rotten in the state of Denmark"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:79
|
210 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:80
|
211 |
+
msgid "Select Attachment"
|
212 |
+
msgstr "選擇附件"
|
213 |
+
|
214 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:138
|
215 |
+
msgid "Attachment Details"
|
216 |
+
msgstr "附件詳情"
|
217 |
+
|
218 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:145
|
219 |
+
msgid "Edit Attachment"
|
220 |
+
msgstr "編輯附件"
|
221 |
+
|
222 |
+
#: inc/templates/edit-form.tpl.php:3
|
223 |
+
msgid "Back to list"
|
224 |
+
msgstr "返回列表"
|
225 |
+
|
226 |
+
#. Plugin Name of the plugin/theme
|
227 |
+
msgid "Shortcake (Shortcode UI)"
|
228 |
+
msgstr "Shortcake (Shortcode UI)"
|
229 |
+
|
230 |
+
#. Description of the plugin/theme
|
231 |
+
msgid "User Interface for adding shortcodes."
|
232 |
+
msgstr "用於加入簡碼的用戶界面。"
|
233 |
+
|
234 |
+
#. Author of the plugin/theme
|
235 |
+
msgid "Fusion Engineering and community"
|
236 |
+
msgstr "Fusion Engineering 及其社區"
|
237 |
+
|
238 |
+
#. Author URI of the plugin/theme
|
239 |
+
msgid "http://next.fusion.net/tag/shortcode-ui/"
|
240 |
+
msgstr "http://next.fusion.net/tag/shortcode-ui/"
|
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the GPL v2 or later.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Shortcake (Shortcode UI) 0.7.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/shortcode-ui\n"
|
7 |
-
"POT-Creation-Date: 2017-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -42,7 +42,7 @@ msgstr ""
|
|
42 |
msgid "Select Image"
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: dev.php:175
|
46 |
msgid "You can select multiple images."
|
47 |
msgstr ""
|
48 |
|
@@ -50,7 +50,7 @@ msgstr ""
|
|
50 |
msgid "Citation Source"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: dev.php:188
|
54 |
msgid "Test placeholder"
|
55 |
msgstr ""
|
56 |
|
@@ -59,7 +59,7 @@ msgid "Select Page"
|
|
59 |
msgstr ""
|
60 |
|
61 |
#: dev.php:200
|
62 |
-
msgid "Select
|
63 |
msgstr ""
|
64 |
|
65 |
#: dev.php:207
|
@@ -97,108 +97,147 @@ msgid "Pull Right"
|
|
97 |
msgstr ""
|
98 |
|
99 |
#: dev.php:240
|
100 |
-
msgid "
|
101 |
msgstr ""
|
102 |
|
103 |
#: dev.php:241
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
msgid "Optional. The year the quotation is from."
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: dev.php:
|
108 |
msgid "Shortcake Dev"
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: dev.php:
|
112 |
msgid "Quote"
|
113 |
msgstr ""
|
114 |
|
115 |
-
#: dev.php:
|
116 |
msgid "Include a statement from someone famous."
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: dev.php:
|
120 |
msgid "Content:"
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: dev.php:
|
124 |
msgid "Source:"
|
125 |
msgstr ""
|
126 |
|
127 |
-
#: dev.php:
|
128 |
msgid "Image:"
|
129 |
msgstr ""
|
130 |
|
131 |
-
#: dev.php:
|
132 |
msgid "Gallery:"
|
133 |
msgstr ""
|
134 |
|
135 |
-
#: dev.php:
|
136 |
msgid "Pages:"
|
137 |
msgstr ""
|
138 |
|
139 |
-
#: dev.php:
|
140 |
msgid "Terms:"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: dev.php:
|
144 |
msgid "Users:"
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: dev.php:
|
148 |
msgid "Color:"
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: dev.php:
|
152 |
msgid "Alignment:"
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: dev.php:
|
|
|
|
|
|
|
|
|
156 |
msgid "Year:"
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: inc/class-shortcode-ui.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
msgid "Inner Content"
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: inc/class-shortcode-ui.php:
|
164 |
msgid "Insert Post Element"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: inc/class-shortcode-ui.php:
|
168 |
#. Translators: Ignore placeholder. This is replaced with the Shortcode name
|
169 |
#. string in JS
|
170 |
msgid "%s Details"
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: inc/class-shortcode-ui.php:
|
174 |
msgid "Insert Element"
|
175 |
msgstr ""
|
176 |
|
177 |
-
#: inc/class-shortcode-ui.php:
|
178 |
msgid "Update"
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: inc/class-shortcode-ui.php:
|
182 |
msgid "There are no attributes to configure for this Post Element."
|
183 |
msgstr ""
|
184 |
|
185 |
-
#: inc/class-shortcode-ui.php:
|
186 |
msgid "Failed to load preview"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: inc/class-shortcode-ui.php:
|
190 |
msgid "Search"
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: inc/class-shortcode-ui.php:
|
194 |
msgid "Insert Content"
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: inc/class-shortcode-ui.php:
|
198 |
msgid "Add Post Element"
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: inc/class-shortcode-ui.php:
|
202 |
msgid "Something's rotten in the state of Denmark"
|
203 |
msgstr ""
|
204 |
|
@@ -219,6 +258,10 @@ msgstr ""
|
|
219 |
msgid "Back to list"
|
220 |
msgstr ""
|
221 |
|
|
|
|
|
|
|
|
|
222 |
#. Plugin Name of the plugin/theme
|
223 |
msgid "Shortcake (Shortcode UI)"
|
224 |
msgstr ""
|
2 |
# This file is distributed under the GPL v2 or later.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Shortcake (Shortcode UI) 0.7.3\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/shortcode-ui\n"
|
7 |
+
"POT-Creation-Date: 2017-09-05 19:14:53+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
42 |
msgid "Select Image"
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: dev.php:175 test-shortcodes.php:79
|
46 |
msgid "You can select multiple images."
|
47 |
msgstr ""
|
48 |
|
50 |
msgid "Citation Source"
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: dev.php:188 test-shortcodes.php:89
|
54 |
msgid "Test placeholder"
|
55 |
msgstr ""
|
56 |
|
59 |
msgstr ""
|
60 |
|
61 |
#: dev.php:200
|
62 |
+
msgid "Select Tag"
|
63 |
msgstr ""
|
64 |
|
65 |
#: dev.php:207
|
97 |
msgstr ""
|
98 |
|
99 |
#: dev.php:240
|
100 |
+
msgid "CSS Classes"
|
101 |
msgstr ""
|
102 |
|
103 |
#: dev.php:241
|
104 |
+
msgid "Which classes the shortcode should get."
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: dev.php:249
|
108 |
+
msgid "Default"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: dev.php:250
|
112 |
+
msgid "Bold"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: dev.php:251
|
116 |
+
msgid "Italic"
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: dev.php:255
|
120 |
+
msgid "Year"
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: dev.php:256
|
124 |
msgid "Optional. The year the quotation is from."
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: dev.php:275 test-shortcodes.php:47
|
128 |
msgid "Shortcake Dev"
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: dev.php:294 test-shortcodes.php:66
|
132 |
msgid "Quote"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: dev.php:295 test-shortcodes.php:67
|
136 |
msgid "Include a statement from someone famous."
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: dev.php:368 test-shortcodes.php:151
|
140 |
msgid "Content:"
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: dev.php:372 test-shortcodes.php:155
|
144 |
msgid "Source:"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: dev.php:376 test-shortcodes.php:159
|
148 |
msgid "Image:"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: dev.php:380 test-shortcodes.php:163
|
152 |
msgid "Gallery:"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: dev.php:388 test-shortcodes.php:171
|
156 |
msgid "Pages:"
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: dev.php:392 test-shortcodes.php:175
|
160 |
msgid "Terms:"
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: dev.php:396 test-shortcodes.php:179
|
164 |
msgid "Users:"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: dev.php:400 test-shortcodes.php:183
|
168 |
msgid "Color:"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: dev.php:404 test-shortcodes.php:187
|
172 |
msgid "Alignment:"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: dev.php:408
|
176 |
+
msgid "Classes:"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: dev.php:412 test-shortcodes.php:191
|
180 |
msgid "Year:"
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: inc/class-shortcode-ui.php:102
|
184 |
+
#. Translators: link to plugin wiki page with examples of shortcodes supporting
|
185 |
+
#. Shortcake UI
|
186 |
+
msgid ""
|
187 |
+
"The Shortcode UI plugin will not do anything unless UI is registered for "
|
188 |
+
"shortcodes through a theme or plugins. For examples, see <a href=\"%s\" "
|
189 |
+
"target=\"_blank\">here</a>."
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: inc/class-shortcode-ui.php:115
|
193 |
+
msgid ""
|
194 |
+
"Shortcode UI is installed. Try out the shortcode UI through the \"Add Post "
|
195 |
+
"element\" button in the post edit screen."
|
196 |
+
msgstr ""
|
197 |
+
|
198 |
+
#: inc/class-shortcode-ui.php:157
|
199 |
msgid "Inner Content"
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: inc/class-shortcode-ui.php:310 inc/class-shortcode-ui.php:311
|
203 |
msgid "Insert Post Element"
|
204 |
msgstr ""
|
205 |
|
206 |
+
#: inc/class-shortcode-ui.php:313
|
207 |
#. Translators: Ignore placeholder. This is replaced with the Shortcode name
|
208 |
#. string in JS
|
209 |
msgid "%s Details"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: inc/class-shortcode-ui.php:314
|
213 |
msgid "Insert Element"
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: inc/class-shortcode-ui.php:315
|
217 |
msgid "Update"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: inc/class-shortcode-ui.php:316
|
221 |
msgid "There are no attributes to configure for this Post Element."
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: inc/class-shortcode-ui.php:317
|
225 |
msgid "Failed to load preview"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: inc/class-shortcode-ui.php:318
|
229 |
msgid "Search"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: inc/class-shortcode-ui.php:319
|
233 |
msgid "Insert Content"
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: inc/class-shortcode-ui.php:364
|
237 |
msgid "Add Post Element"
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: inc/class-shortcode-ui.php:432
|
241 |
msgid "Something's rotten in the state of Denmark"
|
242 |
msgstr ""
|
243 |
|
258 |
msgid "Back to list"
|
259 |
msgstr ""
|
260 |
|
261 |
+
#: test-shortcodes.php:84
|
262 |
+
msgid "Label"
|
263 |
+
msgstr ""
|
264 |
+
|
265 |
#. Plugin Name of the plugin/theme
|
266 |
msgid "Shortcake (Shortcode UI)"
|
267 |
msgstr ""
|
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: fusionengineering, mattheu, danielbachhuber, zebulonj, goldenapples, jitendraharpalani, sanchothefat, bfintal, davisshaver, garyj, mte90, fredserva, khromov, bronsonquick, dashaluna, mehigh, sc0ttkclark, kraftner, pravdomil
|
3 |
Tags: shortcodes
|
4 |
Requires at least: 4.5
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 0.7.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -68,6 +68,18 @@ We've removed the compatibility shim for the magical `content` attribute. If you
|
|
68 |
|
69 |
== Changelog ==
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
= 0.7.2 (April 24, 2017) =
|
72 |
* Bug fix: Fix behavior in WordPress 4.7.4 where editing a shortcode would insert a new shortcode into the editor rather than updating the shortcode being edited.
|
73 |
* Bug fix: The replacement used to escape percent (%) characters in attributes only replaced the first appearance
|
2 |
Contributors: fusionengineering, mattheu, danielbachhuber, zebulonj, goldenapples, jitendraharpalani, sanchothefat, bfintal, davisshaver, garyj, mte90, fredserva, khromov, bronsonquick, dashaluna, mehigh, sc0ttkclark, kraftner, pravdomil
|
3 |
Tags: shortcodes
|
4 |
Requires at least: 4.5
|
5 |
+
Tested up to: 4.8.1
|
6 |
+
Stable tag: 0.7.3
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
68 |
|
69 |
== Changelog ==
|
70 |
|
71 |
+
= 0.7.3 (September 5, 2017) =
|
72 |
+
* Security: Use nonce validation in ajax render shortcode callback to protect against CSRF.
|
73 |
+
* Bug fix: Make sure that the same js hooks fire on all field types.
|
74 |
+
* Bug fix: Fix bugs affecting multiple select fields (values could not be unset once set, and multiple default values couldn't be set).
|
75 |
+
* Bug fix: Prevent encoded fields containing two percent characters from breaking.
|
76 |
+
* Bug fix: Fix some issues where the media modal state was not reset properly if a shortcode was closed without saving.
|
77 |
+
* Bug fix: Support cases where there are multiple WP_Editor instances on a page, and make sure that the shortcode being edited is sent to the correct page.
|
78 |
+
* Enhancement: When post_select field is selecting from more than one post type, show the post type alongside the post name for easier selection.
|
79 |
+
* Enhancement: Show attachment thumbnails for any attachment type, not just images.
|
80 |
+
* Enhancement: Add more helpful error messages if no shortcodes with Shortcake UI are registered.
|
81 |
+
* Update Norwegian translation
|
82 |
+
|
83 |
= 0.7.2 (April 24, 2017) =
|
84 |
* Bug fix: Fix behavior in WordPress 4.7.4 where editing a shortcode would insert a new shortcode into the editor rather than updating the shortcode being edited.
|
85 |
* Bug fix: The replacement used to escape percent (%) characters in attributes only replaced the first appearance
|
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Shortcake (Shortcode UI)
|
4 |
-
* Version: 0.7.
|
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.7.
|
23 |
|
24 |
require_once dirname( __FILE__ ) . '/inc/class-shortcode-ui.php';
|
25 |
require_once dirname( __FILE__ ) . '/inc/fields/class-shortcode-ui-fields.php';
|
@@ -110,6 +110,17 @@ function shortcode_ui_register_for_shortcode( $shortcode_tag, $args = array() )
|
|
110 |
Shortcode_UI::get_instance()->register_shortcode_ui( $shortcode_tag, $args );
|
111 |
}
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
/**
|
114 |
* Get register UI args by shortcode tag
|
115 |
*
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Shortcake (Shortcode UI)
|
4 |
+
* Version: 0.7.3
|
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.7.3' );
|
23 |
|
24 |
require_once dirname( __FILE__ ) . '/inc/class-shortcode-ui.php';
|
25 |
require_once dirname( __FILE__ ) . '/inc/fields/class-shortcode-ui-fields.php';
|
110 |
Shortcode_UI::get_instance()->register_shortcode_ui( $shortcode_tag, $args );
|
111 |
}
|
112 |
|
113 |
+
/**
|
114 |
+
* Display an admin notice on activating the plugin if no shortcodes with UI are available.
|
115 |
+
*
|
116 |
+
* @return void
|
117 |
+
*/
|
118 |
+
function shortcode_ui_activation_notice() {
|
119 |
+
update_option( 'shortcode_ui_activation_notice', true );
|
120 |
+
}
|
121 |
+
|
122 |
+
register_activation_hook( __FILE__, 'shortcode_ui_activation_notice' );
|
123 |
+
|
124 |
/**
|
125 |
* Get register UI args by shortcode tag
|
126 |
*
|