Prep Plugin for release on WordPress.org (#23)
* Update translation text domain * Escape everything that should be escaped. * Add nonce checks where needed. * Sanitize all inputs. * Apply Code style changes across the codebase. * Correct many deprecation notices. * Optimize load order of many filters. * Add Proper Build script * Use emojii flags * Fix i18n deprecation notice for translating too early * Put all scripts in footer and load async
This commit is contained in:
@ -23,7 +23,7 @@
|
||||
<tr class="no-items">
|
||||
<td :colspan="Object.keys(headers).length" class="colspanchange">
|
||||
<div class="wu-p-6 wu-text-gray-600 wu-text-base wu-text-center">
|
||||
<span><?php _e('Add the first field!', 'wp-ultimo'); ?></span>
|
||||
<span><?php esc_html_e('Add the first field!', 'wp-multisite-waas'); ?></span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -40,7 +40,7 @@
|
||||
|
||||
<tr v-for="(field, idx) in list" :key="field.id" :id="'wp-ultimo-field-' + field.id">
|
||||
|
||||
<td class="order column-order has-row-actions column-primary" data-colname="<?php _e('Order', 'wp-ultimo'); ?>">
|
||||
<td class="order column-order has-row-actions column-primary" data-colname="<?php esc_html_e('Order', 'wp-multisite-waas'); ?>">
|
||||
|
||||
<span
|
||||
class="wu-inline-block wu-bg-gray-100 wu-text-center wu-align-middle wu-p-1 wu-font-mono wu-px-3 wu-border wu-border-gray-300 wu-border-solid wu-rounded">
|
||||
@ -48,16 +48,16 @@
|
||||
</span>
|
||||
|
||||
<button type="button" class="toggle-row">
|
||||
<span class="screen-reader-text"><?php _e('Show more details', 'wp-ultimo'); ?></span>
|
||||
<span class="screen-reader-text"><?php esc_html_e('Show more details', 'wp-multisite-waas'); ?></span>
|
||||
</button>
|
||||
|
||||
</td>
|
||||
|
||||
<td class="name column-name" data-colname="<?php _e('Name', 'wp-ultimo'); ?>">
|
||||
<td class="name column-name" data-colname="<?php esc_html_e('Name', 'wp-multisite-waas'); ?>">
|
||||
|
||||
<span class="wu-inline-block wu-font-medium">
|
||||
|
||||
{{ field.name ? field.name : "<?php echo __('(no label)', 'wp-ultimo'); ?>" }}
|
||||
{{ field.name ? field.name : "<?php echo esc_html__('(no label)', 'wp-multisite-waas'); ?>" }}
|
||||
|
||||
<!-- Visibility -->
|
||||
<span
|
||||
@ -103,38 +103,38 @@
|
||||
<a
|
||||
v-show="delete_field_id !== field.id"
|
||||
v-on:click.prevent="delete_field_id = field.id"
|
||||
title="<?php _e('Delete'); ?>"
|
||||
title="<?php esc_html_e('Delete', 'wp-multisite-waas'); ?>"
|
||||
href="#"
|
||||
><?php _e('Delete'); ?></a>
|
||||
><?php esc_html_e('Delete', 'wp-multisite-waas'); ?></a>
|
||||
|
||||
<a
|
||||
v-show="delete_field_id === field.id"
|
||||
v-on:click.prevent="remove_field(field.id)"
|
||||
title="<?php _e('Delete'); ?>"
|
||||
title="<?php esc_html_e('Delete', 'wp-multisite-waas'); ?>"
|
||||
href="#"
|
||||
class="wu-font-bold"
|
||||
><?php _e('Confirm?', 'wp-ultimo'); ?></a>
|
||||
><?php esc_html_e('Confirm?', 'wp-multisite-waas'); ?></a>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<button type="button" class="toggle-row">
|
||||
<span class="screen-reader-text">
|
||||
<?php _e('Show more details', 'wp-ultimo'); ?>
|
||||
<?php esc_html_e('Show more details', 'wp-multisite-waas'); ?>
|
||||
</span>
|
||||
</button>
|
||||
|
||||
</td>
|
||||
|
||||
<td class="type column-type" data-colname="<?php _e('Type', 'wp-ultimo'); ?>">
|
||||
<td class="type column-type" data-colname="<?php esc_html_e('Type', 'wp-multisite-waas'); ?>">
|
||||
<span class="wu-bg-gray-200 wu-text-gray-700 wu-py-1 wu-px-2 wu-rounded-sm wu-text-xs wu-font-mono">{{ field.type }}</span>
|
||||
</td>
|
||||
|
||||
<td class="type column-slug" data-colname="<?php _e('Slug', 'wp-ultimo'); ?>">
|
||||
<td class="type column-slug" data-colname="<?php esc_html_e('Slug', 'wp-multisite-waas'); ?>">
|
||||
<span class="wu-bg-gray-200 wu-text-gray-700 wu-py-1 wu-px-2 wu-rounded-sm wu-text-xs wu-font-mono">{{ field.id }}</span>
|
||||
</td>
|
||||
|
||||
<td class="move column-move wu-text-right" data-colname="<?php _e('Move', 'wp-ultimo'); ?>">
|
||||
<td class="move column-move wu-text-right" data-colname="<?php esc_html_e('Move', 'wp-multisite-waas'); ?>">
|
||||
|
||||
<span class="wu-placeholder-sortable dashicons-wu-menu"></span>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
<span class="wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
|
||||
|
||||
<?php printf(__('%1$s steps and %2$s fields', 'wp-ultimo'), '{{ steps.length }}', '{{ field_count }}'); ?>
|
||||
<?php echo esc_html(sprintf(__('%1$s steps and %2$s fields', 'wp-multisite-waas'), '{{ steps.length }}', '{{ field_count }}')); ?>
|
||||
|
||||
</span>
|
||||
|
||||
@ -28,36 +28,27 @@
|
||||
|
||||
<li class="wu-m-0 wu-ml-4">
|
||||
<a
|
||||
title="<?php _e('Preview', 'wp-ultimo'); ?>"
|
||||
title="<?php esc_attr_e('Preview', 'wp-multisite-waas'); ?>"
|
||||
href="#"
|
||||
type="button"
|
||||
class="wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800"
|
||||
@click.prevent="get_preview()"
|
||||
>
|
||||
<span class="dashicons-wu-eye wu-align-middle"></span>
|
||||
<span v-show="!preview"><?php _e('Preview', 'wp-ultimo'); ?></span>
|
||||
<span v-cloak v-show="preview"><?php _e('Editor', 'wp-ultimo'); ?></span>
|
||||
<span v-show="!preview"><?php esc_html_e('Preview', 'wp-multisite-waas'); ?></span>
|
||||
<span v-cloak v-show="preview"><?php esc_html_e('Editor', 'wp-multisite-waas'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="wu-m-0 wu-ml-4" v-show="!preview">
|
||||
<a
|
||||
title="<?php _e('Add new Checkout Step', 'wp-ultimo'); ?>"
|
||||
href="
|
||||
<?php
|
||||
echo wu_get_form_url(
|
||||
'add_new_form_step',
|
||||
[
|
||||
'checkout_form' => $checkout_form,
|
||||
]
|
||||
);
|
||||
?>
|
||||
"
|
||||
title="<?php esc_attr_e('Add new Checkout Step', 'wp-multisite-waas'); ?>"
|
||||
href="<?php echo esc_url(wu_get_form_url('add_new_form_step', array('checkout_form' => $checkout_form))); ?>"
|
||||
type="button"
|
||||
class="wubox wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800"
|
||||
>
|
||||
<span class="dashicons-wu-circle-with-plus wu-align-middle"></span>
|
||||
<?php _e('Add new Checkout Step', 'wp-ultimo'); ?>
|
||||
<?php esc_html_e('Add new Checkout Step', 'wp-multisite-waas'); ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@ -100,7 +91,7 @@
|
||||
<div class="postbox-header">
|
||||
<h2 class="hndle ui-sortable-handle">
|
||||
<span class="wu-text-gray-700 ">
|
||||
<span class="wu-text-2xs wu-font-mono wu-uppercase wu-mr-4"><?php printf(__('Step %s', 'wp-ultimo'), '{{ idx + 1 }}'); ?></span> {{ step.name }}
|
||||
<span class="wu-text-2xs wu-font-mono wu-uppercase wu-mr-4"><?php printf(esc_html__('Step %s', 'wp-multisite-waas'), '{{ idx + 1 }}'); ?></span> {{ step.name }}
|
||||
</span>
|
||||
</h2>
|
||||
</div>
|
||||
@ -113,11 +104,11 @@
|
||||
<span class="dashicons-wu-eye wu-mr-1 wu-align-middle"></span>
|
||||
|
||||
<span v-if="step.logged == 'guests_only'">
|
||||
<?php _e('This step is only visible for <strong>guests</strong>', 'wp-ultimo'); ?>
|
||||
<?php echo wp_kses_post(__('This step is only visible for <strong>guests</strong>', 'wp-multisite-waas')); ?>
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
<?php _e('This step is only visible for <strong>logged-in users</strong>', 'wp-ultimo'); ?>
|
||||
<?php echo wp_kses_post(__('This step is only visible for <strong>logged-in users</strong>', 'wp-multisite-waas')); ?>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
@ -147,28 +138,28 @@
|
||||
<a
|
||||
v-show="delete_step_id !== step.id"
|
||||
v-on:click.prevent="delete_step_id = step.id"
|
||||
title="<?php _e('Delete'); ?>"
|
||||
title="<?php esc_html_e('Delete', 'wp-multisite-waas'); ?>"
|
||||
href="#"
|
||||
class="wu-text-red-500 wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-p-4 md:wu-p-0 wu-inline-block"
|
||||
>
|
||||
<?php _e('Delete Step'); ?>
|
||||
<?php esc_html_e('Delete Step', 'wp-multisite-waas'); ?>
|
||||
</a>
|
||||
|
||||
<a
|
||||
v-show="delete_step_id === step.id"
|
||||
v-on:click.prevent="remove_step(step.id)"
|
||||
title="<?php _e('Delete'); ?>"
|
||||
title="<?php esc_html_e('Delete', 'wp-multisite-waas'); ?>"
|
||||
href="#"
|
||||
class="wu-text-red-700 wu-uppercase wu-text-2xs wu-font-bold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-p-4 md:wu-p-0 wu-inline-block"
|
||||
>
|
||||
<?php _e('Confirm?', 'wp-ultimo'); ?>
|
||||
<?php esc_html_e('Confirm?', 'wp-multisite-waas'); ?>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="wu-m-0 md:wu-ml-4 wu-text-center">
|
||||
|
||||
<a title="<?php _e('Edit Section', 'wp-ultimo'); ?>"
|
||||
<a title="<?php esc_html_e('Edit Section', 'wp-multisite-waas'); ?>"
|
||||
:href="'
|
||||
<?php
|
||||
echo wu_get_form_url(
|
||||
@ -183,14 +174,14 @@
|
||||
type="button"
|
||||
class="wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800 wubox wu-p-4 md:wu-p-0 wu-inline-block"
|
||||
>
|
||||
<?php _e('Edit Section', 'wp-ultimo'); ?>
|
||||
<?php esc_html_e('Edit Section', 'wp-multisite-waas'); ?>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="wu-m-0 md:wu-ml-4 wu-text-center">
|
||||
|
||||
<a title="<?php _e('Add new Field', 'wp-ultimo'); ?>"
|
||||
<a title="<?php esc_html_e('Add new Field', 'wp-multisite-waas'); ?>"
|
||||
:href="'
|
||||
<?php
|
||||
echo wu_get_form_url(
|
||||
@ -205,7 +196,7 @@
|
||||
=' + step.id"
|
||||
type="button" class="wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800 wubox wu-p-4 md:wu-p-0 wu-inline-block">
|
||||
<span class="dashicons-wu-circle-with-plus wu-align-text-bottom"></span>
|
||||
<?php _e('Add new Field', 'wp-ultimo'); ?>
|
||||
<?php esc_html_e('Add new Field', 'wp-multisite-waas'); ?>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
@ -227,11 +218,11 @@
|
||||
<div v-show="!loading_preview && !preview_error" class="wu-text-center wu-mt-3">
|
||||
|
||||
<a @click.prevent="get_preview('user')" href="#" class="wu-m-2 wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800">
|
||||
<?php _e('See as existing user', 'wp-ultimo'); ?>
|
||||
<?php esc_html_e('See as existing user', 'wp-multisite-waas'); ?>
|
||||
</a>
|
||||
|
||||
<a @click.prevent="get_preview('visitor')" href="#" class="wu-m-2 wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800">
|
||||
<?php _e('See as visitor', 'wp-ultimo'); ?>
|
||||
<?php esc_html_e('See as visitor', 'wp-multisite-waas'); ?>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
@ -240,7 +231,7 @@
|
||||
<div v-show="loading_preview" class="wu-block wu-p-4 wu-py-8 wu-bg-white wu-text-center wu-my-4 wu-border wu-border-solid wu-rounded wu-border-gray-400">
|
||||
|
||||
<span class="wu-blinking-animation wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
|
||||
<?php _e('Loading Preview...', 'wp-ultimo'); ?>
|
||||
<?php esc_html_e('Loading Preview...', 'wp-multisite-waas'); ?>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
@ -250,7 +241,7 @@
|
||||
<div v-show="preview_error" class="wu-block wu-p-4 wu-py-8 wu-bg-white wu-text-center wu-my-4 wu-border wu-border-solid wu-rounded wu-border-gray-400">
|
||||
|
||||
<span class="wu-text-red-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
|
||||
<?php _e('Something wrong happened along the way =(', 'wp-ultimo'); ?>
|
||||
<?php esc_html_e('Something wrong happened along the way =(', 'wp-multisite-waas'); ?>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
@ -261,7 +252,7 @@
|
||||
<div v-show="!loading_preview && !preview_error" id="wu-iframe-content" class="wu-w-full wu-relative">
|
||||
|
||||
<iframe id="wp-ultimo-checkout-preview" v-bind:src="iframe_preview_url" class="wu-w-full wu-h-full wu-m-0 wu-mt-4 wu-mb-2 wu-p-0 wu-overflow-hidden wu-border-radius wu-border wu-border-solid wu-rounded wu-border-gray-400">
|
||||
<?php _e('Your browser doesn\'t support iframes', 'wp-ultimo'); ?>
|
||||
<?php esc_html_e('Your browser doesn\'t support iframes', 'wp-multisite-waas'); ?>
|
||||
</iframe>
|
||||
|
||||
</div>
|
||||
@ -282,7 +273,7 @@
|
||||
|
||||
<span class="wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
|
||||
|
||||
<?php printf(__('%1$s steps and %2$s fields', 'wp-ultimo'), '{{ steps.length }}', '{{ field_count }}'); ?>
|
||||
<?php echo esc_html(sprintf(__('%1$s steps and %2$s fields', 'wp-multisite-waas'), '{{ steps.length }}', '{{ field_count }}')); ?>
|
||||
|
||||
</span>
|
||||
|
||||
@ -294,36 +285,27 @@
|
||||
|
||||
<li class="wu-m-0 wu-ml-4">
|
||||
<a
|
||||
title="<?php _e('Preview', 'wp-ultimo'); ?>"
|
||||
title="<?php esc_attr_e('Preview', 'wp-multisite-waas'); ?>"
|
||||
href="#"
|
||||
type="button"
|
||||
class="wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800"
|
||||
@click.prevent="get_preview('user')"
|
||||
>
|
||||
<span class="dashicons-wu-eye wu-align-middle"></span>
|
||||
<span v-show="!preview"><?php _e('Preview', 'wp-ultimo'); ?></span>
|
||||
<span v-cloak v-show="preview"><?php _e('Editor', 'wp-ultimo'); ?></span>
|
||||
<span v-show="!preview"><?php esc_html_e('Preview', 'wp-multisite-waas'); ?></span>
|
||||
<span v-cloak v-show="preview"><?php esc_html_e('Editor', 'wp-multisite-waas'); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="wu-m-0 wu-ml-4" v-show="!preview">
|
||||
<a
|
||||
title="<?php _e('Add new Checkout Step', 'wp-ultimo'); ?>"
|
||||
href="
|
||||
<?php
|
||||
echo wu_get_form_url(
|
||||
'add_new_form_step',
|
||||
[
|
||||
'checkout_form' => $checkout_form,
|
||||
]
|
||||
);
|
||||
?>
|
||||
"
|
||||
title="<?php esc_attr_e('Add new Checkout Step', 'wp-multisite-waas'); ?>"
|
||||
href="<?php echo esc_url(wu_get_form_url('add_new_form_step', array('checkout_form' => $checkout_form))); ?>"
|
||||
type="button"
|
||||
class="wubox wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800"
|
||||
>
|
||||
<span class="dashicons-wu-circle-with-plus wu-align-middle"></span>
|
||||
<?php _e('Add new Checkout Step', 'wp-ultimo'); ?>
|
||||
<?php esc_html_e('Add new Checkout Step', 'wp-multisite-waas'); ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
Reference in New Issue
Block a user