Version Description
(January 16, 2019) = * Block editor compatability: prevent templates from being output before the document head, which forced the browser into quirksmode, breaking some CSS styles in the block editor. * Bug fix: the above bugfix. * Bug fix: Fix a javascript error which would cause the Insert Post Element modal to be blank if any shortcode contains a select field with no visible options and no default set. * Bug fix: Fix a bug where the "Select Files" button in the media controller became unresponsive after a post element has been inserted. * Enhancement: add an optional "allow clear" field attribute to be passed to select2 fields (post, user, or term select) so that multi-select fields can be cleared with a single click. (This option defaults to off and should not affect existing fields.)
Release Info
| Developer | goldenapples |
| Plugin | |
| Version | 0.7.4 |
| Comparing to | |
| See all releases | |
Code changes from version 0.7.3 to 0.7.4
- inc/class-shortcode-ui.php +37 -32
- inc/fields/class-shortcode-ui-field-attachment.php +17 -10
- inc/fields/class-shortcode-ui-field-color.php +11 -4
- inc/fields/class-shortcode-ui-field-post-select.php +21 -12
- inc/fields/class-shortcode-ui-field-term-select.php +22 -13
- inc/fields/class-shortcode-ui-field-user-select.php +19 -9
- inc/fields/class-shortcode-ui-fields.php +8 -8
- js/build/shortcode-ui.js +23 -4
- js/src/controllers/media-controller.js +15 -1
- js/src/views/edit-attribute-field.js +1 -1
- js/src/views/edit-shortcode-form.js +1 -1
- js/src/views/media-frame.js +1 -0
- js/src/views/select2-field.js +5 -1
- languages/shortcode-ui-it_IT.mo +0 -0
- languages/shortcode-ui-it_IT.po +214 -27
- languages/shortcode-ui-nl_NL.mo +0 -0
- languages/shortcode-ui-nl_NL.po +63 -49
- languages/shortcode-ui.pot +32 -36
- readme.txt +9 -2
- shortcode-ui.php +3 -3
|
@@ -73,12 +73,12 @@ class Shortcode_UI {
|
|
| 73 |
* Setup plugin actions.
|
| 74 |
*/
|
| 75 |
private function setup_actions() {
|
| 76 |
-
add_action( 'admin_notices',
|
| 77 |
-
add_action( 'admin_enqueue_scripts',
|
| 78 |
-
add_action( 'wp_enqueue_editor',
|
| 79 |
-
add_action( 'media_buttons',
|
| 80 |
add_action( 'wp_ajax_bulk_do_shortcode', array( $this, 'handle_ajax_bulk_do_shortcode' ) );
|
| 81 |
-
add_filter( 'wp_editor_settings',
|
| 82 |
}
|
| 83 |
|
| 84 |
/**
|
|
@@ -102,7 +102,7 @@ class Shortcode_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'
|
| 106 |
'target' => array(),
|
| 107 |
),
|
| 108 |
)
|
|
@@ -163,7 +163,7 @@ class Shortcode_UI {
|
|
| 163 |
$args['attrs'] = array();
|
| 164 |
}
|
| 165 |
|
| 166 |
-
$args['shortcode_tag']
|
| 167 |
$this->shortcodes[ $shortcode_tag ] = $args;
|
| 168 |
|
| 169 |
// Setup filter to handle decoding encoded attributes.
|
|
@@ -255,7 +255,8 @@ class Shortcode_UI {
|
|
| 255 |
|
| 256 |
$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
|
| 257 |
|
| 258 |
-
wp_register_script(
|
|
|
|
| 259 |
trailingslashit( $this->plugin_url ) . "lib/select2/js/select2.full{$min}.js",
|
| 260 |
array( 'jquery', 'jquery-ui-sortable' ), '4.0.3'
|
| 261 |
);
|
|
@@ -265,7 +266,8 @@ class Shortcode_UI {
|
|
| 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(
|
|
|
|
| 269 |
trailingslashit( $this->plugin_url ) . "lib/select2/css/select2{$min}.css",
|
| 270 |
null, '4.0.3'
|
| 271 |
);
|
|
@@ -282,7 +284,7 @@ class Shortcode_UI {
|
|
| 282 |
|
| 283 |
wp_enqueue_media();
|
| 284 |
|
| 285 |
-
$shortcodes
|
| 286 |
$current_post_type = get_post_type();
|
| 287 |
if ( $current_post_type ) {
|
| 288 |
foreach ( $shortcodes as $key => $args ) {
|
|
@@ -304,26 +306,28 @@ class Shortcode_UI {
|
|
| 304 |
wp_enqueue_script( 'shortcode-ui-js-hooks', $this->plugin_url . 'lib/wp-js-hooks/' . $wp_js_hooks_file, array(), '2015-03-19' );
|
| 305 |
wp_enqueue_script( 'shortcode-ui', $this->plugin_url . 'js/build/shortcode-ui.js', array( 'jquery', 'backbone', 'mce-view', 'shortcode-ui-js-hooks' ), $this->plugin_version );
|
| 306 |
wp_enqueue_style( 'shortcode-ui', $this->plugin_url . 'css/shortcode-ui.css', array(), $this->plugin_version );
|
| 307 |
-
wp_localize_script(
|
| 308 |
-
'
|
| 309 |
-
|
| 310 |
-
'
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
'
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
|
|
|
|
|
|
| 327 |
|
| 328 |
// add templates to the footer, instead of where we're at now
|
| 329 |
add_action( 'admin_print_footer_scripts', array( $this, 'action_admin_print_footer_scripts' ) );
|
|
@@ -357,7 +361,8 @@ class Shortcode_UI {
|
|
| 357 |
return;
|
| 358 |
}
|
| 359 |
|
| 360 |
-
printf(
|
|
|
|
| 361 |
'<span class="wp-media-buttons-icon dashicons dashicons-migrate"></span> %s' .
|
| 362 |
'</button>',
|
| 363 |
esc_attr( $editor_id ),
|
|
@@ -483,7 +488,7 @@ class Shortcode_UI {
|
|
| 483 |
}
|
| 484 |
|
| 485 |
$responses[ $posted_query['counter'] ] = array(
|
| 486 |
-
'query'
|
| 487 |
'response' => $this->render_shortcode_for_preview( $shortcode, $post_id ),
|
| 488 |
);
|
| 489 |
}
|
| 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' ) );
|
| 80 |
add_action( 'wp_ajax_bulk_do_shortcode', array( $this, 'handle_ajax_bulk_do_shortcode' ) );
|
| 81 |
+
add_filter( 'wp_editor_settings', array( $this, 'filter_wp_editor_settings' ), 10, 2 );
|
| 82 |
}
|
| 83 |
|
| 84 |
/**
|
| 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 |
)
|
| 163 |
$args['attrs'] = array();
|
| 164 |
}
|
| 165 |
|
| 166 |
+
$args['shortcode_tag'] = $shortcode_tag;
|
| 167 |
$this->shortcodes[ $shortcode_tag ] = $args;
|
| 168 |
|
| 169 |
// Setup filter to handle decoding encoded attributes.
|
| 255 |
|
| 256 |
$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
|
| 257 |
|
| 258 |
+
wp_register_script(
|
| 259 |
+
self::$select2_handle,
|
| 260 |
trailingslashit( $this->plugin_url ) . "lib/select2/js/select2.full{$min}.js",
|
| 261 |
array( 'jquery', 'jquery-ui-sortable' ), '4.0.3'
|
| 262 |
);
|
| 266 |
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' );
|
| 267 |
}
|
| 268 |
|
| 269 |
+
wp_register_style(
|
| 270 |
+
self::$select2_handle,
|
| 271 |
trailingslashit( $this->plugin_url ) . "lib/select2/css/select2{$min}.css",
|
| 272 |
null, '4.0.3'
|
| 273 |
);
|
| 284 |
|
| 285 |
wp_enqueue_media();
|
| 286 |
|
| 287 |
+
$shortcodes = array_values( $this->get_shortcodes() );
|
| 288 |
$current_post_type = get_post_type();
|
| 289 |
if ( $current_post_type ) {
|
| 290 |
foreach ( $shortcodes as $key => $args ) {
|
| 306 |
wp_enqueue_script( 'shortcode-ui-js-hooks', $this->plugin_url . 'lib/wp-js-hooks/' . $wp_js_hooks_file, array(), '2015-03-19' );
|
| 307 |
wp_enqueue_script( 'shortcode-ui', $this->plugin_url . 'js/build/shortcode-ui.js', array( 'jquery', 'backbone', 'mce-view', 'shortcode-ui-js-hooks' ), $this->plugin_version );
|
| 308 |
wp_enqueue_style( 'shortcode-ui', $this->plugin_url . 'css/shortcode-ui.css', array(), $this->plugin_version );
|
| 309 |
+
wp_localize_script(
|
| 310 |
+
'shortcode-ui', ' shortcodeUIData', array(
|
| 311 |
+
'shortcodes' => $shortcodes,
|
| 312 |
+
'strings' => array(
|
| 313 |
+
'media_frame_title' => __( 'Insert Post Element', 'shortcode-ui' ),
|
| 314 |
+
'media_frame_menu_insert_label' => __( 'Insert Post Element', 'shortcode-ui' ),
|
| 315 |
+
/* Translators: Ignore placeholder. This is replaced with the Shortcode name string in JS */
|
| 316 |
+
'media_frame_menu_update_label' => __( '%s Details', 'shortcode-ui' ),
|
| 317 |
+
'media_frame_toolbar_insert_label' => __( 'Insert Element', 'shortcode-ui' ),
|
| 318 |
+
'media_frame_toolbar_update_label' => __( 'Update', 'shortcode-ui' ),
|
| 319 |
+
'media_frame_no_attributes_message' => __( 'There are no attributes to configure for this Post Element.', 'shortcode-ui' ),
|
| 320 |
+
'mce_view_error' => __( 'Failed to load preview', 'shortcode-ui' ),
|
| 321 |
+
'search_placeholder' => __( 'Search', 'shortcode-ui' ),
|
| 322 |
+
'insert_content_label' => __( 'Insert Content', 'shortcode-ui' ),
|
| 323 |
+
),
|
| 324 |
+
'nonces' => array(
|
| 325 |
+
'preview' => wp_create_nonce( 'shortcode-ui-preview' ),
|
| 326 |
+
'thumbnailImage' => wp_create_nonce( 'shortcode-ui-get-thumbnail-image' ),
|
| 327 |
+
),
|
| 328 |
+
'select2_handle' => self::$select2_handle,
|
| 329 |
+
)
|
| 330 |
+
);
|
| 331 |
|
| 332 |
// add templates to the footer, instead of where we're at now
|
| 333 |
add_action( 'admin_print_footer_scripts', array( $this, 'action_admin_print_footer_scripts' ) );
|
| 361 |
return;
|
| 362 |
}
|
| 363 |
|
| 364 |
+
printf(
|
| 365 |
+
'<button type="button" class="button shortcake-add-post-element" data-editor="%s">' .
|
| 366 |
'<span class="wp-media-buttons-icon dashicons dashicons-migrate"></span> %s' .
|
| 367 |
'</button>',
|
| 368 |
esc_attr( $editor_id ),
|
| 488 |
}
|
| 489 |
|
| 490 |
$responses[ $posted_query['counter'] ] = array(
|
| 491 |
+
'query' => $posted_query,
|
| 492 |
'response' => $this->render_shortcode_for_preview( $shortcode, $post_id ),
|
| 493 |
);
|
| 494 |
}
|
|
@@ -19,7 +19,7 @@ class Shortcode_UI_Field_Attachment {
|
|
| 19 |
* @access private
|
| 20 |
* @var array
|
| 21 |
*/
|
| 22 |
-
private $post_fields
|
| 23 |
|
| 24 |
/**
|
| 25 |
* Settings for the Attachment Field.
|
|
@@ -73,20 +73,28 @@ class Shortcode_UI_Field_Attachment {
|
|
| 73 |
*/
|
| 74 |
public function action_enqueue_shortcode_ui() {
|
| 75 |
|
| 76 |
-
wp_localize_script(
|
| 77 |
-
'
|
| 78 |
-
'
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
|
|
|
|
|
|
| 83 |
}
|
| 84 |
|
| 85 |
/**
|
| 86 |
-
*
|
| 87 |
*/
|
| 88 |
public function action_shortcode_ui_loaded_editor() {
|
|
|
|
|
|
|
| 89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
?>
|
| 91 |
|
| 92 |
<script type="text/html" id="tmpl-fusion-shortcake-field-attachment">
|
|
@@ -149,5 +157,4 @@ class Shortcode_UI_Field_Attachment {
|
|
| 149 |
|
| 150 |
<?php
|
| 151 |
}
|
| 152 |
-
|
| 153 |
}
|
| 19 |
* @access private
|
| 20 |
* @var array
|
| 21 |
*/
|
| 22 |
+
private $post_fields = array();
|
| 23 |
|
| 24 |
/**
|
| 25 |
* Settings for the Attachment Field.
|
| 73 |
*/
|
| 74 |
public function action_enqueue_shortcode_ui() {
|
| 75 |
|
| 76 |
+
wp_localize_script(
|
| 77 |
+
'shortcode-ui', 'ShortcakeImageFieldData', array(
|
| 78 |
+
'defaultArgs' => array(
|
| 79 |
+
'libraryType' => null, // array of mime types. eg image, image/jpg, application, application/pdf.
|
| 80 |
+
'addButton' => __( 'Select Attachment', 'shortcode-ui' ),
|
| 81 |
+
'frameTitle' => __( 'Select Attachment', 'shortcode-ui' ),
|
| 82 |
+
),
|
| 83 |
+
)
|
| 84 |
+
);
|
| 85 |
}
|
| 86 |
|
| 87 |
/**
|
| 88 |
+
* Prepare to output the templates required for this field in the footer.
|
| 89 |
*/
|
| 90 |
public function action_shortcode_ui_loaded_editor() {
|
| 91 |
+
add_action( 'admin_print_footer_scripts', array( $this, 'output_templates' ) );
|
| 92 |
+
}
|
| 93 |
|
| 94 |
+
/**
|
| 95 |
+
* Output templates used by attachment field.
|
| 96 |
+
*/
|
| 97 |
+
public function output_templates() {
|
| 98 |
?>
|
| 99 |
|
| 100 |
<script type="text/html" id="tmpl-fusion-shortcake-field-attachment">
|
| 157 |
|
| 158 |
<?php
|
| 159 |
}
|
|
|
|
| 160 |
}
|
|
@@ -19,7 +19,7 @@ class Shortcode_UI_Field_Color {
|
|
| 19 |
* @access private
|
| 20 |
* @var array
|
| 21 |
*/
|
| 22 |
-
private $post_fields
|
| 23 |
|
| 24 |
/**
|
| 25 |
* Settings for the Color Field.
|
|
@@ -54,7 +54,7 @@ class Shortcode_UI_Field_Color {
|
|
| 54 |
*/
|
| 55 |
private function setup_actions() {
|
| 56 |
add_filter( 'shortcode_ui_fields', array( $this, 'filter_shortcode_ui_fields' ) );
|
| 57 |
-
add_action( 'shortcode_ui_loaded_editor', array( $this, '
|
| 58 |
}
|
| 59 |
|
| 60 |
/**
|
|
@@ -95,9 +95,9 @@ class Shortcode_UI_Field_Color {
|
|
| 95 |
}
|
| 96 |
|
| 97 |
/**
|
| 98 |
-
*
|
| 99 |
*/
|
| 100 |
-
public function
|
| 101 |
|
| 102 |
if ( ! $this->color_attribute_present() ) {
|
| 103 |
return;
|
|
@@ -106,6 +106,13 @@ class Shortcode_UI_Field_Color {
|
|
| 106 |
wp_enqueue_script( 'wp-color-picker' );
|
| 107 |
wp_enqueue_style( 'wp-color-picker' );
|
| 108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
?>
|
| 110 |
|
| 111 |
<script type="text/html" id="tmpl-fusion-shortcake-field-color">
|
| 19 |
* @access private
|
| 20 |
* @var array
|
| 21 |
*/
|
| 22 |
+
private $post_fields = array();
|
| 23 |
|
| 24 |
/**
|
| 25 |
* Settings for the Color Field.
|
| 54 |
*/
|
| 55 |
private function setup_actions() {
|
| 56 |
add_filter( 'shortcode_ui_fields', array( $this, 'filter_shortcode_ui_fields' ) );
|
| 57 |
+
add_action( 'shortcode_ui_loaded_editor', array( $this, 'action_shortcode_ui_loaded_editor' ) );
|
| 58 |
}
|
| 59 |
|
| 60 |
/**
|
| 95 |
}
|
| 96 |
|
| 97 |
/**
|
| 98 |
+
* Prepare to output the templates required for this field in the footer.
|
| 99 |
*/
|
| 100 |
+
public function action_shortcode_ui_loaded_editor() {
|
| 101 |
|
| 102 |
if ( ! $this->color_attribute_present() ) {
|
| 103 |
return;
|
| 106 |
wp_enqueue_script( 'wp-color-picker' );
|
| 107 |
wp_enqueue_style( 'wp-color-picker' );
|
| 108 |
|
| 109 |
+
add_action( 'admin_print_footer_scripts', array( $this, 'output_templates' ) );
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
/**
|
| 113 |
+
* Output templates used by the color field.
|
| 114 |
+
*/
|
| 115 |
+
public function output_templates() {
|
| 116 |
?>
|
| 117 |
|
| 118 |
<script type="text/html" id="tmpl-fusion-shortcake-field-color">
|
|
@@ -5,7 +5,7 @@ class Shortcode_UI_Field_Post_Select {
|
|
| 5 |
private static $instance;
|
| 6 |
|
| 7 |
// All registered post fields.
|
| 8 |
-
private $post_fields
|
| 9 |
|
| 10 |
// Field Settings.
|
| 11 |
private $fields = array(
|
|
@@ -45,17 +45,25 @@ class Shortcode_UI_Field_Post_Select {
|
|
| 45 |
wp_enqueue_script( Shortcode_UI::$select2_handle );
|
| 46 |
wp_enqueue_style( Shortcode_UI::$select2_handle );
|
| 47 |
|
| 48 |
-
wp_localize_script(
|
| 49 |
-
'
|
| 50 |
-
|
|
|
|
|
|
|
| 51 |
|
| 52 |
}
|
| 53 |
|
| 54 |
/**
|
| 55 |
-
*
|
| 56 |
*/
|
| 57 |
public function action_shortcode_ui_loaded_editor() {
|
|
|
|
|
|
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
?>
|
| 60 |
|
| 61 |
<script type="text/html" id="tmpl-shortcode-ui-field-post-select">
|
|
@@ -86,7 +94,7 @@ class Shortcode_UI_Field_Post_Select {
|
|
| 86 |
$requested_shortcode = isset( $_GET['shortcode'] ) ? sanitize_text_field( $_GET['shortcode'] ) : null;
|
| 87 |
$requested_attr = isset( $_GET['attr'] ) ? sanitize_text_field( $_GET['attr'] ) : null;
|
| 88 |
|
| 89 |
-
$response
|
| 90 |
'items' => array(),
|
| 91 |
'found_items' => 0,
|
| 92 |
'items_per_page' => 0,
|
|
@@ -129,14 +137,14 @@ class Shortcode_UI_Field_Post_Select {
|
|
| 129 |
}
|
| 130 |
|
| 131 |
if ( ! empty( $_GET['include'] ) ) {
|
| 132 |
-
$post__in
|
| 133 |
-
$query_args['post__in']
|
| 134 |
-
$query_args['orderby']
|
| 135 |
$query_args['ignore_sticky_posts'] = true;
|
| 136 |
}
|
| 137 |
|
| 138 |
-
$query
|
| 139 |
-
$post_types
|
| 140 |
$is_multiple_post_types = count( $post_types ) > 1 || 'any' === $post_types;
|
| 141 |
|
| 142 |
foreach ( $query->posts as $post_id ) {
|
|
@@ -148,7 +156,8 @@ class Shortcode_UI_Field_Post_Select {
|
|
| 148 |
if ( $is_multiple_post_types && $post_type_obj ) {
|
| 149 |
$text .= sprintf( ' (%1$s)', $post_type_obj->labels->singular_name );
|
| 150 |
}
|
| 151 |
-
array_push(
|
|
|
|
| 152 |
array(
|
| 153 |
'id' => $post_id,
|
| 154 |
'text' => $text,
|
| 5 |
private static $instance;
|
| 6 |
|
| 7 |
// All registered post fields.
|
| 8 |
+
private $post_fields = array();
|
| 9 |
|
| 10 |
// Field Settings.
|
| 11 |
private $fields = array(
|
| 45 |
wp_enqueue_script( Shortcode_UI::$select2_handle );
|
| 46 |
wp_enqueue_style( Shortcode_UI::$select2_handle );
|
| 47 |
|
| 48 |
+
wp_localize_script(
|
| 49 |
+
'shortcode-ui', 'shortcodeUiPostFieldData', array(
|
| 50 |
+
'nonce' => wp_create_nonce( 'shortcode_ui_field_post_select' ),
|
| 51 |
+
)
|
| 52 |
+
);
|
| 53 |
|
| 54 |
}
|
| 55 |
|
| 56 |
/**
|
| 57 |
+
* Prepare to output the templates required for this field in the footer.
|
| 58 |
*/
|
| 59 |
public function action_shortcode_ui_loaded_editor() {
|
| 60 |
+
add_action( 'admin_print_footer_scripts', array( $this, 'output_templates' ) );
|
| 61 |
+
}
|
| 62 |
|
| 63 |
+
/**
|
| 64 |
+
* Output styles and templates used by post select field.
|
| 65 |
+
*/
|
| 66 |
+
public function output_templates() {
|
| 67 |
?>
|
| 68 |
|
| 69 |
<script type="text/html" id="tmpl-shortcode-ui-field-post-select">
|
| 94 |
$requested_shortcode = isset( $_GET['shortcode'] ) ? sanitize_text_field( $_GET['shortcode'] ) : null;
|
| 95 |
$requested_attr = isset( $_GET['attr'] ) ? sanitize_text_field( $_GET['attr'] ) : null;
|
| 96 |
|
| 97 |
+
$response = array(
|
| 98 |
'items' => array(),
|
| 99 |
'found_items' => 0,
|
| 100 |
'items_per_page' => 0,
|
| 137 |
}
|
| 138 |
|
| 139 |
if ( ! empty( $_GET['include'] ) ) {
|
| 140 |
+
$post__in = is_array( $_GET['include'] ) ? $_GET['include'] : explode( ',', $_GET['include'] );
|
| 141 |
+
$query_args['post__in'] = array_map( 'intval', $post__in );
|
| 142 |
+
$query_args['orderby'] = 'post__in';
|
| 143 |
$query_args['ignore_sticky_posts'] = true;
|
| 144 |
}
|
| 145 |
|
| 146 |
+
$query = new WP_Query( $query_args );
|
| 147 |
+
$post_types = $query->get( 'post_type' );
|
| 148 |
$is_multiple_post_types = count( $post_types ) > 1 || 'any' === $post_types;
|
| 149 |
|
| 150 |
foreach ( $query->posts as $post_id ) {
|
| 156 |
if ( $is_multiple_post_types && $post_type_obj ) {
|
| 157 |
$text .= sprintf( ' (%1$s)', $post_type_obj->labels->singular_name );
|
| 158 |
}
|
| 159 |
+
array_push(
|
| 160 |
+
$response['items'],
|
| 161 |
array(
|
| 162 |
'id' => $post_id,
|
| 163 |
'text' => $text,
|
|
@@ -5,7 +5,7 @@ class Shortcode_UI_Field_Term_Select {
|
|
| 5 |
private static $instance;
|
| 6 |
|
| 7 |
// All registered post fields.
|
| 8 |
-
private $post_fields
|
| 9 |
|
| 10 |
// Field Settings.
|
| 11 |
private $fields = array(
|
|
@@ -31,10 +31,10 @@ class Shortcode_UI_Field_Term_Select {
|
|
| 31 |
* Add the required actions and filters.
|
| 32 |
*/
|
| 33 |
private function setup_actions() {
|
| 34 |
-
add_filter( 'shortcode_ui_fields',
|
| 35 |
-
add_action( 'enqueue_shortcode_ui',
|
| 36 |
add_action( 'wp_ajax_shortcode_ui_term_field', array( $this, 'action_wp_ajax_shortcode_ui_term_field' ) );
|
| 37 |
-
add_action( 'shortcode_ui_loaded_editor',
|
| 38 |
}
|
| 39 |
|
| 40 |
/**
|
|
@@ -55,16 +55,24 @@ class Shortcode_UI_Field_Term_Select {
|
|
| 55 |
wp_enqueue_script( Shortcode_UI::$select2_handle );
|
| 56 |
wp_enqueue_style( Shortcode_UI::$select2_handle );
|
| 57 |
|
| 58 |
-
wp_localize_script(
|
| 59 |
-
'
|
| 60 |
-
|
|
|
|
|
|
|
| 61 |
}
|
| 62 |
|
| 63 |
/**
|
| 64 |
-
*
|
| 65 |
*/
|
| 66 |
public function action_shortcode_ui_loaded_editor() {
|
|
|
|
|
|
|
| 67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
?>
|
| 69 |
|
| 70 |
<script type="text/html" id="tmpl-shortcode-ui-field-term-select">
|
|
@@ -135,16 +143,16 @@ class Shortcode_UI_Field_Term_Select {
|
|
| 135 |
$args['number'] = 10;
|
| 136 |
|
| 137 |
if ( ! empty( $_GET['include'] ) ) {
|
| 138 |
-
$term__in
|
| 139 |
-
$args['number']
|
| 140 |
$args['include'] = array_map( 'intval', $term__in );
|
| 141 |
-
$args['orderby']
|
| 142 |
}
|
| 143 |
|
| 144 |
$term_search_min_chars = (int) apply_filters( 'term_search_min_chars', 2, $taxonomy_type, $search );
|
| 145 |
|
| 146 |
if ( ( 0 !== $term_search_min_chars ) || ( strlen( $search ) > $term_search_min_chars ) ) {
|
| 147 |
-
$args['name__like']
|
| 148 |
$response['terms_per_page'] = 10;
|
| 149 |
}
|
| 150 |
|
|
@@ -164,7 +172,8 @@ class Shortcode_UI_Field_Term_Select {
|
|
| 164 |
$results = get_terms( $args );
|
| 165 |
|
| 166 |
foreach ( $results as $result ) {
|
| 167 |
-
array_push(
|
|
|
|
| 168 |
array(
|
| 169 |
'id' => $result->term_id,
|
| 170 |
'text' => html_entity_decode( $result->name ),
|
| 5 |
private static $instance;
|
| 6 |
|
| 7 |
// All registered post fields.
|
| 8 |
+
private $post_fields = array();
|
| 9 |
|
| 10 |
// Field Settings.
|
| 11 |
private $fields = array(
|
| 31 |
* Add the required actions and filters.
|
| 32 |
*/
|
| 33 |
private function setup_actions() {
|
| 34 |
+
add_filter( 'shortcode_ui_fields', array( $this, 'filter_shortcode_ui_fields' ) );
|
| 35 |
+
add_action( 'enqueue_shortcode_ui', array( $this, 'action_enqueue_shortcode_ui' ) );
|
| 36 |
add_action( 'wp_ajax_shortcode_ui_term_field', array( $this, 'action_wp_ajax_shortcode_ui_term_field' ) );
|
| 37 |
+
add_action( 'shortcode_ui_loaded_editor', array( $this, 'action_shortcode_ui_loaded_editor' ) );
|
| 38 |
}
|
| 39 |
|
| 40 |
/**
|
| 55 |
wp_enqueue_script( Shortcode_UI::$select2_handle );
|
| 56 |
wp_enqueue_style( Shortcode_UI::$select2_handle );
|
| 57 |
|
| 58 |
+
wp_localize_script(
|
| 59 |
+
'shortcode-ui', 'shortcodeUiTermFieldData', array(
|
| 60 |
+
'nonce' => wp_create_nonce( 'shortcode_ui_field_term_select' ),
|
| 61 |
+
)
|
| 62 |
+
);
|
| 63 |
}
|
| 64 |
|
| 65 |
/**
|
| 66 |
+
* Prepare to output the templates required for this field in the footer.
|
| 67 |
*/
|
| 68 |
public function action_shortcode_ui_loaded_editor() {
|
| 69 |
+
add_action( 'admin_print_footer_scripts', array( $this, 'output_templates' ) );
|
| 70 |
+
}
|
| 71 |
|
| 72 |
+
/**
|
| 73 |
+
* Output styles and templates used by term select field.
|
| 74 |
+
*/
|
| 75 |
+
public function output_templates() {
|
| 76 |
?>
|
| 77 |
|
| 78 |
<script type="text/html" id="tmpl-shortcode-ui-field-term-select">
|
| 143 |
$args['number'] = 10;
|
| 144 |
|
| 145 |
if ( ! empty( $_GET['include'] ) ) {
|
| 146 |
+
$term__in = is_array( $_GET['include'] ) ? $_GET['include'] : explode( ',', $_GET['include'] );
|
| 147 |
+
$args['number'] = count( $term__in );
|
| 148 |
$args['include'] = array_map( 'intval', $term__in );
|
| 149 |
+
$args['orderby'] = 'tag__in';
|
| 150 |
}
|
| 151 |
|
| 152 |
$term_search_min_chars = (int) apply_filters( 'term_search_min_chars', 2, $taxonomy_type, $search );
|
| 153 |
|
| 154 |
if ( ( 0 !== $term_search_min_chars ) || ( strlen( $search ) > $term_search_min_chars ) ) {
|
| 155 |
+
$args['name__like'] = $search;
|
| 156 |
$response['terms_per_page'] = 10;
|
| 157 |
}
|
| 158 |
|
| 172 |
$results = get_terms( $args );
|
| 173 |
|
| 174 |
foreach ( $results as $result ) {
|
| 175 |
+
array_push(
|
| 176 |
+
$response['items'],
|
| 177 |
array(
|
| 178 |
'id' => $result->term_id,
|
| 179 |
'text' => html_entity_decode( $result->name ),
|
|
@@ -5,7 +5,7 @@ class Shortcode_UI_Field_User_Select {
|
|
| 5 |
private static $instance;
|
| 6 |
|
| 7 |
// All registered user fields.
|
| 8 |
-
private $user_fields
|
| 9 |
|
| 10 |
// Field Settings.
|
| 11 |
private $fields = array(
|
|
@@ -34,11 +34,11 @@ class Shortcode_UI_Field_User_Select {
|
|
| 34 |
*/
|
| 35 |
private function setup_actions() {
|
| 36 |
|
| 37 |
-
add_filter( 'shortcode_ui_fields',
|
| 38 |
-
add_action( 'enqueue_shortcode_ui',
|
| 39 |
add_action( 'wp_ajax_shortcode_ui_user_field', array( $this, 'action_wp_ajax_shortcode_ui_user_field' ) );
|
| 40 |
add_action( 'wp_ajax_shortcode_ui_user_field_preselect', array( $this, 'action_wp_ajax_shortcode_ui_user_field_preselect' ) );
|
| 41 |
-
add_action( 'shortcode_ui_loaded_editor',
|
| 42 |
}
|
| 43 |
|
| 44 |
/**
|
|
@@ -61,15 +61,24 @@ class Shortcode_UI_Field_User_Select {
|
|
| 61 |
wp_enqueue_script( Shortcode_UI::$select2_handle );
|
| 62 |
wp_enqueue_style( Shortcode_UI::$select2_handle );
|
| 63 |
|
| 64 |
-
wp_localize_script(
|
| 65 |
-
'
|
| 66 |
-
|
|
|
|
|
|
|
| 67 |
}
|
| 68 |
|
| 69 |
/**
|
| 70 |
-
*
|
| 71 |
*/
|
| 72 |
public function action_shortcode_ui_loaded_editor() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
?>
|
| 74 |
|
| 75 |
<script type="text/html" id="tmpl-shortcode-ui-field-user-select">
|
|
@@ -156,7 +165,8 @@ class Shortcode_UI_Field_User_Select {
|
|
| 156 |
$query = new WP_User_Query( $query_args );
|
| 157 |
|
| 158 |
foreach ( $query->get_results() as $user ) {
|
| 159 |
-
array_push(
|
|
|
|
| 160 |
array(
|
| 161 |
'id' => $user->ID,
|
| 162 |
'text' => html_entity_decode( $user->display_name ),
|
| 5 |
private static $instance;
|
| 6 |
|
| 7 |
// All registered user fields.
|
| 8 |
+
private $user_fields = array();
|
| 9 |
|
| 10 |
// Field Settings.
|
| 11 |
private $fields = array(
|
| 34 |
*/
|
| 35 |
private function setup_actions() {
|
| 36 |
|
| 37 |
+
add_filter( 'shortcode_ui_fields', array( $this, 'filter_shortcode_ui_fields' ) );
|
| 38 |
+
add_action( 'enqueue_shortcode_ui', array( $this, 'action_enqueue_shortcode_ui' ) );
|
| 39 |
add_action( 'wp_ajax_shortcode_ui_user_field', array( $this, 'action_wp_ajax_shortcode_ui_user_field' ) );
|
| 40 |
add_action( 'wp_ajax_shortcode_ui_user_field_preselect', array( $this, 'action_wp_ajax_shortcode_ui_user_field_preselect' ) );
|
| 41 |
+
add_action( 'shortcode_ui_loaded_editor', array( $this, 'action_shortcode_ui_loaded_editor' ) );
|
| 42 |
}
|
| 43 |
|
| 44 |
/**
|
| 61 |
wp_enqueue_script( Shortcode_UI::$select2_handle );
|
| 62 |
wp_enqueue_style( Shortcode_UI::$select2_handle );
|
| 63 |
|
| 64 |
+
wp_localize_script(
|
| 65 |
+
'shortcode-ui', 'shortcodeUiUserFieldData', array(
|
| 66 |
+
'nonce' => wp_create_nonce( 'shortcode_ui_field_user_select' ),
|
| 67 |
+
)
|
| 68 |
+
);
|
| 69 |
}
|
| 70 |
|
| 71 |
/**
|
| 72 |
+
* Prepare to output the templates required for this field in the footer.
|
| 73 |
*/
|
| 74 |
public function action_shortcode_ui_loaded_editor() {
|
| 75 |
+
add_action( 'admin_print_footer_scripts', array( $this, 'output_templates' ) );
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
/**
|
| 79 |
+
* Output templates used by user select field.
|
| 80 |
+
*/
|
| 81 |
+
public function output_templates() {
|
| 82 |
?>
|
| 83 |
|
| 84 |
<script type="text/html" id="tmpl-shortcode-ui-field-user-select">
|
| 165 |
$query = new WP_User_Query( $query_args );
|
| 166 |
|
| 167 |
foreach ( $query->get_results() as $user ) {
|
| 168 |
+
array_push(
|
| 169 |
+
$response['items'],
|
| 170 |
array(
|
| 171 |
'id' => $user->ID,
|
| 172 |
'text' => html_entity_decode( $user->display_name ),
|
|
@@ -32,32 +32,32 @@ class Shortcode_UI_Fields {
|
|
| 32 |
* @var array
|
| 33 |
*/
|
| 34 |
private $fields = array(
|
| 35 |
-
'text'
|
| 36 |
'textarea' => array(
|
| 37 |
'template' => 'shortcode-ui-field-textarea',
|
| 38 |
),
|
| 39 |
-
'url'
|
| 40 |
'template' => 'shortcode-ui-field-url',
|
| 41 |
),
|
| 42 |
-
'select'
|
| 43 |
'template' => 'shortcode-ui-field-select',
|
| 44 |
),
|
| 45 |
'checkbox' => array(
|
| 46 |
'template' => 'shortcode-ui-field-checkbox',
|
| 47 |
),
|
| 48 |
-
'radio'
|
| 49 |
'template' => 'shortcode-ui-field-radio',
|
| 50 |
),
|
| 51 |
-
'email'
|
| 52 |
'template' => 'shortcode-ui-field-email',
|
| 53 |
),
|
| 54 |
-
'number'
|
| 55 |
'template' => 'shortcode-ui-field-number',
|
| 56 |
),
|
| 57 |
-
'date'
|
| 58 |
'template' => 'shortcode-ui-field-date',
|
| 59 |
),
|
| 60 |
-
'range'
|
| 61 |
'template' => 'shortcode-ui-field-range',
|
| 62 |
),
|
| 63 |
);
|
| 32 |
* @var array
|
| 33 |
*/
|
| 34 |
private $fields = array(
|
| 35 |
+
'text' => array(),
|
| 36 |
'textarea' => array(
|
| 37 |
'template' => 'shortcode-ui-field-textarea',
|
| 38 |
),
|
| 39 |
+
'url' => array(
|
| 40 |
'template' => 'shortcode-ui-field-url',
|
| 41 |
),
|
| 42 |
+
'select' => array(
|
| 43 |
'template' => 'shortcode-ui-field-select',
|
| 44 |
),
|
| 45 |
'checkbox' => array(
|
| 46 |
'template' => 'shortcode-ui-field-checkbox',
|
| 47 |
),
|
| 48 |
+
'radio' => array(
|
| 49 |
'template' => 'shortcode-ui-field-radio',
|
| 50 |
),
|
| 51 |
+
'email' => array(
|
| 52 |
'template' => 'shortcode-ui-field-email',
|
| 53 |
),
|
| 54 |
+
'number' => array(
|
| 55 |
'template' => 'shortcode-ui-field-number',
|
| 56 |
),
|
| 57 |
+
'date' => array(
|
| 58 |
'template' => 'shortcode-ui-field-date',
|
| 59 |
),
|
| 60 |
+
'range' => array(
|
| 61 |
'template' => 'shortcode-ui-field-range',
|
| 62 |
),
|
| 63 |
);
|
|
@@ -106,6 +106,7 @@ var MediaController = wp.media.controller.State.extend({
|
|
| 106 |
menuItem.render();
|
| 107 |
|
| 108 |
this.frame.setState( 'insert' );
|
|
|
|
| 109 |
},
|
| 110 |
|
| 111 |
setActionSelect: function() {
|
|
@@ -141,6 +142,19 @@ var MediaController = wp.media.controller.State.extend({
|
|
| 141 |
|
| 142 |
this.frame.once( 'close', function() {
|
| 143 |
this.frame.mediaController.toggleSidebar( false );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
}.bind( this ) );
|
| 145 |
|
| 146 |
/*
|
|
@@ -149,7 +163,7 @@ var MediaController = wp.media.controller.State.extend({
|
|
| 149 |
* Called as `shortcode-ui.render_edit`.
|
| 150 |
*
|
| 151 |
* @param shortcodeModel (object)
|
| 152 |
-
*
|
| 153 |
*/
|
| 154 |
var hookName = 'shortcode-ui.render_edit';
|
| 155 |
wp.shortcake.hooks.doAction( hookName, currentShortcode );
|
|
@@ -1251,7 +1265,7 @@ var editAttributeField = Backbone.View.extend( {
|
|
| 1251 |
// Ensure default value for select field.
|
| 1252 |
if ( 'select' === data.type && '' === this.model.get( 'value' ) && ! _.findWhere( data.options, { value: '' } ) ) {
|
| 1253 |
var firstVisibleOption = _.first( data.options );
|
| 1254 |
-
if ( 'undefined' !== typeof firstVisibleOption.value ) {
|
| 1255 |
this.setValue( firstVisibleOption.value );
|
| 1256 |
data.value = firstVisibleOption.value;
|
| 1257 |
}
|
|
@@ -1464,7 +1478,7 @@ var EditShortcodeForm = wp.Backbone.View.extend({
|
|
| 1464 |
|
| 1465 |
});
|
| 1466 |
|
| 1467 |
-
module.exports = EditShortcodeForm;
|
| 1468 |
|
| 1469 |
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
| 1470 |
},{"./../utils/sui.js":10,"./edit-attribute-field-attachment.js":11,"./edit-attribute-field-color.js":12,"./edit-attribute-field-post-select.js":13,"./edit-attribute-field-term-select.js":14,"./edit-attribute-field-user-select.js":15,"./edit-attribute-field.js":16}],18:[function(require,module,exports){
|
|
@@ -1602,6 +1616,7 @@ var mediaFrame = postMediaFrame.extend( {
|
|
| 1602 |
},
|
| 1603 |
|
| 1604 |
contentRender : function( id, tab ) {
|
|
|
|
| 1605 |
this.content.set(
|
| 1606 |
new Shortcode_UI( {
|
| 1607 |
controller: this,
|
|
@@ -1841,7 +1856,10 @@ sui.views.editAttributeSelect2Field = sui.views.editAttributeField.extend( {
|
|
| 1841 |
render: function() {
|
| 1842 |
|
| 1843 |
var self = this,
|
| 1844 |
-
defaults = {
|
|
|
|
|
|
|
|
|
|
| 1845 |
|
| 1846 |
for ( var arg in defaults ) {
|
| 1847 |
if ( ! this.model.get( arg ) ) {
|
|
@@ -1861,6 +1879,7 @@ sui.views.editAttributeSelect2Field = sui.views.editAttributeField.extend( {
|
|
| 1861 |
var $fieldSelect2 = $field[ shortcodeUIData.select2_handle ]({
|
| 1862 |
placeholder: "Search",
|
| 1863 |
multiple: this.model.get( 'multiple' ),
|
|
|
|
| 1864 |
dropdownParent: this.$el,
|
| 1865 |
|
| 1866 |
ajax: {
|
| 106 |
menuItem.render();
|
| 107 |
|
| 108 |
this.frame.setState( 'insert' );
|
| 109 |
+
this.frame.uploader.uploader.uploader.init();
|
| 110 |
},
|
| 111 |
|
| 112 |
setActionSelect: function() {
|
| 142 |
|
| 143 |
this.frame.once( 'close', function() {
|
| 144 |
this.frame.mediaController.toggleSidebar( false );
|
| 145 |
+
/* Trigger render_closed */
|
| 146 |
+
/*
|
| 147 |
+
* Action run after the shortcode overlay is closed.
|
| 148 |
+
*
|
| 149 |
+
* Called as `shortcode-ui.render_closed`.
|
| 150 |
+
*
|
| 151 |
+
* @param shortcodeModel (object)
|
| 152 |
+
* Reference to the shortcode model used in this overlay.
|
| 153 |
+
*/
|
| 154 |
+
var hookName = 'shortcode-ui.render_closed';
|
| 155 |
+
var shortcodeModel = this.frame.mediaController.props.get( 'currentShortcode' );
|
| 156 |
+
wp.shortcake.hooks.doAction( hookName, shortcodeModel );
|
| 157 |
+
|
| 158 |
}.bind( this ) );
|
| 159 |
|
| 160 |
/*
|
| 163 |
* Called as `shortcode-ui.render_edit`.
|
| 164 |
*
|
| 165 |
* @param shortcodeModel (object)
|
| 166 |
+
* Reference to the shortcode model used in this overlay.
|
| 167 |
*/
|
| 168 |
var hookName = 'shortcode-ui.render_edit';
|
| 169 |
wp.shortcake.hooks.doAction( hookName, currentShortcode );
|
| 1265 |
// Ensure default value for select field.
|
| 1266 |
if ( 'select' === data.type && '' === this.model.get( 'value' ) && ! _.findWhere( data.options, { value: '' } ) ) {
|
| 1267 |
var firstVisibleOption = _.first( data.options );
|
| 1268 |
+
if ( firstVisibleOption && 'undefined' !== typeof firstVisibleOption.value ) {
|
| 1269 |
this.setValue( firstVisibleOption.value );
|
| 1270 |
data.value = firstVisibleOption.value;
|
| 1271 |
}
|
| 1478 |
|
| 1479 |
});
|
| 1480 |
|
| 1481 |
+
module.exports = sui.views.EditShortcodeForm = EditShortcodeForm;
|
| 1482 |
|
| 1483 |
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
| 1484 |
},{"./../utils/sui.js":10,"./edit-attribute-field-attachment.js":11,"./edit-attribute-field-color.js":12,"./edit-attribute-field-post-select.js":13,"./edit-attribute-field-term-select.js":14,"./edit-attribute-field-user-select.js":15,"./edit-attribute-field.js":16}],18:[function(require,module,exports){
|
| 1616 |
},
|
| 1617 |
|
| 1618 |
contentRender : function( id, tab ) {
|
| 1619 |
+
this.setState( 'shortcode-ui' );
|
| 1620 |
this.content.set(
|
| 1621 |
new Shortcode_UI( {
|
| 1622 |
controller: this,
|
| 1856 |
render: function() {
|
| 1857 |
|
| 1858 |
var self = this,
|
| 1859 |
+
defaults = {
|
| 1860 |
+
multiple: false,
|
| 1861 |
+
allowClear: false
|
| 1862 |
+
};
|
| 1863 |
|
| 1864 |
for ( var arg in defaults ) {
|
| 1865 |
if ( ! this.model.get( arg ) ) {
|
| 1879 |
var $fieldSelect2 = $field[ shortcodeUIData.select2_handle ]({
|
| 1880 |
placeholder: "Search",
|
| 1881 |
multiple: this.model.get( 'multiple' ),
|
| 1882 |
+
allowClear: this.model.get( 'allowClear' ),
|
| 1883 |
dropdownParent: this.$el,
|
| 1884 |
|
| 1885 |
ajax: {
|
|
@@ -69,6 +69,7 @@ var MediaController = wp.media.controller.State.extend({
|
|
| 69 |
menuItem.render();
|
| 70 |
|
| 71 |
this.frame.setState( 'insert' );
|
|
|
|
| 72 |
},
|
| 73 |
|
| 74 |
setActionSelect: function() {
|
|
@@ -104,6 +105,19 @@ var MediaController = wp.media.controller.State.extend({
|
|
| 104 |
|
| 105 |
this.frame.once( 'close', function() {
|
| 106 |
this.frame.mediaController.toggleSidebar( false );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
}.bind( this ) );
|
| 108 |
|
| 109 |
/*
|
|
@@ -112,7 +126,7 @@ var MediaController = wp.media.controller.State.extend({
|
|
| 112 |
* Called as `shortcode-ui.render_edit`.
|
| 113 |
*
|
| 114 |
* @param shortcodeModel (object)
|
| 115 |
-
*
|
| 116 |
*/
|
| 117 |
var hookName = 'shortcode-ui.render_edit';
|
| 118 |
wp.shortcake.hooks.doAction( hookName, currentShortcode );
|
| 69 |
menuItem.render();
|
| 70 |
|
| 71 |
this.frame.setState( 'insert' );
|
| 72 |
+
this.frame.uploader.uploader.uploader.init();
|
| 73 |
},
|
| 74 |
|
| 75 |
setActionSelect: function() {
|
| 105 |
|
| 106 |
this.frame.once( 'close', function() {
|
| 107 |
this.frame.mediaController.toggleSidebar( false );
|
| 108 |
+
/* Trigger render_closed */
|
| 109 |
+
/*
|
| 110 |
+
* Action run after the shortcode overlay is closed.
|
| 111 |
+
*
|
| 112 |
+
* Called as `shortcode-ui.render_closed`.
|
| 113 |
+
*
|
| 114 |
+
* @param shortcodeModel (object)
|
| 115 |
+
* Reference to the shortcode model used in this overlay.
|
| 116 |
+
*/
|
| 117 |
+
var hookName = 'shortcode-ui.render_closed';
|
| 118 |
+
var shortcodeModel = this.frame.mediaController.props.get( 'currentShortcode' );
|
| 119 |
+
wp.shortcake.hooks.doAction( hookName, shortcodeModel );
|
| 120 |
+
|
| 121 |
}.bind( this ) );
|
| 122 |
|
| 123 |
/*
|
| 126 |
* Called as `shortcode-ui.render_edit`.
|
| 127 |
*
|
| 128 |
* @param shortcodeModel (object)
|
| 129 |
+
* Reference to the shortcode model used in this overlay.
|
| 130 |
*/
|
| 131 |
var hookName = 'shortcode-ui.render_edit';
|
| 132 |
wp.shortcake.hooks.doAction( hookName, currentShortcode );
|
|
@@ -50,7 +50,7 @@ var editAttributeField = Backbone.View.extend( {
|
|
| 50 |
// Ensure default value for select field.
|
| 51 |
if ( 'select' === data.type && '' === this.model.get( 'value' ) && ! _.findWhere( data.options, { value: '' } ) ) {
|
| 52 |
var firstVisibleOption = _.first( data.options );
|
| 53 |
-
if ( 'undefined' !== typeof firstVisibleOption.value ) {
|
| 54 |
this.setValue( firstVisibleOption.value );
|
| 55 |
data.value = firstVisibleOption.value;
|
| 56 |
}
|
| 50 |
// Ensure default value for select field.
|
| 51 |
if ( 'select' === data.type && '' === this.model.get( 'value' ) && ! _.findWhere( data.options, { value: '' } ) ) {
|
| 52 |
var firstVisibleOption = _.first( data.options );
|
| 53 |
+
if ( firstVisibleOption && 'undefined' !== typeof firstVisibleOption.value ) {
|
| 54 |
this.setValue( firstVisibleOption.value );
|
| 55 |
data.value = firstVisibleOption.value;
|
| 56 |
}
|
|
@@ -79,4 +79,4 @@ var EditShortcodeForm = wp.Backbone.View.extend({
|
|
| 79 |
|
| 80 |
});
|
| 81 |
|
| 82 |
-
module.exports = EditShortcodeForm;
|
| 79 |
|
| 80 |
});
|
| 81 |
|
| 82 |
+
module.exports = sui.views.EditShortcodeForm = EditShortcodeForm;
|
|
@@ -50,6 +50,7 @@ var mediaFrame = postMediaFrame.extend( {
|
|
| 50 |
},
|
| 51 |
|
| 52 |
contentRender : function( id, tab ) {
|
|
|
|
| 53 |
this.content.set(
|
| 54 |
new Shortcode_UI( {
|
| 55 |
controller: this,
|
| 50 |
},
|
| 51 |
|
| 52 |
contentRender : function( id, tab ) {
|
| 53 |
+
this.setState( 'shortcode-ui' );
|
| 54 |
this.content.set(
|
| 55 |
new Shortcode_UI( {
|
| 56 |
controller: this,
|
|
@@ -91,7 +91,10 @@ sui.views.editAttributeSelect2Field = sui.views.editAttributeField.extend( {
|
|
| 91 |
render: function() {
|
| 92 |
|
| 93 |
var self = this,
|
| 94 |
-
defaults = {
|
|
|
|
|
|
|
|
|
|
| 95 |
|
| 96 |
for ( var arg in defaults ) {
|
| 97 |
if ( ! this.model.get( arg ) ) {
|
|
@@ -111,6 +114,7 @@ sui.views.editAttributeSelect2Field = sui.views.editAttributeField.extend( {
|
|
| 111 |
var $fieldSelect2 = $field[ shortcodeUIData.select2_handle ]({
|
| 112 |
placeholder: "Search",
|
| 113 |
multiple: this.model.get( 'multiple' ),
|
|
|
|
| 114 |
dropdownParent: this.$el,
|
| 115 |
|
| 116 |
ajax: {
|
| 91 |
render: function() {
|
| 92 |
|
| 93 |
var self = this,
|
| 94 |
+
defaults = {
|
| 95 |
+
multiple: false,
|
| 96 |
+
allowClear: false
|
| 97 |
+
};
|
| 98 |
|
| 99 |
for ( var arg in defaults ) {
|
| 100 |
if ( ! this.model.get( arg ) ) {
|
| 114 |
var $fieldSelect2 = $field[ shortcodeUIData.select2_handle ]({
|
| 115 |
placeholder: "Search",
|
| 116 |
multiple: this.model.get( 'multiple' ),
|
| 117 |
+
allowClear: this.model.get( 'allowClear' ),
|
| 118 |
dropdownParent: this.$el,
|
| 119 |
|
| 120 |
ajax: {
|
|
Binary file
|
|
@@ -4,79 +4,259 @@
|
|
| 4 |
msgid ""
|
| 5 |
msgstr ""
|
| 6 |
"Project-Id-Version: Shortcake (Shortcode UI) 0.5.0-alpha\n"
|
| 7 |
-
"Report-Msgid-Bugs-To:
|
| 8 |
-
"POT-Creation-Date:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
| 12 |
-
"
|
| 13 |
-
"Last-Translator: Mte90 <mte90net@gmail.com>\n"
|
| 14 |
-
"Language-Team: Italian <mte90net@gmail.com>\n"
|
| 15 |
-
"X-Generator: Poedit 1.8.4\n"
|
| 16 |
"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
|
| 17 |
"_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
|
| 18 |
"esc_html_x:1,2c\n"
|
| 19 |
-
"Language: it\n"
|
| 20 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
| 21 |
"X-Poedit-SourceCharset: UTF-8\n"
|
| 22 |
"X-Poedit-Basepath: ..\n"
|
| 23 |
"X-Textdomain-Support: yes\n"
|
| 24 |
"X-Poedit-SearchPath-0: .\n"
|
| 25 |
|
| 26 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
msgid "Inner Content"
|
| 28 |
msgstr "Contenuto interno"
|
| 29 |
|
| 30 |
-
#: inc/class-shortcode-ui.php:
|
| 31 |
msgid "Insert Post Element"
|
| 32 |
msgstr "Inserisci Elemento nel Post"
|
| 33 |
|
| 34 |
-
|
|
|
|
|
|
|
| 35 |
msgid "%s Details"
|
| 36 |
msgstr "%s Dettagli"
|
| 37 |
|
| 38 |
-
#: inc/class-shortcode-ui.php:
|
| 39 |
msgid "Insert Element"
|
| 40 |
msgstr "Inserisci Elemento"
|
| 41 |
|
| 42 |
-
#: inc/class-shortcode-ui.php:
|
| 43 |
msgid "Update"
|
| 44 |
msgstr "Aggiorna"
|
| 45 |
|
| 46 |
-
#: inc/class-shortcode-ui.php:
|
| 47 |
msgid "There are no attributes to configure for this Post Element."
|
| 48 |
msgstr "Non ci sono attributi per configurare questo Elemento Post."
|
| 49 |
|
| 50 |
-
#: inc/class-shortcode-ui.php:
|
| 51 |
-
msgid "Edit"
|
| 52 |
-
msgstr "Modifica"
|
| 53 |
-
|
| 54 |
-
#: inc/class-shortcode-ui.php:207
|
| 55 |
msgid "Failed to load preview"
|
| 56 |
msgstr "Caricamento dell'anteprima fallita"
|
| 57 |
|
| 58 |
-
#: inc/class-shortcode-ui.php:
|
| 59 |
msgid "Search"
|
| 60 |
msgstr "Cerca"
|
| 61 |
|
| 62 |
-
#: inc/class-shortcode-ui.php:
|
| 63 |
msgid "Insert Content"
|
| 64 |
msgstr "Inserisci Contenuto"
|
| 65 |
|
| 66 |
-
#: inc/class-shortcode-ui.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
msgid "Something's rotten in the state of Denmark"
|
| 68 |
msgstr "Qualcosa è marcio in Danimarca"
|
| 69 |
|
| 70 |
-
#: inc/fields/class-field-attachment.php:79
|
| 71 |
-
#: inc/fields/class-field-attachment.php:80
|
| 72 |
msgid "Select Attachment"
|
| 73 |
msgstr "Seleziona Allegato"
|
| 74 |
|
| 75 |
-
#: inc/fields/class-field-attachment.php:
|
| 76 |
-
msgid "
|
| 77 |
-
msgstr "Dettagli
|
| 78 |
|
| 79 |
-
#: inc/fields/class-field-attachment.php:
|
| 80 |
msgid "Edit Attachment"
|
| 81 |
msgstr "Modifica Allegato"
|
| 82 |
|
|
@@ -84,6 +264,10 @@ msgstr "Modifica Allegato"
|
|
| 84 |
msgid "Back to list"
|
| 85 |
msgstr "Torna alla lista"
|
| 86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
#. Plugin Name of the plugin/theme
|
| 88 |
msgid "Shortcake (Shortcode UI)"
|
| 89 |
msgstr "Shortcake (Shortcode UI)"
|
|
@@ -99,3 +283,6 @@ msgstr "Fusion Engineering e community"
|
|
| 99 |
#. Author URI of the plugin/theme
|
| 100 |
msgid "http://next.fusion.net/tag/shortcode-ui/"
|
| 101 |
msgstr "http://next.fusion.net/tag/shortcode-ui/"
|
|
|
|
|
|
|
|
|
| 4 |
msgid ""
|
| 5 |
msgstr ""
|
| 6 |
"Project-Id-Version: Shortcake (Shortcode UI) 0.5.0-alpha\n"
|
| 7 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/shortcode-ui\n"
|
| 8 |
+
"POT-Creation-Date: 2017-09-05 19:14:53+00:00\n"
|
| 9 |
+
"PO-Revision-Date: 2017-10-03 21:36+0200\n"
|
| 10 |
+
"Last-Translator: Mte90 <mte90net@gmail.com>\n"
|
| 11 |
+
"Language-Team: Italian <mte90net@gmail.com>\n"
|
| 12 |
+
"Language: it\n"
|
| 13 |
"MIME-Version: 1.0\n"
|
| 14 |
"Content-Type: text/plain; charset=UTF-8\n"
|
| 15 |
"Content-Transfer-Encoding: 8bit\n"
|
| 16 |
+
"X-Generator: Poedit 2.0.4\n"
|
|
|
|
|
|
|
|
|
|
| 17 |
"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
|
| 18 |
"_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
|
| 19 |
"esc_html_x:1,2c\n"
|
|
|
|
| 20 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
| 21 |
"X-Poedit-SourceCharset: UTF-8\n"
|
| 22 |
"X-Poedit-Basepath: ..\n"
|
| 23 |
"X-Textdomain-Support: yes\n"
|
| 24 |
"X-Poedit-SearchPath-0: .\n"
|
| 25 |
|
| 26 |
+
#: dev.php:68
|
| 27 |
+
msgid ""
|
| 28 |
+
"Shortcode UI plugin must be active for Shortcode UI Example plugin to "
|
| 29 |
+
"function."
|
| 30 |
+
msgstr "Shortcode UI plugin deve essere attivato per usare l'esempio."
|
| 31 |
+
|
| 32 |
+
#: dev.php:119
|
| 33 |
+
msgid "Shortcake With No Attributes"
|
| 34 |
+
msgstr "Shortcake senza attributi"
|
| 35 |
+
|
| 36 |
+
#: dev.php:159
|
| 37 |
+
msgid "Attachment"
|
| 38 |
+
msgstr "Allegato"
|
| 39 |
+
|
| 40 |
+
#: dev.php:169 dev.php:170
|
| 41 |
+
msgid "Select Image"
|
| 42 |
+
msgstr "Seleziona Immagine"
|
| 43 |
+
|
| 44 |
+
#: dev.php:175 test-shortcodes.php:79
|
| 45 |
+
msgid "You can select multiple images."
|
| 46 |
+
msgstr "Puoi selezionare immagini multiple."
|
| 47 |
+
|
| 48 |
+
#: dev.php:183
|
| 49 |
+
msgid "Citation Source"
|
| 50 |
+
msgstr "Sorgente citazione"
|
| 51 |
+
|
| 52 |
+
#: dev.php:188 test-shortcodes.php:89
|
| 53 |
+
msgid "Test placeholder"
|
| 54 |
+
msgstr "Test placeholder"
|
| 55 |
+
|
| 56 |
+
#: dev.php:193
|
| 57 |
+
msgid "Select Page"
|
| 58 |
+
msgstr "Seleziona Pagina"
|
| 59 |
+
|
| 60 |
+
#: dev.php:200
|
| 61 |
+
msgid "Select Tag"
|
| 62 |
+
msgstr "Seleziona tag"
|
| 63 |
+
|
| 64 |
+
#: dev.php:207
|
| 65 |
+
msgid "User Select"
|
| 66 |
+
msgstr "Seleziona utente"
|
| 67 |
+
|
| 68 |
+
#: dev.php:213
|
| 69 |
+
msgid "Color"
|
| 70 |
+
msgstr "Colore"
|
| 71 |
+
|
| 72 |
+
#: dev.php:218
|
| 73 |
+
msgid "Hex color code"
|
| 74 |
+
msgstr "Codice colore esadecimale"
|
| 75 |
+
|
| 76 |
+
#: dev.php:222
|
| 77 |
+
msgid "Alignment"
|
| 78 |
+
msgstr "Allineamento"
|
| 79 |
+
|
| 80 |
+
#: dev.php:223
|
| 81 |
+
msgid ""
|
| 82 |
+
"Whether the quotation should be displayed as pull-left, pull-right, or "
|
| 83 |
+
"neither."
|
| 84 |
+
msgstr ""
|
| 85 |
+
"Come la citazione dovrebbe essere mostrata con allineamento a destra o "
|
| 86 |
+
"sinistra o nessuno."
|
| 87 |
+
|
| 88 |
+
#: dev.php:227
|
| 89 |
+
msgid "None"
|
| 90 |
+
msgstr "Nessuno"
|
| 91 |
+
|
| 92 |
+
#: dev.php:228 dev.php:233
|
| 93 |
+
msgid "Pull Left"
|
| 94 |
+
msgstr "Allinea a sinistra"
|
| 95 |
+
|
| 96 |
+
#: dev.php:229 dev.php:234
|
| 97 |
+
msgid "Pull Right"
|
| 98 |
+
msgstr "Allinea a destra"
|
| 99 |
+
|
| 100 |
+
#: dev.php:240
|
| 101 |
+
msgid "CSS Classes"
|
| 102 |
+
msgstr "Classi CSS"
|
| 103 |
+
|
| 104 |
+
#: dev.php:241
|
| 105 |
+
msgid "Which classes the shortcode should get."
|
| 106 |
+
msgstr "Quali classi necessita lo shortcode."
|
| 107 |
+
|
| 108 |
+
#: dev.php:249
|
| 109 |
+
msgid "Default"
|
| 110 |
+
msgstr "Predefinito"
|
| 111 |
+
|
| 112 |
+
#: dev.php:250
|
| 113 |
+
msgid "Bold"
|
| 114 |
+
msgstr "Grassetto"
|
| 115 |
+
|
| 116 |
+
#: dev.php:251
|
| 117 |
+
msgid "Italic"
|
| 118 |
+
msgstr "Corsivo"
|
| 119 |
+
|
| 120 |
+
#: dev.php:255
|
| 121 |
+
msgid "Year"
|
| 122 |
+
msgstr "Anno"
|
| 123 |
+
|
| 124 |
+
#: dev.php:256
|
| 125 |
+
msgid "Optional. The year the quotation is from."
|
| 126 |
+
msgstr "Opzionale. L'anno della citazione."
|
| 127 |
+
|
| 128 |
+
#: dev.php:275 test-shortcodes.php:47
|
| 129 |
+
msgid "Shortcake Dev"
|
| 130 |
+
msgstr "Shortcake Dev"
|
| 131 |
+
|
| 132 |
+
#: dev.php:294 test-shortcodes.php:66
|
| 133 |
+
msgid "Quote"
|
| 134 |
+
msgstr "Citazione"
|
| 135 |
+
|
| 136 |
+
#: dev.php:295 test-shortcodes.php:67
|
| 137 |
+
msgid "Include a statement from someone famous."
|
| 138 |
+
msgstr "Includi una frase di qualcuno famoso."
|
| 139 |
+
|
| 140 |
+
#: dev.php:368 test-shortcodes.php:151
|
| 141 |
+
msgid "Content:"
|
| 142 |
+
msgstr "Contenuto:"
|
| 143 |
+
|
| 144 |
+
#: dev.php:372 test-shortcodes.php:155
|
| 145 |
+
msgid "Source:"
|
| 146 |
+
msgstr "Sorgente:"
|
| 147 |
+
|
| 148 |
+
#: dev.php:376 test-shortcodes.php:159
|
| 149 |
+
msgid "Image:"
|
| 150 |
+
msgstr "Immagine:"
|
| 151 |
+
|
| 152 |
+
#: dev.php:380 test-shortcodes.php:163
|
| 153 |
+
msgid "Gallery:"
|
| 154 |
+
msgstr "Galleria:"
|
| 155 |
+
|
| 156 |
+
#: dev.php:388 test-shortcodes.php:171
|
| 157 |
+
msgid "Pages:"
|
| 158 |
+
msgstr "Pagine:"
|
| 159 |
+
|
| 160 |
+
#: dev.php:392 test-shortcodes.php:175
|
| 161 |
+
msgid "Terms:"
|
| 162 |
+
msgstr "Termini:"
|
| 163 |
+
|
| 164 |
+
#: dev.php:396 test-shortcodes.php:179
|
| 165 |
+
msgid "Users:"
|
| 166 |
+
msgstr "Utenti:"
|
| 167 |
+
|
| 168 |
+
#: dev.php:400 test-shortcodes.php:183
|
| 169 |
+
msgid "Color:"
|
| 170 |
+
msgstr "Colore:"
|
| 171 |
+
|
| 172 |
+
#: dev.php:404 test-shortcodes.php:187
|
| 173 |
+
msgid "Alignment:"
|
| 174 |
+
msgstr "Allineamento:"
|
| 175 |
+
|
| 176 |
+
#: dev.php:408
|
| 177 |
+
msgid "Classes:"
|
| 178 |
+
msgstr "Classi:"
|
| 179 |
+
|
| 180 |
+
#: dev.php:412 test-shortcodes.php:191
|
| 181 |
+
msgid "Year:"
|
| 182 |
+
msgstr "Anno:"
|
| 183 |
+
|
| 184 |
+
#. Translators: link to plugin wiki page with examples of shortcodes supporting
|
| 185 |
+
#. Shortcake UI
|
| 186 |
+
#: inc/class-shortcode-ui.php:102
|
| 187 |
+
msgid ""
|
| 188 |
+
"The Shortcode UI plugin will not do anything unless UI is registered for "
|
| 189 |
+
"shortcodes through a theme or plugins. For examples, see <a href=\"%s\" "
|
| 190 |
+
"target=\"_blank\">here</a>."
|
| 191 |
+
msgstr ""
|
| 192 |
+
"Il plugin Shortcode UI non farà niente all'interfaccia finché gli "
|
| 193 |
+
"shortocode non saranno registrati da un tema o plugin. Per esempio vedi <a "
|
| 194 |
+
"href=\"%s\" target=\"_blank\">qui</a>."
|
| 195 |
+
|
| 196 |
+
#: inc/class-shortcode-ui.php:115
|
| 197 |
+
msgid ""
|
| 198 |
+
"Shortcode UI is installed. Try out the shortcode UI through the \"Add Post "
|
| 199 |
+
"element\" button in the post edit screen."
|
| 200 |
+
msgstr ""
|
| 201 |
+
"Shortcode UI è installato. Prova l'interfaccia shortcode con il pulsante "
|
| 202 |
+
"\"Inserisci Elemento nel Post\" nella schermata di modifica."
|
| 203 |
+
|
| 204 |
+
#: inc/class-shortcode-ui.php:157
|
| 205 |
msgid "Inner Content"
|
| 206 |
msgstr "Contenuto interno"
|
| 207 |
|
| 208 |
+
#: inc/class-shortcode-ui.php:310 inc/class-shortcode-ui.php:311
|
| 209 |
msgid "Insert Post Element"
|
| 210 |
msgstr "Inserisci Elemento nel Post"
|
| 211 |
|
| 212 |
+
#. Translators: Ignore placeholder. This is replaced with the Shortcode name
|
| 213 |
+
#. string in JS
|
| 214 |
+
#: inc/class-shortcode-ui.php:313
|
| 215 |
msgid "%s Details"
|
| 216 |
msgstr "%s Dettagli"
|
| 217 |
|
| 218 |
+
#: inc/class-shortcode-ui.php:314
|
| 219 |
msgid "Insert Element"
|
| 220 |
msgstr "Inserisci Elemento"
|
| 221 |
|
| 222 |
+
#: inc/class-shortcode-ui.php:315
|
| 223 |
msgid "Update"
|
| 224 |
msgstr "Aggiorna"
|
| 225 |
|
| 226 |
+
#: inc/class-shortcode-ui.php:316
|
| 227 |
msgid "There are no attributes to configure for this Post Element."
|
| 228 |
msgstr "Non ci sono attributi per configurare questo Elemento Post."
|
| 229 |
|
| 230 |
+
#: inc/class-shortcode-ui.php:317
|
|
|
|
|
|
|
|
|
|
|
|
|
| 231 |
msgid "Failed to load preview"
|
| 232 |
msgstr "Caricamento dell'anteprima fallita"
|
| 233 |
|
| 234 |
+
#: inc/class-shortcode-ui.php:318
|
| 235 |
msgid "Search"
|
| 236 |
msgstr "Cerca"
|
| 237 |
|
| 238 |
+
#: inc/class-shortcode-ui.php:319
|
| 239 |
msgid "Insert Content"
|
| 240 |
msgstr "Inserisci Contenuto"
|
| 241 |
|
| 242 |
+
#: inc/class-shortcode-ui.php:364
|
| 243 |
+
msgid "Add Post Element"
|
| 244 |
+
msgstr "Inserisci Elemento nel Post"
|
| 245 |
+
|
| 246 |
+
#: inc/class-shortcode-ui.php:432
|
| 247 |
msgid "Something's rotten in the state of Denmark"
|
| 248 |
msgstr "Qualcosa è marcio in Danimarca"
|
| 249 |
|
| 250 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:79
|
| 251 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:80
|
| 252 |
msgid "Select Attachment"
|
| 253 |
msgstr "Seleziona Allegato"
|
| 254 |
|
| 255 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:138
|
| 256 |
+
msgid "Attachment Details"
|
| 257 |
+
msgstr "Dettagli Allegato"
|
| 258 |
|
| 259 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:145
|
| 260 |
msgid "Edit Attachment"
|
| 261 |
msgstr "Modifica Allegato"
|
| 262 |
|
| 264 |
msgid "Back to list"
|
| 265 |
msgstr "Torna alla lista"
|
| 266 |
|
| 267 |
+
#: test-shortcodes.php:84
|
| 268 |
+
msgid "Label"
|
| 269 |
+
msgstr "Etichetta"
|
| 270 |
+
|
| 271 |
#. Plugin Name of the plugin/theme
|
| 272 |
msgid "Shortcake (Shortcode UI)"
|
| 273 |
msgstr "Shortcake (Shortcode UI)"
|
| 283 |
#. Author URI of the plugin/theme
|
| 284 |
msgid "http://next.fusion.net/tag/shortcode-ui/"
|
| 285 |
msgstr "http://next.fusion.net/tag/shortcode-ui/"
|
| 286 |
+
|
| 287 |
+
#~ msgid "Edit"
|
| 288 |
+
#~ msgstr "Modifica"
|
|
Binary file
|
|
@@ -2,94 +2,108 @@ msgid ""
|
|
| 2 |
msgstr ""
|
| 3 |
"Project-Id-Version: Shortcode UI vv0.3-beta1\n"
|
| 4 |
"Report-Msgid-Bugs-To: \n"
|
| 5 |
-
"POT-Creation-Date: \n"
|
| 6 |
-
"PO-Revision-Date:
|
| 7 |
"Last-Translator: youssou <youssouhaagsman@gmail.com>\n"
|
| 8 |
"Language-Team: \n"
|
|
|
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
| 12 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
| 13 |
-
"X-Generator:
|
| 14 |
-
"X-Poedit-
|
| 15 |
-
"X-Poedit-
|
| 16 |
-
"
|
| 17 |
-
"
|
| 18 |
-
"X-Poedit-Basepath:
|
| 19 |
-
"X-
|
| 20 |
"X-Poedit-SearchPath-0: .\n"
|
| 21 |
-
"X-Textdomain-Support: yes"
|
| 22 |
|
| 23 |
-
#: inc/class-shortcode-ui.php:
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
msgid "Inner Content"
|
| 26 |
msgstr "Ingesloten inhoud"
|
| 27 |
|
| 28 |
-
|
| 29 |
-
#: inc/class-shortcode-ui.php:
|
| 30 |
-
#@ shortcode-ui
|
| 31 |
msgid "Insert Post Element"
|
| 32 |
msgstr "Berichtelement invoegen"
|
| 33 |
|
| 34 |
-
|
|
|
|
| 35 |
#, php-format
|
| 36 |
-
#@ shortcode-ui
|
| 37 |
msgid "%s Details"
|
| 38 |
msgstr "%s details"
|
| 39 |
|
| 40 |
-
|
| 41 |
-
|
| 42 |
msgid "Insert Element"
|
| 43 |
msgstr "Element invoegen"
|
| 44 |
|
| 45 |
-
|
| 46 |
-
|
| 47 |
msgid "Update"
|
| 48 |
msgstr "Updaten"
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
| 52 |
msgid "There are no attributes to configure for this Post Element."
|
| 53 |
-
msgstr "
|
| 54 |
-
|
| 55 |
-
#: inc/class-shortcode-ui.php:111
|
| 56 |
-
#@ shortcode-ui
|
| 57 |
-
msgid "Edit"
|
| 58 |
-
msgstr "Bewerken"
|
| 59 |
-
|
| 60 |
-
#: inc/class-shortcode-ui.php:112
|
| 61 |
-
#@ shortcode-ui
|
| 62 |
-
msgid "Preview"
|
| 63 |
-
msgstr "Voorbeeld"
|
| 64 |
|
| 65 |
-
|
| 66 |
-
|
| 67 |
msgid "Failed to load preview"
|
| 68 |
msgstr "Laden van voorbeeld mislukt"
|
| 69 |
|
| 70 |
-
|
| 71 |
-
|
| 72 |
msgid "Search"
|
| 73 |
msgstr "Zoeken"
|
| 74 |
|
| 75 |
-
|
| 76 |
-
|
| 77 |
msgid "Insert Content"
|
| 78 |
msgstr "Inhoud invoegen"
|
| 79 |
|
| 80 |
-
#: inc/class-shortcode-ui.php:
|
| 81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
msgid "Something's rotten in the state of Denmark"
|
| 83 |
msgstr "Iets is er rot in Denemarkens staat"
|
| 84 |
|
| 85 |
-
|
| 86 |
-
#: inc/fields/class-field-attachment.php:
|
| 87 |
-
|
| 88 |
msgid "Select Attachment"
|
| 89 |
msgstr "Selecteer bijlage"
|
| 90 |
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
| 95 |
|
|
|
|
|
|
|
|
|
| 2 |
msgstr ""
|
| 3 |
"Project-Id-Version: Shortcode UI vv0.3-beta1\n"
|
| 4 |
"Report-Msgid-Bugs-To: \n"
|
| 5 |
+
"POT-Creation-Date: 2018-02-21 21:03+0100\n"
|
| 6 |
+
"PO-Revision-Date: 2018-02-21 21:13+0100\n"
|
| 7 |
"Last-Translator: youssou <youssouhaagsman@gmail.com>\n"
|
| 8 |
"Language-Team: \n"
|
| 9 |
+
"Language: nl_NL\n"
|
| 10 |
"MIME-Version: 1.0\n"
|
| 11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
| 12 |
"Content-Transfer-Encoding: 8bit\n"
|
| 13 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
| 14 |
+
"X-Generator: Poedit 1.8.7.1\n"
|
| 15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
| 16 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
| 17 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;"
|
| 18 |
+
"esc_html__\n"
|
| 19 |
+
"X-Poedit-Basepath: ..\n"
|
| 20 |
+
"X-Textdomain-Support: yes\n"
|
| 21 |
"X-Poedit-SearchPath-0: .\n"
|
|
|
|
| 22 |
|
| 23 |
+
#: inc/class-shortcode-ui.php:102
|
| 24 |
+
#, php-format
|
| 25 |
+
msgid ""
|
| 26 |
+
"The Shortcode UI plugin will not do anything unless UI is registered for "
|
| 27 |
+
"shortcodes through a theme or plugins. For examples, see <a href=\"%s\" "
|
| 28 |
+
"target=\"_blank\">here</a>."
|
| 29 |
+
msgstr ""
|
| 30 |
+
|
| 31 |
+
#: inc/class-shortcode-ui.php:115
|
| 32 |
+
msgid ""
|
| 33 |
+
"Shortcode UI is installed. Try out the shortcode UI through the \"Add Post "
|
| 34 |
+
"element\" button in the post edit screen."
|
| 35 |
+
msgstr ""
|
| 36 |
+
|
| 37 |
+
# @ shortcode-ui
|
| 38 |
+
#: inc/class-shortcode-ui.php:157
|
| 39 |
msgid "Inner Content"
|
| 40 |
msgstr "Ingesloten inhoud"
|
| 41 |
|
| 42 |
+
# @ shortcode-ui
|
| 43 |
+
#: inc/class-shortcode-ui.php:310 inc/class-shortcode-ui.php:311
|
|
|
|
| 44 |
msgid "Insert Post Element"
|
| 45 |
msgstr "Berichtelement invoegen"
|
| 46 |
|
| 47 |
+
# @ shortcode-ui
|
| 48 |
+
#: inc/class-shortcode-ui.php:313
|
| 49 |
#, php-format
|
|
|
|
| 50 |
msgid "%s Details"
|
| 51 |
msgstr "%s details"
|
| 52 |
|
| 53 |
+
# @ shortcode-ui
|
| 54 |
+
#: inc/class-shortcode-ui.php:314
|
| 55 |
msgid "Insert Element"
|
| 56 |
msgstr "Element invoegen"
|
| 57 |
|
| 58 |
+
# @ shortcode-ui
|
| 59 |
+
#: inc/class-shortcode-ui.php:315
|
| 60 |
msgid "Update"
|
| 61 |
msgstr "Updaten"
|
| 62 |
|
| 63 |
+
# @ shortcode-ui
|
| 64 |
+
#: inc/class-shortcode-ui.php:316
|
| 65 |
msgid "There are no attributes to configure for this Post Element."
|
| 66 |
+
msgstr ""
|
| 67 |
+
"Er zijn geen attributen die bewerkt kunnen worden voor dit berichtelement."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
+
# @ shortcode-ui
|
| 70 |
+
#: inc/class-shortcode-ui.php:317
|
| 71 |
msgid "Failed to load preview"
|
| 72 |
msgstr "Laden van voorbeeld mislukt"
|
| 73 |
|
| 74 |
+
# @ shortcode-ui
|
| 75 |
+
#: inc/class-shortcode-ui.php:318
|
| 76 |
msgid "Search"
|
| 77 |
msgstr "Zoeken"
|
| 78 |
|
| 79 |
+
# @ shortcode-ui
|
| 80 |
+
#: inc/class-shortcode-ui.php:319
|
| 81 |
msgid "Insert Content"
|
| 82 |
msgstr "Inhoud invoegen"
|
| 83 |
|
| 84 |
+
#: inc/class-shortcode-ui.php:364
|
| 85 |
+
msgid "Add Post Element"
|
| 86 |
+
msgstr "Berichtelement invoegen"
|
| 87 |
+
|
| 88 |
+
# @ shortcode-ui
|
| 89 |
+
#: inc/class-shortcode-ui.php:432
|
| 90 |
msgid "Something's rotten in the state of Denmark"
|
| 91 |
msgstr "Iets is er rot in Denemarkens staat"
|
| 92 |
|
| 93 |
+
# @ shortcode-ui
|
| 94 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:79
|
| 95 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:80
|
| 96 |
msgid "Select Attachment"
|
| 97 |
msgstr "Selecteer bijlage"
|
| 98 |
|
| 99 |
+
# @ shortcode-ui
|
| 100 |
+
#~ msgid "Edit"
|
| 101 |
+
#~ msgstr "Bewerken"
|
| 102 |
+
|
| 103 |
+
# @ shortcode-ui
|
| 104 |
+
#~ msgid "Preview"
|
| 105 |
+
#~ msgstr "Voorbeeld"
|
| 106 |
|
| 107 |
+
# @ shortcode-ui
|
| 108 |
+
#~ msgid "Back to list"
|
| 109 |
+
#~ msgstr "Terug naar lijst"
|
|
@@ -1,14 +1,14 @@
|
|
| 1 |
-
# Copyright (C)
|
| 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:
|
| 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:
|
| 12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
| 13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
| 14 |
"X-Generator: grunt-wp-i18n 0.5.4\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 |
|
|
@@ -124,51 +124,51 @@ msgstr ""
|
|
| 124 |
msgid "Optional. The year the quotation is from."
|
| 125 |
msgstr ""
|
| 126 |
|
| 127 |
-
#: dev.php:275
|
| 128 |
msgid "Shortcake Dev"
|
| 129 |
msgstr ""
|
| 130 |
|
| 131 |
-
#: dev.php:294
|
| 132 |
msgid "Quote"
|
| 133 |
msgstr ""
|
| 134 |
|
| 135 |
-
#: dev.php:295
|
| 136 |
msgid "Include a statement from someone famous."
|
| 137 |
msgstr ""
|
| 138 |
|
| 139 |
-
#: dev.php:368
|
| 140 |
msgid "Content:"
|
| 141 |
msgstr ""
|
| 142 |
|
| 143 |
-
#: dev.php:372
|
| 144 |
msgid "Source:"
|
| 145 |
msgstr ""
|
| 146 |
|
| 147 |
-
#: dev.php:376
|
| 148 |
msgid "Image:"
|
| 149 |
msgstr ""
|
| 150 |
|
| 151 |
-
#: dev.php:380
|
| 152 |
msgid "Gallery:"
|
| 153 |
msgstr ""
|
| 154 |
|
| 155 |
-
#: dev.php:388
|
| 156 |
msgid "Pages:"
|
| 157 |
msgstr ""
|
| 158 |
|
| 159 |
-
#: dev.php:392
|
| 160 |
msgid "Terms:"
|
| 161 |
msgstr ""
|
| 162 |
|
| 163 |
-
#: dev.php:396
|
| 164 |
msgid "Users:"
|
| 165 |
msgstr ""
|
| 166 |
|
| 167 |
-
#: dev.php:400
|
| 168 |
msgid "Color:"
|
| 169 |
msgstr ""
|
| 170 |
|
| 171 |
-
#: dev.php:404
|
| 172 |
msgid "Alignment:"
|
| 173 |
msgstr ""
|
| 174 |
|
|
@@ -176,7 +176,7 @@ msgstr ""
|
|
| 176 |
msgid "Classes:"
|
| 177 |
msgstr ""
|
| 178 |
|
| 179 |
-
#: dev.php:412
|
| 180 |
msgid "Year:"
|
| 181 |
msgstr ""
|
| 182 |
|
|
@@ -199,58 +199,58 @@ msgstr ""
|
|
| 199 |
msgid "Inner Content"
|
| 200 |
msgstr ""
|
| 201 |
|
| 202 |
-
#: inc/class-shortcode-ui.php:
|
| 203 |
msgid "Insert Post Element"
|
| 204 |
msgstr ""
|
| 205 |
|
| 206 |
-
#: inc/class-shortcode-ui.php:
|
| 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:
|
| 213 |
msgid "Insert Element"
|
| 214 |
msgstr ""
|
| 215 |
|
| 216 |
-
#: inc/class-shortcode-ui.php:
|
| 217 |
msgid "Update"
|
| 218 |
msgstr ""
|
| 219 |
|
| 220 |
-
#: inc/class-shortcode-ui.php:
|
| 221 |
msgid "There are no attributes to configure for this Post Element."
|
| 222 |
msgstr ""
|
| 223 |
|
| 224 |
-
#: inc/class-shortcode-ui.php:
|
| 225 |
msgid "Failed to load preview"
|
| 226 |
msgstr ""
|
| 227 |
|
| 228 |
-
#: inc/class-shortcode-ui.php:
|
| 229 |
msgid "Search"
|
| 230 |
msgstr ""
|
| 231 |
|
| 232 |
-
#: inc/class-shortcode-ui.php:
|
| 233 |
msgid "Insert Content"
|
| 234 |
msgstr ""
|
| 235 |
|
| 236 |
-
#: inc/class-shortcode-ui.php:
|
| 237 |
msgid "Add Post Element"
|
| 238 |
msgstr ""
|
| 239 |
|
| 240 |
-
#: inc/class-shortcode-ui.php:
|
| 241 |
msgid "Something's rotten in the state of Denmark"
|
| 242 |
msgstr ""
|
| 243 |
|
| 244 |
-
#: inc/fields/class-shortcode-ui-field-attachment.php:79
|
| 245 |
#: inc/fields/class-shortcode-ui-field-attachment.php:80
|
|
|
|
| 246 |
msgid "Select Attachment"
|
| 247 |
msgstr ""
|
| 248 |
|
| 249 |
-
#: inc/fields/class-shortcode-ui-field-attachment.php:
|
| 250 |
msgid "Attachment Details"
|
| 251 |
msgstr ""
|
| 252 |
|
| 253 |
-
#: inc/fields/class-shortcode-ui-field-attachment.php:
|
| 254 |
msgid "Edit Attachment"
|
| 255 |
msgstr ""
|
| 256 |
|
|
@@ -258,10 +258,6 @@ msgstr ""
|
|
| 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 ""
|
| 1 |
+
# Copyright (C) 2019 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.4\n"
|
| 6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/shortcode-ui\n"
|
| 7 |
+
"POT-Creation-Date: 2019-01-16 22:36:44+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: 2019-MO-DA HO:MI+ZONE\n"
|
| 12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
| 13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
| 14 |
"X-Generator: grunt-wp-i18n 0.5.4\n"
|
| 42 |
msgid "Select Image"
|
| 43 |
msgstr ""
|
| 44 |
|
| 45 |
+
#: dev.php:175
|
| 46 |
msgid "You can select multiple images."
|
| 47 |
msgstr ""
|
| 48 |
|
| 50 |
msgid "Citation Source"
|
| 51 |
msgstr ""
|
| 52 |
|
| 53 |
+
#: dev.php:188
|
| 54 |
msgid "Test placeholder"
|
| 55 |
msgstr ""
|
| 56 |
|
| 124 |
msgid "Optional. The year the quotation is from."
|
| 125 |
msgstr ""
|
| 126 |
|
| 127 |
+
#: dev.php:275
|
| 128 |
msgid "Shortcake Dev"
|
| 129 |
msgstr ""
|
| 130 |
|
| 131 |
+
#: dev.php:294
|
| 132 |
msgid "Quote"
|
| 133 |
msgstr ""
|
| 134 |
|
| 135 |
+
#: dev.php:295
|
| 136 |
msgid "Include a statement from someone famous."
|
| 137 |
msgstr ""
|
| 138 |
|
| 139 |
+
#: dev.php:368
|
| 140 |
msgid "Content:"
|
| 141 |
msgstr ""
|
| 142 |
|
| 143 |
+
#: dev.php:372
|
| 144 |
msgid "Source:"
|
| 145 |
msgstr ""
|
| 146 |
|
| 147 |
+
#: dev.php:376
|
| 148 |
msgid "Image:"
|
| 149 |
msgstr ""
|
| 150 |
|
| 151 |
+
#: dev.php:380
|
| 152 |
msgid "Gallery:"
|
| 153 |
msgstr ""
|
| 154 |
|
| 155 |
+
#: dev.php:388
|
| 156 |
msgid "Pages:"
|
| 157 |
msgstr ""
|
| 158 |
|
| 159 |
+
#: dev.php:392
|
| 160 |
msgid "Terms:"
|
| 161 |
msgstr ""
|
| 162 |
|
| 163 |
+
#: dev.php:396
|
| 164 |
msgid "Users:"
|
| 165 |
msgstr ""
|
| 166 |
|
| 167 |
+
#: dev.php:400
|
| 168 |
msgid "Color:"
|
| 169 |
msgstr ""
|
| 170 |
|
| 171 |
+
#: dev.php:404
|
| 172 |
msgid "Alignment:"
|
| 173 |
msgstr ""
|
| 174 |
|
| 176 |
msgid "Classes:"
|
| 177 |
msgstr ""
|
| 178 |
|
| 179 |
+
#: dev.php:412
|
| 180 |
msgid "Year:"
|
| 181 |
msgstr ""
|
| 182 |
|
| 199 |
msgid "Inner Content"
|
| 200 |
msgstr ""
|
| 201 |
|
| 202 |
+
#: inc/class-shortcode-ui.php:313 inc/class-shortcode-ui.php:314
|
| 203 |
msgid "Insert Post Element"
|
| 204 |
msgstr ""
|
| 205 |
|
| 206 |
+
#: inc/class-shortcode-ui.php:316
|
| 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:317
|
| 213 |
msgid "Insert Element"
|
| 214 |
msgstr ""
|
| 215 |
|
| 216 |
+
#: inc/class-shortcode-ui.php:318
|
| 217 |
msgid "Update"
|
| 218 |
msgstr ""
|
| 219 |
|
| 220 |
+
#: inc/class-shortcode-ui.php:319
|
| 221 |
msgid "There are no attributes to configure for this Post Element."
|
| 222 |
msgstr ""
|
| 223 |
|
| 224 |
+
#: inc/class-shortcode-ui.php:320
|
| 225 |
msgid "Failed to load preview"
|
| 226 |
msgstr ""
|
| 227 |
|
| 228 |
+
#: inc/class-shortcode-ui.php:321
|
| 229 |
msgid "Search"
|
| 230 |
msgstr ""
|
| 231 |
|
| 232 |
+
#: inc/class-shortcode-ui.php:322
|
| 233 |
msgid "Insert Content"
|
| 234 |
msgstr ""
|
| 235 |
|
| 236 |
+
#: inc/class-shortcode-ui.php:369
|
| 237 |
msgid "Add Post Element"
|
| 238 |
msgstr ""
|
| 239 |
|
| 240 |
+
#: inc/class-shortcode-ui.php:437
|
| 241 |
msgid "Something's rotten in the state of Denmark"
|
| 242 |
msgstr ""
|
| 243 |
|
|
|
|
| 244 |
#: inc/fields/class-shortcode-ui-field-attachment.php:80
|
| 245 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:81
|
| 246 |
msgid "Select Attachment"
|
| 247 |
msgstr ""
|
| 248 |
|
| 249 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:146
|
| 250 |
msgid "Attachment Details"
|
| 251 |
msgstr ""
|
| 252 |
|
| 253 |
+
#: inc/fields/class-shortcode-ui-field-attachment.php:153
|
| 254 |
msgid "Edit Attachment"
|
| 255 |
msgstr ""
|
| 256 |
|
| 258 |
msgid "Back to list"
|
| 259 |
msgstr ""
|
| 260 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 261 |
#. Plugin Name of the plugin/theme
|
| 262 |
msgid "Shortcake (Shortcode UI)"
|
| 263 |
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:
|
| 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,13 @@ We've removed the compatibility shim for the magical `content` attribute. If you
|
|
| 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.
|
| 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: 5.0.3
|
| 6 |
+
Stable tag: 0.7.4
|
| 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.4 (January 16, 2019) =
|
| 72 |
+
* Block editor compatability: prevent templates from being output before the document head, which forced the browser into quirksmode, breaking some CSS styles in the block editor.
|
| 73 |
+
* Bug fix: the above bugfix.
|
| 74 |
+
* Bug fix: Fix a javascript error which would cause the Insert Post Element modal to be blank if any shortcode contains a select field with no visible options and no default set.
|
| 75 |
+
* Bug fix: Fix a bug where the "Select Files" button in the media controller became unresponsive after a post element has been inserted.
|
| 76 |
+
* Enhancement: add an optional "allow clear" field attribute to be passed to select2 fields (post, user, or term select) so that multi-select fields can be cleared with a single click. (This option defaults to off and should not affect existing fields.)
|
| 77 |
+
|
| 78 |
= 0.7.3 (September 5, 2017) =
|
| 79 |
* Security: Use nonce validation in ajax render shortcode callback to protect against CSRF.
|
| 80 |
* Bug fix: Make sure that the same js hooks fire on all field types.
|
|
@@ -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';
|
|
@@ -64,7 +64,7 @@ function shortcode_ui_load_textdomain() {
|
|
| 64 |
$locale = get_locale();
|
| 65 |
$domain = 'shortcode-ui';
|
| 66 |
$locale = apply_filters( 'plugin_locale', $locale, $domain );
|
| 67 |
-
$path
|
| 68 |
// Load the textdomain according to the plugin first
|
| 69 |
$mofile = $domain . '-' . $locale . '.mo';
|
| 70 |
$loaded = load_textdomain( $domain, $path . '/' . $mofile );
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
* Plugin Name: Shortcake (Shortcode UI)
|
| 4 |
+
* Version: 0.7.4
|
| 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.4' );
|
| 23 |
|
| 24 |
require_once dirname( __FILE__ ) . '/inc/class-shortcode-ui.php';
|
| 25 |
require_once dirname( __FILE__ ) . '/inc/fields/class-shortcode-ui-fields.php';
|
| 64 |
$locale = get_locale();
|
| 65 |
$domain = 'shortcode-ui';
|
| 66 |
$locale = apply_filters( 'plugin_locale', $locale, $domain );
|
| 67 |
+
$path = dirname( __FILE__ ) . '/languages';
|
| 68 |
// Load the textdomain according to the plugin first
|
| 69 |
$mofile = $domain . '-' . $locale . '.mo';
|
| 70 |
$loaded = load_textdomain( $domain, $path . '/' . $mofile );
|
