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:
David Stone
2025-04-14 11:36:46 -06:00
committed by GitHub
parent a31cfcb565
commit d88e50df38
1087 changed files with 12586 additions and 18535 deletions

View File

@ -4,6 +4,7 @@
*
* @since 2.0.0
*/
?>
<style>
@ -21,7 +22,7 @@
</style>
<a class="wu-fixed wu-inline-block wu-bottom-0 wu-left-1/2 wu-transform wu--translate-x-1/2 wu-bg-white wu-p-4 wu-rounded-full wu-shadow wu-m-4 wu-no-underline wu-z-10 wu-border-gray-300 wu-border-solid wu-border" href="<?php echo esc_attr(network_admin_url()); ?>">
<?php _e('&larr; Back to the Dashboard', 'wp-ultimo'); ?>
<?php esc_html_e('← Back to the Dashboard', 'wp-multisite-waas'); ?>
</a>
<div id="wp-ultimo-wrap" class="wrap wu-about-content">
@ -88,7 +89,7 @@
'arindo@wpultimo.com',
64,
'',
'Arindo Duque',
esc_attr('Arindo Duque'),
[
'class' => 'wu-rounded-full',
]
@ -111,7 +112,7 @@
'arindo' => [
'email' => 'arindo@wpultimo.com',
'signature' => 'arindo.png',
'name' => 'Arindo Duque',
'name' => esc_attr('Arindo Duque'),
'position' => 'Founder and CEO',
],
'allyson' => [
@ -165,14 +166,14 @@
$person['email'],
64,
'',
'Arindo Duque',
esc_attr('Arindo Duque'),
[
'class' => 'wu-rounded-full',
]
);
?>
<strong class="wu-text-base wu-block"><?php echo $person['name']; ?></strong>
<small class="wu-text-xs wu-block"><?php echo $person['position']; ?></small>
<strong class="wu-text-base wu-block"><?php echo esc_html($person['name']); ?></strong>
<small class="wu-text-xs wu-block"><?php echo esc_html($person['position']); ?></small>
</div>

View File

@ -13,7 +13,7 @@ foreach ($notices as $key => $notice) : ?>
<?php if (str_contains($notice['message'], '<p>')) : ?>
<?php echo $notice['message']; ?>
<?php echo wp_kses_post($notice['message']); ?>
<?php else : ?>
@ -21,7 +21,7 @@ foreach ($notices as $key => $notice) : ?>
<?php endif; ?>
<?php if (isset($notice['actions']) && ! empty($notice['actions'])) : ?>
<?php if ( ! empty($notice['actions'])) : ?>
<div class="wu-border wu-border-solid wu-border-gray-300 wu-border-r-0 wu-border-l-0 wu-border-b-0 wu-bg-gray-100 wu--ml-2 wu--mb-1 wu--mr-2 sm:wu--mr-7.5 sm:wu--ml-3 sm:wu--mb-px">
@ -30,7 +30,7 @@ foreach ($notices as $key => $notice) : ?>
<?php foreach ($notice['actions'] as $action) : ?>
<li class="wu-inline-block wu-p-0 wu-m-0 wu-flex-shrink">
<a class="wu-bg-white wu-uppercase wu-no-underline wu-font-bold wu-text-gray-600 hover:wu-text-gray-700 wu-text-xs wu-inline-block wu-px-4 wu-py-2 wu-border wu-border-solid wu-border-gray-300 wu-border-r-0 wu-border-t-0 wu-border-b-0 wu-transition-all wu-mr-px" title="<?php echo esc_attr($action['title']); ?>" href="<?php echo esc_attr($action['url']); ?>"><?php echo $action['title']; ?></a>
<a class="wu-bg-white wu-uppercase wu-no-underline wu-font-bold wu-text-gray-600 hover:wu-text-gray-700 wu-text-xs wu-inline-block wu-px-4 wu-py-2 wu-border wu-border-solid wu-border-gray-300 wu-border-r-0 wu-border-t-0 wu-border-b-0 wu-transition-all wu-mr-px" title="<?php echo esc_attr($action['title']); ?>" href="<?php echo esc_attr($action['url']); ?>"><?php echo wp_kses_post($action['title']); ?></a>
</li>
<?php endforeach; ?>
@ -41,7 +41,7 @@ foreach ($notices as $key => $notice) : ?>
<?php endif; ?>
<?php if (isset($notice['dismissible_key']) && $notice['dismissible_key']) : ?>
<?php if (! empty($notice['dismissible_key'])) : ?>
<input type='hidden' name='notice_id' value='<?php echo esc_attr($notice['dismissible_key']); ?>'>

View File

@ -3,9 +3,12 @@
* Actions field view.
*
* @since 2.0.0
/**
* @package MyPlugin
*/
?>
<li class="wu-bg-gray-100 <?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="wu-bg-gray-100 <?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php foreach ($field->actions as $action_slug => $action) : ?>
@ -13,21 +16,22 @@
<?php $action = new \WP_Ultimo\UI\Field($action_slug, $action); ?>
<button class="button <?php echo esc_attr($action->classes); ?>" id="action_button" data-action="<?php echo $action->action; ?>" data-object="<?php echo $action->object_id; ?>" value="<?php echo wp_create_nonce($action->action); ?>" <?php echo $field->get_html_attributes(); ?> >
<button class="button <?php echo esc_attr($action->classes); ?>" id="action_button" data-action="<?php echo esc_attr($action->action); ?>" data-object="<?php echo esc_attr($action->object_id); ?>" value="<?php echo esc_attr(wp_create_nonce($action->action)); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> >
<?php echo $action->title; ?>
<?php echo esc_html($action->title); ?>
<?php if ($action->tooltip) : ?>
<?php echo wu_tooltip($action->tooltip); ?>
<?php endif; ?>
<?php echo wu_tooltip($action->tooltip); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php endif; ?>
</button>
<span data-loading="wu_action_button_loading_<?php echo $action->object_id; ?>" id="wu_action_button_loading" class="wu-blinking-animation wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold wu-text-center wu-self-center wu-px-4 wu-py wu-mt-1 hidden" >
<span data-loading="wu_action_button_loading_<?php echo esc_attr($action->object_id); ?>" id="wu_action_button_loading" class="wu-blinking-animation wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold wu-text-center wu-self-center wu-px-4 wu-py wu-mt-1 hidden" >
<?php echo $action->loading_text; ?>
<?php echo esc_html($action->loading_text); ?>
</span>

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo($field->get_wrapper_html_attributes()); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-block wu-w-full">
@ -25,7 +25,7 @@
?>
<textarea id="field-<?php echo esc_attr($field->id); ?>" data-init="0" data-code-editor="<?php echo esc_attr($field->lang); ?>" class="form-control wu-w-full wu-my-1 <?php echo esc_attr($field->classes); ?>" name="<?php echo esc_attr($field->id); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" <?php echo $field->get_html_attributes(); ?>><?php echo esc_attr($field->value); ?></textarea>
<textarea id="field-<?php echo esc_attr($field->id); ?>" data-init="0" data-code-editor="<?php echo esc_attr($field->lang); ?>" class="form-control wu-w-full wu-my-1 <?php echo esc_attr($field->classes); ?>" name="<?php echo esc_attr($field->id); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>><?php echo esc_attr($field->value); ?></textarea>
<?php

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-block">
@ -27,7 +27,7 @@
<div class="wu-mt-2">
<color-picker class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="hidden" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>></color-picker>
<color-picker class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="hidden" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>></color-picker>
</div>

View File

@ -6,7 +6,7 @@
*/
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-block wu-w-full">
@ -28,11 +28,11 @@
<select class="wu_select_icon" name="<?php echo esc_attr($field->id); ?>">
<option value=""><?php echo __('No Icon', 'wp-ultimo'); ?></option>
<option value=""><?php echo esc_html__('No Icon', 'wp-multisite-waas'); ?></option>
<?php foreach (wu_get_icons_list() as $category_label => $category_array) : ?>
<optgroup label="<?php echo $category_label; ?>">
<optgroup label="<?php echo esc_attr($category_label); ?>">
<?php foreach ($category_array as $option_key => $option_value) : ?>
@ -40,7 +40,7 @@
value="<?php echo esc_attr($option_value); ?>"
<?php selected($field->value, $option_value); ?>
>
<?php echo $option_value; ?>
<?php echo esc_html($option_value); ?>
</option>
<?php endforeach; ?>

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-block wu-w-full <?php echo esc_attr($field->classes); ?>">
@ -50,7 +50,7 @@
<div class="wu-mt-2 wu-block wu-bg-gray-100 wu-rounded wu-border-solid wu-border-gray-400 wu-border-t wu-border-l wu-border-b wu-border-r wu-text-2xs wu-py-2 wu-p-2">
<?php echo $field->desc; ?>
<?php echo $field->desc; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>

View File

@ -5,17 +5,17 @@
* @since 2.0.0
*/
?>
<li class="wu-bg-gray-100 wu-py-4 <?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="wu-bg-gray-100 wu-py-4 <?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-block wu-w-full">
<h3 class="wu-my-1 wu-text-base wu-text-gray-800">
<?php echo $field->title; ?>
<?php echo $field->title; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php if ($field->tooltip) : ?>
<?php echo wu_tooltip($field->tooltip); ?>
<?php echo wu_tooltip($field->tooltip); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php endif; ?>
@ -25,7 +25,7 @@
<p class="wu-mt-1 wu-mb-0 wu-text-gray-700">
<?php echo $field->desc; ?>
<?php echo $field->desc; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</p>

View File

@ -7,6 +7,6 @@
?>
<li class="wu-hidden wu-m-0">
<input class="form-control wu-w-full" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input class="form-control wu-w-full" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
</li>

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-block wu-w-full">
@ -39,7 +39,7 @@
<div class="wu-block wu-w-full wu-mt-4 <?php echo esc_attr($field->classes); ?>">
<?php echo $field->content; ?>
<?php echo $field->content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>

View File

@ -20,11 +20,11 @@ $content_wrapper_classes = $field->content_wrapper_classes
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="<?php echo $mq; ?>md:wu-flex wu-items-center wu-w-full">
<div class="<?php echo esc_attr($mq); ?>md:wu-flex wu-items-center wu-w-full">
<div class="<?php echo $mq; ?>md:wu-w-10/12">
<div class="<?php echo esc_attr($mq); ?>md:wu-w-10/12">
<?php
@ -42,7 +42,7 @@ $content_wrapper_classes = $field->content_wrapper_classes
?>
<div class="<?php echo $mq; ?>md:wu-w-9/12">
<div class="<?php echo esc_attr($mq); ?>md:wu-w-9/12">
<?php
@ -70,24 +70,24 @@ $content_wrapper_classes = $field->content_wrapper_classes
<div class="wu-relative wu-w-full wu-overflow-hidden">
<div class="wu-self-center wu-rounded wu-flex <?php echo $mq; ?>md:wu-max-w-full wu-min-w-full <?php echo $mq; ?>md:wu-max-h-20 wu-overflow-hidden">
<div class="wu-self-center wu-rounded wu-flex <?php echo esc_attr($mq); ?>md:wu-max-w-full wu-min-w-full <?php echo esc_attr($mq); ?>md:wu-max-h-20 wu-overflow-hidden">
<img
class="<?php echo $field->img ? '' : 'wu-absolute'; ?> wu-self-center wu-rounded sm:wu-max-w-full wu-min-w-full"
src="<?php echo $field->img; ?>"
src="<?php echo esc_url($field->img); ?>"
>
</div>
<div class="wu-wrapper-image-field-upload-actions wu-absolute wu-top-4 wu-right-4 <?php echo $mq; ?>md:wu-top-2 <?php echo $mq; ?>md:wu-right-2 wu-scale-150 <?php echo $mq; ?>md:wu-scale-100">
<div class="wu-wrapper-image-field-upload-actions wu-absolute wu-top-4 wu-right-4 <?php echo esc_attr($mq); ?>md:wu-top-2 <?php echo esc_attr($mq); ?>md:wu-right-2 wu-scale-150 <?php echo esc_attr($mq); ?>md:wu-scale-100">
<a title="<?php _e('Preview Image', 'wp-ultimo'); ?>" href="<?php echo $field->img; ?>" class="wubox wu-no-underline wu-text-center wu-inline-block wu-bg-black wu-opacity-60 wu-rounded-full wu-text-white wu-w-5 wu-h-5 wu-shadow-sm">
<a title="<?php esc_attr_e('Preview Image', 'wp-multisite-waas'); ?>" href="<?php echo esc_url($field->img); ?>" class="wubox wu-no-underline wu-text-center wu-inline-block wu-bg-black wu-opacity-60 wu-rounded-full wu-text-white wu-w-5 wu-h-5 wu-shadow-sm">
<span class="dashicons-wu-eye1 wu-align-middle" style="top: -2px;"></span>
</a>
<a title="<?php _e('Remove Image', 'wp-ultimo'); ?>" href="#" class="wu-remove-image wu-no-underline wu-text-center wu-inline-block wu-bg-black wu-opacity-60 wu-rounded-full wu-text-white wu-w-5 wu-h-5 wu-shadow-sm">
<a title="<?php esc_attr_e('Remove Image', 'wp-multisite-waas'); ?>" href="#" class="wu-remove-image wu-no-underline wu-text-center wu-inline-block wu-bg-black wu-opacity-60 wu-rounded-full wu-text-white wu-w-5 wu-h-5 wu-shadow-sm">
<span class="dashicons-wu-cross wu-align-middle"></span>
@ -97,13 +97,13 @@ $content_wrapper_classes = $field->content_wrapper_classes
</div>
<input name="<?php echo esc_attr($field_slug); ?>" type="hidden" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?> />
<input name="<?php echo esc_attr($field_slug); ?>" type="hidden" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> />
<div class="wu-add-image-wrapper <?php echo $mq; ?>md:wu-mt-0 wu-w-full" style="display: none;">
<div class="wu-add-image-wrapper <?php echo esc_attr($mq); ?>md:wu-mt-0 wu-w-full" style="display: none;">
<a class="button wu-w-full wu-text-center wu-add-image">
<span class="dashicons-wu-upload"></span> <?php _e('Upload Image', 'wp-ultimo'); ?>
<span class="dashicons-wu-upload"></span> <?php esc_html_e('Upload Image', 'wp-multisite-waas'); ?>
</a>

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-block wu-w-full">
@ -25,9 +25,9 @@
?>
<a class="form-control <?php echo esc_attr($field->classes); ?>" type="<?php echo esc_attr($field->type); ?>" <?php echo $field->get_html_attributes(); ?>>
<a class="form-control <?php echo esc_attr($field->classes); ?>" type="<?php echo esc_attr($field->type); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php echo $field->display_value; ?>
<?php echo esc_html($field->display_value); ?>
</a>

View File

@ -7,7 +7,7 @@
?>
<li
class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>"
<?php echo $field->get_wrapper_html_attributes(); ?>
<?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
>
<div class="wu-w-full">
@ -52,7 +52,7 @@
<span class="wu-my-1 wu-text-xs wu-font-bold wu-block">
<?php echo $option['title']; ?>
<?php echo esc_html($option['title']); ?>
</span>
@ -60,7 +60,7 @@
<span class="wu-my-1 wu-inline-block wu-text-xs">
<?php echo $option['desc']; ?>
<?php echo esc_html($option['desc']); ?>
</span>
@ -72,7 +72,7 @@
<div class="wu-toggle">
<input <?php checked(in_array($value, (array) $field->value, true)); ?> value="<?php echo esc_attr($value); ?>" id="<?php echo esc_attr("{$field->id}_{$value}"); ?>" type="checkbox" name="<?php echo esc_attr("{$field->id}[]"); ?>" class="wu-tgl wu-tgl-ios" <?php echo $field->get_html_attributes(); ?>>
<input <?php checked(in_array($value, (array) $field->value, true)); ?> value="<?php echo esc_attr($value); ?>" id="<?php echo esc_attr("{$field->id}_{$value}"); ?>" type="checkbox" name="<?php echo esc_attr("{$field->id}[]"); ?>" class="wu-tgl wu-tgl-ios" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<label for="<?php echo esc_attr("{$field->id}_{$value}"); ?>" class="wu-tgl-btn wp-ui-highlight"></label>

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php
@ -25,7 +25,7 @@
<div class="<?php echo esc_attr('wu-my-0 ' . $field->classes); ?>">
<?php echo $field->desc; ?>
<?php echo $field->desc; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>

View File

@ -9,7 +9,7 @@
<?php if ( $field->title ) : ?>
<li id=""
class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-w-full wu-block">
@ -81,7 +81,7 @@ if (is_array($field->values)) {
++$position;
?>
<li id="<?php echo esc_attr($field_id); ?>-line"
class="field-repeater wu-bg-gray-100 <?php echo esc_attr($field->wrapper_classes); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
class="field-repeater wu-bg-gray-100 <?php echo esc_attr($field->wrapper_classes); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-w-full <?php echo esc_attr($field->classes); ?>">
<?php
foreach ($value as $field_name => $field_value) {
@ -105,7 +105,7 @@ if (is_array($field->values)) {
} else {
?>
<li id="<?php echo esc_attr($field->id); ?>-line"
class="field-repeater wu-bg-gray-100 <?php echo esc_attr($field->wrapper_classes); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
class="field-repeater wu-bg-gray-100 <?php echo esc_attr($field->wrapper_classes); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-w-full <?php echo esc_attr($field->classes); ?>">
@ -135,11 +135,11 @@ if (is_array($field->values)) {
?>
<li class="<?php echo esc_attr($field->wrapper_classes); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr($field->wrapper_classes); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<a class="button wu-w-full wu-text-center" href="#"
v-on:click.prevent="duplicate_and_clean($event, '.field-repeater')">
<?php esc_html_e('Add new Line', 'wp-ultimo'); ?>
<?php esc_html_e('Add new Line', 'wp-multisite-waas'); ?>
</a>
</li>

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-block wu-w-full">
@ -59,15 +59,15 @@
<label class="wu-w-full wu-relative wu-rounded wu-p-1 wu-border-solid wu-border wu-flex wu-items-center wu-justify-center wu-bg-gray-100 wu-text-gray-600 wu-border-gray-300" v-bind:class="require('<?php echo esc_attr($field->id); ?>', '<?php echo esc_attr($option_value); ?>') ? 'wu-bg-gray-200 wu-text-gray-700 wu-border-gray-400 selected' : '' " for="<?php echo esc_attr($field->id . '-' . $option_value); ?>">
<div class="wu-text-center" <?php echo wu_tooltip_text($option['tooltip']); ?>>
<div class="wu-text-center" <?php echo wu_tooltip_text($option['tooltip']); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<span class="wu-block wu-text-2xl wu-mb-2 <?php echo esc_attr($option['icon']); ?>"></span>
<input class="wu-w-0 wu-h-0 wu-hidden" id="<?php echo esc_attr($field->id . '-' . $option_value); ?>" type="radio" <?php checked($option_value, $field->value); ?> value="<?php echo esc_attr($option_value); ?>" name="<?php echo esc_attr($field->id); ?>" <?php echo $field->get_html_attributes(); ?>>
<input class="wu-w-0 wu-h-0 wu-hidden" id="<?php echo esc_attr($field->id . '-' . $option_value); ?>" type="radio" <?php checked($option_value, $field->value); ?> value="<?php echo esc_attr($option_value); ?>" name="<?php echo esc_attr($field->id); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<span class="wu-uppercase wu-text-2xs wu-font-semibold">
<?php echo $option['title']; ?>
<?php echo esc_html($option['title']); ?>
</span>

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-block wu-w-full">
@ -25,13 +25,13 @@
?>
<select class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?><?php echo isset($field->html_attr['multiple']) && $field->html_attr['multiple'] ? '[]' : ''; ?>" <?php echo $field->get_html_attributes(); ?> placeholder="<?php echo $field->placeholder; ?>">
<select class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?><?php echo isset($field->html_attr['multiple']) && $field->html_attr['multiple'] ? '[]' : ''; ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> placeholder="<?php echo esc_attr($field->placeholder); ?>">
<?php foreach ($field->options as $option_value => $option_label) : ?>
<option <?php selected($field->value === $option_value || (is_array($field->value) && in_array($option_value, $field->value))); ?> value="<?php echo esc_attr($option_value); ?>">
<option <?php selected($field->value === $option_value || (is_array($field->value) && in_array($option_value, $field->value, true))); ?> value="<?php echo esc_attr($option_value); ?>">
<?php echo $option_label; ?>
<?php echo esc_html($option_label); ?>
</option>
@ -39,7 +39,17 @@
<?php if ($field->options_template) : ?>
<?php echo $field->options_template; ?>
<?php
echo wp_kses(
$field->options_template,
array(
'option' => array(
'value' => array(),
'selected' => array(),
),
)
);
?>
<?php endif; ?>

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-block">
@ -27,7 +27,7 @@
<?php if ($field->desc) : ?>
<span class="wu-my-1 wu-inline-block wu-text-xs"><?php echo $field->desc; ?></span>
<span class="wu-my-1 wu-inline-block wu-text-xs"><?php echo $field->desc; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></span>
<?php endif; ?>

View File

@ -5,11 +5,11 @@
* @since 2.0.0
*/
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes) . (! str_contains($field->wrapper_classes, '-bg-') ? ' wu-bg-gray-200' : '')); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes) . (! str_contains($field->wrapper_classes, '-bg-') ? ' wu-bg-gray-200' : '')); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<button id="<?php echo esc_attr($field->id); ?>" type="submit" name="submit_button" value="<?php echo esc_attr($field->id); ?>" <?php echo $field->get_html_attributes(); ?> class="<?php echo esc_attr(trim($field->classes)); ?>">
<button id="<?php echo esc_attr($field->id); ?>" type="submit" name="submit_button" value="<?php echo esc_attr($field->id); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> class="<?php echo esc_attr(trim($field->classes)); ?>">
<?php echo $field->title; ?>
<?php echo esc_html($field->title); ?>
</button>

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?> wu-bg-gray-200" style="margin-bottom: -1px;" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?> wu-bg-gray-200" style="margin-bottom: -1px;" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu--m-4 wu-px-1">
@ -16,9 +16,9 @@
v-bind:class="'<?php echo esc_attr($option_value); ?>' == <?php echo esc_attr($field->id); ?> ? 'wu-bg-white wu-text-gray-600 wu-border-gray-300' : ''"
>
<?php echo $option_label; ?>
<?php echo esc_html($option_label); ?>
<input class="wu-w-0 wu-h-0 wu-overflow-hidden wu-hidden" type="radio" name="<?php echo esc_attr($field->id); ?>" value="<?php echo esc_attr($option_value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input class="wu-w-0 wu-h-0 wu-overflow-hidden wu-hidden" type="radio" name="<?php echo esc_attr($field->id); ?>" value="<?php echo esc_attr($option_value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
</label>

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-block">
@ -36,12 +36,12 @@
$formatted_value = date_i18n(get_option('date_format'), $time);
$placeholder = wu_get_current_time('timestamp') > $time ? __('%s ago', 'wp-ultimo') : __('In %s', 'wp-ultimo'); // phpcs:ignore
$placeholder = wu_get_current_time('timestamp') > $time ? esc_html__('%s ago', 'wp-multisite-waas') : esc_html__('In %s', 'wp-multisite-waas'); // phpcs:ignore
printf('<time datetime="%3$s">%1$s</time><br><small>%2$s</small>', $formatted_value, sprintf($placeholder, human_time_diff($time, wu_get_current_time('timestamp'))), get_date_from_gmt($date));
printf('<time datetime="%3$s">%1$s</time><br><small>%2$s</small>', esc_html($formatted_value), esc_html(sprintf($placeholder, human_time_diff($time, wu_get_current_time('timestamp')))), esc_attr(get_date_from_gmt($date)));
} else {
_e('None', 'wp-ultimo');
} // end if;
esc_html_e('None', 'wp-multisite-waas');
}
?>
@ -49,11 +49,11 @@
<span class="wu-my-1 wu-inline-block">
<span id="<?php echo $field->id; ?>_value"><?php echo $field->display_value; ?></span>
<span id="<?php echo esc_attr($field->id); ?>_value"><?php echo $field->display_value; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></span>
<?php if ($field->copy) : ?>
<a <?php echo wu_tooltip_text(__('Copy', 'wp-ultimo')); ?> class="wu-no-underline wp-ui-text-highlight wu-copy" data-clipboard-action="copy" data-clipboard-target="#<?php echo $field->id; ?>_value">
<a <?php echo wu_tooltip_text(esc_html__('Copy', 'wp-multisite-waas')); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> class="wu-no-underline wp-ui-text-highlight wu-copy" data-clipboard-action="copy" data-clipboard-target="#<?php echo esc_attr($field->id); ?>_value">
<span class="dashicons-wu-copy wu-align-middle"></span>

View File

@ -30,8 +30,8 @@
<?php
if (wu_validate_date($field->value)) {
if (false == $field->display_value) {
echo __('No date', 'wp-ultimo');
if ( ! $field->display_value) {
esc_html_e('No date', 'wp-multisite-waas');
} else {
$date = $field->value;
@ -39,13 +39,13 @@
$formatted_value = date_i18n(get_option('date_format'), $time);
$placeholder = wu_get_current_time('timestamp') > $time ? __('%s ago', 'wp-ultimo') : __('In %s', 'wp-ultimo'); // phpcs:ignore
printf('<time datetime="%3$s">%1$s</time><br><small>%2$s</small>', $formatted_value, sprintf($placeholder, human_time_diff($time, wu_get_current_time('timestamp'))), get_date_from_gmt($date));
} // end if;
// translators: %s a unit of time.
$placeholder = wu_get_current_time('timestamp') > $time ? __('%s ago', 'wp-multisite-waas') : __('In %s', 'wp-multisite-waas');
printf('<time datetime="%3$s">%1$s</time><br><small>%2$s</small>', esc_html($formatted_value), esc_html(sprintf($placeholder, human_time_diff($time, wu_get_current_time('timestamp')))), esc_html(get_date_from_gmt($date)));
}
} else {
_e('None', 'wp-ultimo');
} // end if;
esc_html_e('None', 'wp-multisite-waas');
}
?>
@ -53,7 +53,7 @@
<span class="wu-my-1 wu-inline-block">
<?php echo $field->display_value; ?>
<?php echo $field->display_value; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</span>
@ -65,7 +65,7 @@
<div class="wu-block" v-show="!edit">
<a href="#" class="wu-p-2 wu--m-2 wp-ui-text-highlight" v-on:click="open($event)" data-field="<?php echo esc_attr($field_slug); ?>">
<?php echo wu_tooltip(__('Edit'), 'dashicons-edit'); ?>
<?php echo wu_tooltip(__('Edit'), 'dashicons-edit'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</a>
</div>
@ -87,7 +87,7 @@
?>
<input class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="text" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="text" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php
@ -113,7 +113,7 @@
<div class="wu-block" v-show="!edit">
<a href="#" class="wu-p-2 wu--m-2" v-on:click="edit($event, '<?php echo esc_js($field_slug); ?>')" data-field="<?php echo esc_attr($field_slug); ?>">
<?php echo wu_tooltip(__('Copy'), 'dashicons-admin-page'); ?>
<?php echo wu_tooltip(__('Copy'), 'dashicons-admin-page'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</a>
</div>

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-block wu-w-full">
@ -30,18 +30,18 @@
<div class="wu-flex">
<div class="wu-w-full wu-my-1">
<input class="form-control wu-w-full" name="<?php echo esc_attr($field->id); ?>" type="text" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input class="form-control wu-w-full" name="<?php echo esc_attr($field->id); ?>" type="text" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
</div>
<?php if (wu_get_isset($field->html_attr, 'data-base-link')) : ?>
<div class="wu-ml-1 wu-my-1" v-cloak>
<a
v-bind:href="'<?php echo wu_get_isset($field->html_attr, 'data-base-link'); ?>' + '=' + <?php echo wu_get_isset($field->html_attr, 'v-model'); ?>"
v-bind:href="'<?php echo esc_js(wu_get_isset($field->html_attr, 'data-base-link')); ?>' + '=' + <?php echo esc_js(wu_get_isset($field->html_attr, 'v-model')); ?>"
target="_blank"
class="button"
v-show='<?php echo wu_get_isset($field->html_attr, 'v-model'); ?>'
<?php echo wu_tooltip_text(__('View', 'wp-ultimo')); ?>
v-show='<?php echo esc_js(wu_get_isset($field->html_attr, 'v-model')); ?>'
<?php echo wu_tooltip_text(__('View', 'wp-multisite-waas')); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
>
<span class="dashicons-wu-popup wu-m-0 wu-p-0"></span>
</a>
@ -53,13 +53,13 @@
<?php elseif ($field->money) : ?>
<money class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>></money>
<money class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>></money>
<input class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?> v-if="false">
<input class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> v-if="false">
<?php else : ?>
<input class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php endif; ?>

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-block wu-w-full">
@ -25,7 +25,7 @@
?>
<textarea class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>" name="<?php echo esc_attr($field->id); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" <?php echo $field->get_html_attributes(); ?>><?php echo esc_attr($field->value); ?></textarea>
<textarea class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>" name="<?php echo esc_attr($field->id); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>><?php echo esc_attr($field->value); ?></textarea>
<?php

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-block">
@ -27,7 +27,7 @@
<?php if ($field->desc) : ?>
<span class="wu-my-1 wu-inline-block wu-text-xs"><?php echo $field->desc; ?></span>
<span class="wu-my-1 wu-inline-block wu-text-xs"><?php echo $field->desc; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></span>
<?php endif; ?>
@ -37,7 +37,7 @@
<div class="wu-toggle">
<input class="wu-tgl wu-tgl-ios" value="1" <?php checked(1 == $field->value); ?> id="wu-tg-<?php echo esc_attr($field->id); ?>" type="checkbox" name="<?php echo esc_attr($field_slug); ?>" <?php echo $field->get_html_attributes(); ?> />
<input class="wu-tgl wu-tgl-ios" value="1" <?php checked('1' === (string) $field->value); ?> id="wu-tg-<?php echo esc_attr($field->id); ?>" type="checkbox" name="<?php echo esc_attr($field_slug); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> />
<label class="wu-tgl-btn wp-ui-highlight wu-bg-blue-500" for="wu-tg-<?php echo esc_attr($field->id); ?>"></label>

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-block wu-w-full">
@ -35,7 +35,7 @@
name="<?php echo esc_attr($field->id); ?>"
id="<?php echo esc_attr($field->id); ?>"
value="<?php echo esc_html($field->value); ?>"
<?php echo $field->get_html_attributes(); ?>
<?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
/>
</div>

View File

@ -7,7 +7,7 @@
?>
<div class="wu-styling">
<?php echo $form->before; ?>
<?php echo $form->before; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<div class="wu-flex wu-flex-wrap">
@ -17,14 +17,14 @@
id="<?php echo esc_attr($form_slug); ?>"
action="<?php echo esc_attr($form->action); ?>"
method="<?php echo esc_attr($form->method); ?>"
<?php echo $form->get_html_attributes(); ?>
<?php echo $form->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
>
<?php endif; ?>
<ul id="wp-ultimo-form-<?php echo esc_attr($form->id); ?>" class="wu-flex-grow <?php echo esc_attr(trim($form->classes)); ?>" <?php echo $form->get_html_attributes(); ?>>
<ul id="wp-ultimo-form-<?php echo esc_attr($form->id); ?>" class="wu-flex-grow <?php echo esc_attr(trim($form->classes)); ?>" <?php echo $form->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php echo $rendered_fields; ?>
<?php echo $rendered_fields; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</ul>
@ -34,7 +34,7 @@
<?php endif; ?>
<?php echo $form->after; ?>
<?php echo $form->after; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>

View File

@ -8,9 +8,9 @@
<?php if ($field->desc) : ?>
<p class="description wu-text-2xs" id="<?php echo $field->id; ?>-desc">
<p class="description wu-text-2xs" id="<?php echo esc_attr($field->id); ?>-desc">
<?php echo $field->desc; ?>
<?php echo $field->desc; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</p>

View File

@ -10,11 +10,11 @@
<span class="wu-my-1 wu-text-2xs wu-uppercase wu-font-bold wu-block">
<?php echo $field->title; ?>
<?php echo $field->title; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php if ($field->tooltip) : ?>
<?php echo wu_tooltip($field->tooltip); ?>
<?php echo wu_tooltip($field->tooltip); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php endif; ?>

View File

@ -11,7 +11,7 @@
<h1 class="wp-heading-inline">
<?php echo $page_title; ?>
<?php echo esc_html($page_title); ?>
<?php
/**
@ -34,7 +34,7 @@
<?php endif; ?>
<?php echo $action_link['label']; ?>
<?php echo esc_html($action_link['label']); ?>
</a>
@ -52,10 +52,10 @@
</h1>
<?php if (isset($_GET['updated'])) : ?>
<?php if (isset($_GET['updated'])) : // phpcs:ignore WordPress.Security.NonceVerification ?>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php echo $labels['updated_message']; ?></p>
<p><?php echo esc_html($labels['updated_message']); ?></p>
</div>
<?php endif; ?>
@ -98,7 +98,7 @@
<h3 class="wu-m-0 wu-widget-title">
<?php _e('Change Membership', 'wp-ultimo'); ?>
<?php esc_html_e('Change Membership', 'wp-multisite-waas'); ?>
</h3>
@ -108,7 +108,7 @@
<div class="inside">
<?php echo $content; ?>
<?php echo $content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>

View File

@ -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>

View File

@ -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>

View File

@ -13,12 +13,14 @@
class="wu--mt-8 wu-py-8 wu-bg-gray-100 wu-bg-cover wu-bg-center"
style="opacity: 0.15; background-image: url(
<?php
echo get_avatar_url(
$item->get_user_id(),
[
'default' => 'identicon',
'size' => 320,
]
echo esc_url(
get_avatar_url(
$item->get_user_id(),
array(
'default' => 'identicon',
'size' => 320,
)
)
);
?>
)"
@ -43,21 +45,21 @@
<div class="wu-text-base wu-mt-1">
<div>
<span class="wu-font-semibold"><?php echo $item->get_display_name(); ?></span>
<small>#<?php echo $item->get_id(); ?></small>
<span class="wu-font-semibold"><?php echo esc_html($item->get_display_name()); ?></span>
<small>#<?php echo esc_html($item->get_id()); ?></small>
</div>
<div class="wu-text-xs wu-my-1">
<?php if ($item->get_email_address()) : ?>
<a class="wu-no-underline" href="mailto:<?php echo $item->get_email_address(); ?>">
<?php echo $item->get_email_address(); ?>
<a class="wu-no-underline" href="mailto:<?php echo esc_attr($item->get_email_address()); ?>">
<?php echo esc_html($item->get_email_address()); ?>
</a>
<?php else : ?>
<?php _e('No email address', 'wp-ultimo'); ?>
<?php esc_html_e('No email address', 'wp-multisite-waas'); ?>
<?php endif; ?>
</div>
<div class="wu-text-xs">
<span class="<?php echo $item->is_vip() ? esc_attr('wu-font-semibold') : ''; ?>">
<?php echo $item->is_vip() ? __('VIP Customer', 'wp-ultimo') : __('Regular Customer', 'wp-ultimo'); ?>
<?php echo $item->is_vip() ? __('VIP Customer', 'wp-multisite-waas') : __('Regular Customer', 'wp-multisite-waas'); ?>
</span>
</div>
</div>
@ -66,32 +68,32 @@
<div class="wu-flex wu-justify-between wu-border-0 wu-border-t wu-border-solid wu-border-gray-300 wu-py-2 wu-px-3">
<span>
<?php _e('Last Login:', 'wp-ultimo'); ?>
<?php esc_html_e('Last Login:', 'wp-multisite-waas'); ?>
</span>
<span class="wu-font-semibold">
<?php
if ($item->is_online()) {
echo '<span class="wu-inline-block wu-mr-1 wu-rounded-full wu-h-2 wu-w-2 wu-bg-green-500"></span>' . __('Online', 'wp-ultimo');
echo '<span class="wu-inline-block wu-mr-1 wu-rounded-full wu-h-2 wu-w-2 wu-bg-green-500"></span>' . __('Online', 'wp-multisite-waas');
} elseif ( '0000-00-00 00:00:00' !== $item->get_last_login() ) {
echo human_time_diff(strtotime($item->get_last_login()), time()) . ' ' . __('ago', 'wp-ultimo');
echo human_time_diff(strtotime($item->get_last_login()), time()) . ' ' . __('ago', 'wp-multisite-waas');
} else {
_e('Never logged in', 'wp-ultimo');
_e('Never logged in', 'wp-multisite-waas');
}
?>
</span>
</div>
<div class="wu-flex wu-justify-between wu-border-0 wu-border-t wu-border-solid wu-border-gray-300 wu-py-2 wu-px-3">
<span>
<?php _e('Customer Since:', 'wp-ultimo'); ?>
<?php esc_html_e('Customer Since:', 'wp-multisite-waas'); ?>
</span>
<span class="wu-font-semibold">
<?php echo human_time_diff(strtotime($item->get_date_registered()), time()) . ' ' . __('ago', 'wp-ultimo'); ?>
<?php echo human_time_diff(strtotime($item->get_date_registered()), time()) . ' ' . __('ago', 'wp-multisite-waas'); ?>
</span>
</div>
<div class="wu-flex wu-justify-between wu-border-0 wu-border-gray-300 wu-border-t wu-border-b-0 wu-border-solid wu-py-2 wu-px-3">
<span>
<?php _e('Memberships:', 'wp-ultimo'); ?>
<?php esc_html_e('Memberships:', 'wp-multisite-waas'); ?>
</span>
<div>
<span class="wu-font-semibold">
@ -102,7 +104,7 @@
if ( ! empty($item->get_memberships())) {
?>
<a href="<?php echo wu_network_admin_url('wp-ultimo-memberships', ['customer_id' => $item->get_id()]); ?>">
<?php _e('View', 'wp-ultimo'); ?>
<?php esc_html_e('View', 'wp-multisite-waas'); ?>
</a>
<?php
}
@ -113,7 +115,7 @@
<div class="wu-flex wu-justify-between wu-border-0 wu-border-gray-300 wu-border-t wu-border-b-0 wu-border-solid wu-py-2 wu-px-3">
<span>
<?php _e('Actions:', 'wp-ultimo'); ?>
<?php esc_html_e('Actions:', 'wp-multisite-waas'); ?>
</span>
<div>
@ -122,10 +124,10 @@
// Concatenate switch to url
$is_modal_switch_to = \WP_Ultimo\User_Switching::get_instance()->check_user_switching_is_activated() ? '' : 'wubox';
$url_switch_to = sprintf('<a title="%s" class="%s" href="%s">%s</a>', __('Switch To', 'wp-ultimo'), $is_modal_switch_to, \WP_Ultimo\User_Switching::get_instance()->render($item->get_user_id()), __('Switch To', 'wp-ultimo'));
$url_switch_to = sprintf('<a title="%s" class="%s" href="%s">%s</a>', __('Switch To', 'wp-multisite-waas'), $is_modal_switch_to, \WP_Ultimo\User_Switching::get_instance()->render($item->get_user_id()), __('Switch To', 'wp-multisite-waas'));
$actions = [
'switch-to' => $item->get_user_id() !== get_current_user_id() ? $url_switch_to : __('None', 'wp-ultimo'),
'switch-to' => $item->get_user_id() !== get_current_user_id() ? $url_switch_to : __('None', 'wp-multisite-waas'),
];
echo implode('<br />', $actions);
@ -141,11 +143,11 @@
<label>
<input class="wu-rounded-none" type="checkbox" name="bulk-delete[]" value="<?php echo $item->get_id(); ?>" />
<?php _e('Select Customer', 'wp-ultimo'); ?>
<?php esc_html_e('Select Customer', 'wp-multisite-waas'); ?>
</label>
<a href="<?php echo wu_network_admin_url('wp-ultimo-edit-customer', ['id' => $item->get_id()]); ?>" class="button button-primary">
<?php _e('Manage', 'wp-ultimo'); ?>
<?php esc_html_e('Manage', 'wp-multisite-waas'); ?>
</a>
</div>
</div>

View File

@ -6,10 +6,9 @@
*/
?>
<div id="wp-ultimo-wrap" class="<?php wu_wrap_use_container(); ?> wrap wu-styling">
<h1 class="wp-heading-inline">
<?php echo $page_title; ?>
<?php echo esc_html($page_title); ?>
<?php
/**
@ -32,7 +31,7 @@
<?php endif; ?>
<?php echo $action_link['label']; ?>
<?php echo esc_html($action_link['label']); ?>
</a>
@ -49,11 +48,8 @@
?>
</h1>
<hr class="wp-header-end">
<?php do_action('wu_dash_before_metaboxes', $page); ?>
<?php if (apply_filters('wu_dashboard_display_widgets', true)) : ?>
<div id="dashboard-widgets-wrap">

View File

@ -8,81 +8,46 @@
<div id="wp-ultimo-wrap" class="<?php wu_wrap_use_container(); ?> wrap">
<h1 class="wp-heading-inline">
<?php echo esc_html($page->edit ? $labels['edit_label'] : $labels['add_new_label']); ?>
<?php echo $page->edit ? $labels['edit_label'] : $labels['add_new_label']; ?>
<?php
/**
* You can filter the get_title_link using wu_page_list_get_title_link, see class-wu-page-list.php
*
* @since 1.8.2
*/
foreach ($page->get_title_links() as $action_link) :
$action_classes = $action_link['classes'] ?? '';
$attrs = $action_link['attrs'] ?? '';
?>
<a title="<?php echo esc_attr($action_link['label']); ?>" href="<?php echo esc_url($action_link['url']); ?>" class="page-title-action <?php echo esc_attr($action_classes); ?>" <?php echo $attrs; ?>>
<?php if ($action_link['icon']) : ?>
<span class="dashicons dashicons-<?php echo esc_attr($action_link['icon']); ?> wu-text-sm wu-align-middle wu-h-4 wu-w-4">
&nbsp;
</span>
<?php endif; ?>
<?php echo $action_link['label']; ?>
</a>
<?php endforeach; ?>
<?php
/**
* Allow plugin developers to add additional buttons to edit pages
*
* @since 1.8.2
* @param object Object holding the information
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_edit_after_title', $object, $page);
?>
<?php foreach ($page->get_title_links() as $action_link) : ?>
<a title="<?php echo esc_attr($action_link['label']); ?>" href="<?php echo esc_url($action_link['url']); ?>" class="page-title-action <?php echo esc_attr($action_link['classes'] ?? ''); ?>" <?php echo esc_attr($action_link['attrs'] ?? ''); ?>>
<?php if ($action_link['icon']) : ?>
<span class="dashicons dashicons-<?php echo esc_attr($action_link['icon']); ?> wu-text-sm wu-align-middle wu-h-4 wu-w-4">&nbsp;</span>
<?php endif; ?>
<?php echo esc_html($action_link['label']); ?>
</a>
<?php endforeach; ?>
<?php do_action('wu_page_edit_after_title', $object, $page); ?>
</h1>
<?php if (isset($_GET['updated'])) : ?>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php echo $labels['updated_message']; ?></p>
</div>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php echo esc_html($labels['updated_message']); ?></p>
</div>
<?php endif; ?>
<?php if (isset($_GET['notice'])) : ?>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php echo $labels['updated_message']; ?></p>
</div>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php echo esc_html($labels['updated_message']); ?></p>
</div>
<?php endif; ?>
<?php
/**
* Allow plugin developers to add additional handlers to URL query redirects
*
* @since 2.0.0
*
* @param WP_Ultimo\Admin_Pages\Base_Admin_Page $page The page object.
*/
do_action('wu_page_edit_redirect_handlers', $page);
?>
<?php do_action('wu_page_edit_redirect_handlers', $page); ?>
<hr class="wp-header-end">
<form id="form-<?php echo esc_attr($page->get_id()); ?>" name="post" method="post" autocomplete="off">
<?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false); ?>
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?>
<?php wp_nonce_field(sprintf('saving_%s', $page->object_id), sprintf('saving_%s', $page->object_id), false); ?>
<?php wp_nonce_field(sprintf('saving_%s', $page->object_id), '_wpultimo_nonce'); ?>
<?php if ($page->edit) : ?>
<?php wp_nonce_field(sprintf('deleting_%s', $page->object_id), sprintf('deleting_%s', $page->object_id), false); ?>
<?php wp_nonce_field(sprintf('deleting_%s', $page->object_id), 'delete_wpultimo_nonce'); ?>
<input type="hidden" name="id" value="<?php echo esc_attr($object->get_id()); ?>">
<?php endif; ?>
<div id="poststuff">
@ -96,12 +61,12 @@
<div id="titlewrap">
<input placeholder="<?php echo $labels['title_placeholder']; ?>" type="text" name="name" size="30" value="<?php echo method_exists($object, 'get_name') ? esc_attr($object->get_name()) : ''; ?>" id="title" spellcheck="true" autocomplete="off">
<input placeholder="<?php echo esc_attr($labels['title_placeholder']); ?>" type="text" name="name" size="30" value="<?php echo method_exists($object, 'get_name') ? esc_attr($object->get_name()) : ''; ?>" id="title" spellcheck="true" autocomplete="off">
<?php if ( ! empty($labels['title_description'])) : ?>
<span class="wu-block wu-bg-gray-100 wu-rounded wu-border-solid wu-border-gray-400 wu-border-t-0 wu-border-l wu-border-b wu-border-r wu-text-xs wu-py-2 wu-p-2 wu-pt-3 wu--mt-2">
<?php echo $labels['title_description']; ?>
<?php echo esc_html($labels['title_description']); ?>
</span>
<?php endif; ?>
@ -231,7 +196,7 @@
<?php wp_nonce_field(sprintf('deleting_%s', $page->object_id), 'delete_wpultimo_nonce'); ?>
<input type="hidden" name="id" value="<?php echo $object->get_id(); ?>">
<input type="hidden" name="id" value="<?php echo esc_attr($object->get_id()); ?>">
<?php endif; ?>

View File

@ -11,8 +11,8 @@
<?php
echo wu_render_empty_state(
[
'message' => __('No notes yet.', 'wp-ultimo'),
'sub_message' => __('Use the "Add new Note" to create the first one.', 'wp-ultimo'),
'message' => __('No notes yet.', 'wp-multisite-waas'),
'sub_message' => __('Use the "Add new Note" to create the first one.', 'wp-multisite-waas'),
'link_url' => false,
'display_background_image' => false,
]
@ -51,7 +51,7 @@
)
);
?>
<?php echo $user->display_name; ?>
<?php echo esc_html($user->display_name); ?>
</div>
@ -77,7 +77,7 @@
<span class="wu-ml-2">
<a class="dashicons-wu-trash wu-p-0 wu-border-none wu-text-red-600 wu-button-delete wu-no-underline wubox" href="<?php echo esc_url(wu_get_form_url('delete_note', $modal_atts)); ?>"
title="<?php echo esc_attr__('Clear Note', 'wp-ultimo'); ?>"></a>
title="<?php echo esc_attr__('Clear Note', 'wp-multisite-waas'); ?>"></a>
</span>

View File

@ -13,7 +13,7 @@
<span class="wu-self-center wu-blinking-animation wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
<?php echo _e('Loading Preview...', 'wp-ultimo'); ?>
<?php esc_html_e('Loading Preview...', 'wp-multisite-waas'); ?>
</span>
@ -31,7 +31,7 @@
<span class="wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
<?php echo __('Template Preview', 'wp-ultimo'); ?>
<?php echo esc_html__('Template Preview', 'wp-multisite-waas'); ?>
</span>
@ -43,7 +43,7 @@
<div id="preview_content" class="wu-block wu-bg-gray wu-text-center wu-mb-5 wu-border wu-border-t-0 wu-border-solid wu-rounded wu-border-gray-400">
<iframe id="preview-stage-iframe" class="preview-stage-iframe" width="100%" style="height: <?php echo $preview_height; ?>;" frameborder="0" data-src="<?php echo esc_url($preview_iframe_url); ?>" src="<?php echo esc_url($preview_iframe_url); ?>"></iframe>
<iframe id="preview-stage-iframe" class="preview-stage-iframe" width="100%" style="height: <?php echo esc_attr($preview_height); ?>;" frameborder="0" data-src="<?php echo esc_url($preview_iframe_url); ?>" src="<?php echo esc_url($preview_iframe_url); ?>"></iframe>
</div>

View File

@ -28,7 +28,7 @@
<div class="wu-p-12 wu-h-12 wu--mt-1 wu--mx-3 wu--mb-3 wu-bg-gray-100 wu-text-gray-500 wu-text-xs wu-text-center">
<span class="dashicons dashicons-warning wu-h-8 wu-w-8 wu-mx-auto wu-text-center wu-text-4xl wu-block"></span>
<span class="wu-block wu-text-sm wu-mt-2">
<?php printf(__('%s will show up here once this item is saved.', 'wp-ultimo'), $title); ?>
<?php printf(esc_html__('%s will show up here once this item is saved.', 'wp-multisite-waas'), esc_html($title)); ?>
</span>
</div>

View File

@ -8,7 +8,7 @@
<?php if ( ! empty($labels['save_description'])) : ?>
<p class="wu-mb-5">
<?php echo $labels['save_description']; ?>
<?php echo wp_kses_post($labels['save_description']); ?>
</p>
<?php endif; ?>
@ -16,7 +16,7 @@
<div class="wu-bg-gray-200 wu-p-4 wu--m-3 wu--mt-2 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-400 wu-border-solid">
<button type="submit" name="action" value="save" class="button button-primary wu-w-full">
<?php echo $labels['save_button_label']; ?>
<?php echo esc_html($labels['save_button_label']); ?>
</button>
</div>

View File

@ -33,7 +33,7 @@
<span class="wu-text-base wu-w-4 wu-h-4 wu-pt-2px wu-mr-1 dashicons dashicons-wu-chevron-with-circle-down">&nbsp;</span>
<?php _e('All Options', 'wp-ultimo'); ?>
<?php esc_html_e('All Options', 'wp-multisite-waas'); ?>
</a>
<!-- End Menu Link -->
@ -63,7 +63,7 @@
<?php endif; ?>
<?php echo $section['title']; ?>
<?php echo esc_html($section['title']); ?>
</a>
<!-- End Menu Link -->
@ -79,13 +79,13 @@
<span v-show="!display_all">
<?php _e('Display all fields', 'wp-ultimo'); ?>
<?php esc_html_e('Display all fields', 'wp-multisite-waas'); ?>
</span>
<span v-cloak v-show="display_all">
<?php _e('Hide other fields', 'wp-ultimo'); ?>
<?php esc_html_e('Hide other fields', 'wp-multisite-waas'); ?>
</span>
@ -101,7 +101,7 @@
<span class="wu-blinking-animation">
<?php _e('Loading...', 'wp-ultimo'); ?>
<?php esc_html_e('Loading...', 'wp-multisite-waas'); ?>
</span>

View File

@ -5,57 +5,34 @@
* @since 2.0.0
*/
?>
<div
class="wu-flex wu-justify-center wu-items-center wu-text-center wu-bg-contain wu-bg-no-repeat wu--mb-12 wu-pb-12"
style="background-image: url(<?php echo $display_background_image ? wu_get_asset('empty-state-bg.webp', 'img') : ''; ?>); <?php echo $display_background_image ? 'height: calc(100vh - 300px); background-position: center -30px;' : ''; ?>"
<div
class="wu-flex wu-justify-center wu-items-center wu-text-center wu-bg-contain wu-bg-no-repeat wu--mb-12 wu-pb-12"
style="background-image: url(<?php echo esc_url($display_background_image ? wu_get_asset('empty-state-bg.webp', 'img') : ''); ?>); <?php echo esc_attr($display_background_image ? 'height: calc(100vh - 300px); background-position: center -30px;' : ''); ?>"
>
<div class="wu-block wu-p-4 md:wu-pt-12 wu-self-center">
<span class="wu-block wu-text-2xl wu-text-gray-600">
<?php echo $message; ?>
</span>
<?php if ( ! empty($link_url)) : ?>
<div class="wu-block wu-text-base wu-text-gray-500 wu-py-6">
<?php echo $sub_message; ?>
</div>
<div>
<a
href="<?php echo esc_attr($link_url); ?>"
title="<?php echo esc_attr($link_label); ?>"
class="button button-primary button-hero <?php echo esc_attr($link_classes); ?>"
>
<?php if ( ! empty($link_icon)) : ?>
<span class="<?php echo esc_attr($link_icon); ?> wu-align-middle"></span>
<?php endif; ?>
<?php echo $link_label; ?>
</a>
</div>
<?php else : ?>
<div class="wu-block wu-text-base wu-text-gray-500 wu-py-6">
<?php echo $sub_message; ?>
</div>
<?php endif; ?>
</div>
<span class="wu-block wu-text-2xl wu-text-gray-600">
<?php echo esc_html($message); ?>
</span>
<?php if ( ! empty($link_url)) : ?>
<div class="wu-block wu-text-base wu-text-gray-500 wu-py-6">
<?php echo esc_html($sub_message); ?>
</div>
<div>
<a
href="<?php echo esc_attr($link_url); ?>"
title="<?php echo esc_attr($link_label); ?>"
class="button button-primary button-hero <?php echo esc_attr($link_classes); ?>"
>
<?php if ( ! empty($link_icon)) : ?>
<span class="<?php echo esc_attr($link_icon); ?> wu-align-middle"></span>
<?php endif; ?>
<?php echo esc_html($link_label); ?>
</a>
</div>
<?php else : ?>
<div class="wu-block wu-text-base wu-text-gray-500 wu-py-6">
<?php echo esc_html($sub_message); ?>
</div>
<?php endif; ?>
</div>
</div>

View File

@ -47,11 +47,11 @@
class="button drawer-toggle"
v-bind:aria-expanded="open ? 'true' : 'false'"
>
<?php _e('Advanced Filters', 'wp-ultimo'); ?>
<?php esc_html_e('Advanced Filters', 'wp-multisite-waas'); ?>
</button>
<div class="wu-py-3 wu-px-2 wu-inline-block wu-uppercase wu-font-semibold wu-text-gray-600 wu-text-xs" v-show="open" v-cloak>
<?php _e('Advanced Filters', 'wp-ultimo'); ?>
<?php esc_html_e('Advanced Filters', 'wp-multisite-waas'); ?>
</div>
<button
@ -60,7 +60,7 @@
type="button"
class="button drawer-toggle"
>
<?php _e('Close', 'wp-ultimo'); ?>
<?php esc_html_e('Close', 'wp-multisite-waas'); ?>
</button>
<?php endif; ?>
@ -110,7 +110,7 @@
class="wu-uppercase wu-font-semibold wu-text-gray-600 wu-text-xs"
v-if="index === 0"
>
<?php _e('Where', 'wp-ultimo'); ?>
<?php esc_html_e('Where', 'wp-multisite-waas'); ?>
</span>
<select
@ -118,16 +118,16 @@
v-if="index === 1"
v-model="relation"
>
<option value="and"><?php _e('and', 'wp-ultimo'); ?></option>
<option value="or"><?php _e('or', 'wp-ultimo'); ?></option>
<option value="and"><?php esc_html_e('and', 'wp-multisite-waas'); ?></option>
<option value="or"><?php esc_html_e('or', 'wp-multisite-waas'); ?></option>
</select>
<span
class="wu-uppercase wu-font-semibold wu-text-gray-600 wu-text-xs"
v-if="index > 1"
>
<span v-show="relation === 'and'"><?php _e('and', 'wp-ultimo'); ?></span>
<span v-show="relation === 'or'"><?php _e('or', 'wp-ultimo'); ?></span>
<span v-show="relation === 'and'"><?php esc_html_e('and', 'wp-multisite-waas'); ?></span>
<span v-show="relation === 'or'"><?php esc_html_e('or', 'wp-multisite-waas'); ?></span>
</span>
</div>
@ -151,24 +151,24 @@
<div class="wu-w-2/12 wu-mx-2">
<select class="form-control wu-w-full" v-if="get_filter_type(filter.field) == 'bool'" v-model="filter.value">
<option value="1"><?php _e('is true.', 'wp-ultimo'); ?></option>
<option value="0"><?php _e('is false.', 'wp-ultimo'); ?></option>
<option value="1"><?php esc_html_e('is true.', 'wp-multisite-waas'); ?></option>
<option value="0"><?php esc_html_e('is false.', 'wp-multisite-waas'); ?></option>
</select>
<select class="form-control wu-w-full" v-if="get_filter_type(filter.field) == 'text'" v-bind:value="get_filter_rule(filter.field)">
<option value="is"><?php _e('is', 'wp-ultimo'); ?></option>
<option value="is_not"><?php _e('is not', 'wp-ultimo'); ?></option>
<option value="contains"><?php _e('contains', 'wp-ultimo'); ?></option>
<option value="does_not_contain"><?php _e('does not contain', 'wp-ultimo'); ?></option>
<option value="starts_with"><?php _e('starts with', 'wp-ultimo'); ?></option>
<option value="ends_with"><?php _e('ends with', 'wp-ultimo'); ?></option>
<option value="is_empty"><?php _e('is empty.', 'wp-ultimo'); ?></option>
<option value="is_not_empty"><?php _e('is not empty.', 'wp-ultimo'); ?></option>
<option value="is"><?php esc_html_e('is', 'wp-multisite-waas'); ?></option>
<option value="is_not"><?php esc_html_e('is not', 'wp-multisite-waas'); ?></option>
<option value="contains"><?php esc_html_e('contains', 'wp-multisite-waas'); ?></option>
<option value="does_not_contain"><?php esc_html_e('does not contain', 'wp-multisite-waas'); ?></option>
<option value="starts_with"><?php esc_html_e('starts with', 'wp-multisite-waas'); ?></option>
<option value="ends_with"><?php esc_html_e('ends with', 'wp-multisite-waas'); ?></option>
<option value="is_empty"><?php esc_html_e('is empty.', 'wp-multisite-waas'); ?></option>
<option value="is_not_empty"><?php esc_html_e('is not empty.', 'wp-multisite-waas'); ?></option>
</select>
<select class="form-control wu-w-full" v-if="get_filter_type(filter.field) == 'date'" v-bind:value="get_filter_rule(filter.field)">
<option value="before"><?php _e('is before', 'wp-ultimo'); ?></option>
<option value="after"><?php _e('is after', 'wp-ultimo'); ?></option>
<option value="before"><?php esc_html_e('is before', 'wp-multisite-waas'); ?></option>
<option value="after"><?php esc_html_e('is after', 'wp-multisite-waas'); ?></option>
</select>
</div>
@ -178,7 +178,7 @@
<input
type="text"
class="form-control wu-w-full"
placeholder="<?php esc_attr_e('Value', 'wp-ultimo'); ?>"
placeholder="<?php esc_attr_e('Value', 'wp-multisite-waas'); ?>"
v-if="_.contains(['text', 'date'], get_filter_type(filter.field)) && !_.contains(['is_empty', 'is_not_empty'], filter.rule)"
v-model="filter.value"
/>
@ -193,7 +193,7 @@
class="button"
v-show="index > 0"
>
<?php _e('Remove Filter', 'wp-ultimo'); ?>
<?php esc_html_e('Remove Filter', 'wp-multisite-waas'); ?>
</a>
</div>
@ -206,7 +206,7 @@
class="button button-primary wu-float-right"
v-show="index === filters.length - 1"
>
<?php _e('Add new Filter', 'wp-ultimo'); ?>
<?php esc_html_e('Add new Filter', 'wp-multisite-waas'); ?>
</a>
</div>

View File

@ -7,7 +7,7 @@
?>
<?php $table->display_tablenav('top'); ?>
<div class="wu-mt-4 <?php echo implode(' ', $table->get_table_classes()); ?>">
<div class="wu-mt-4 <?php echo esc_attr(implode(' ', $table->get_table_classes())); ?>">
<div id="the-list" class="wu-grid-content wu-grid wu-gap-4 wu-grid-cols-1 md:wu-grid-cols-2 lg:wu-grid-cols-3 xl:wu-grid-cols-4">

View File

@ -9,7 +9,7 @@
<h1 class="wp-heading-inline">
<?php echo $page->get_title(); ?>
<?php echo esc_html($page->get_title()); ?>
<?php
/**
@ -32,7 +32,7 @@
<?php endif; ?>
<?php echo $action_link['label']; ?>
<?php echo esc_html($action_link['label']); ?>
</a>
@ -50,9 +50,9 @@
</h1>
<?php if (isset($_GET['deleted'])) : ?>
<?php if (isset($_GET['deleted'])) : // phpcs:ignore WordPress.Security.NonceVerification ?>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php echo $page->get_labels()['deleted_message']; ?></p>
<p><?php echo esc_html($page->get_labels()['deleted_message']); ?></p>
</div>
<?php endif; ?>

View File

@ -19,11 +19,11 @@
<img
style="opacity: 0.6; height: 16rem;"
class="wu-w-full"
src="<?php echo $featured_image; ?>"
src="<?php echo esc_url($featured_image); ?>"
/>
<div class="wu-my-4 wu-mx-3 wu-inline-block wu-absolute wu-bottom-0 wu-right-0 wu-rounded wu-px-2 wu-py-1 wu-uppercase wu-text-xs wu-font-bold <?php echo esc_attr($item->get_type_class()); ?>">
<?php echo $item->get_type_label(); ?>
<?php echo esc_html($item->get_type_label()); ?>
</div>
<?php
} else {
@ -33,7 +33,7 @@
</div>
<div class="wu-my-4 wu-mx-3 wu-inline-block wu-absolute wu-bottom-0 wu-right-0 wu-rounded wu-px-2 wu-py-1 wu-uppercase wu-text-xs wu-font-bold <?php echo esc_attr($item->get_type_class()); ?>">
<?php echo $item->get_type_label(); ?>
<?php echo esc_html($item->get_type_label()); ?>
</div>
<?php
}
@ -45,7 +45,7 @@
<div class="wu-text-base wu-mt-1 wu-px-3 wu-mt-3">
<div>
<span class="wu-font-semibold"><?php echo $item->get_name(); ?></span>
<span class="wu-font-semibold"><?php echo esc_html($item->get_name()); ?></span>
<!-- <small><?php echo $item->get_price_description(); ?></small> -->
</div>
@ -61,11 +61,11 @@
<!-- <label>
<input class="wu-rounded-none" type="checkbox" name="bulk-delete[]" value="<?php echo $item->get_id(); ?>" />
<?php _e('Select Site', 'wp-ultimo'); ?>
<?php esc_html_e('Select Site', 'wp-multisite-waas'); ?>
</label> -->
<a href="<?php echo wu_network_admin_url('wp-ultimo-edit-product', ['id' => $item->get_id()]); ?>" class="button button-primary">
<?php _e('Read More', 'wp-ultimo'); ?>
<?php esc_html_e('Read More', 'wp-multisite-waas'); ?>
</a>
</div>

View File

@ -13,7 +13,7 @@
<div class="wu-flex-shrink wu-mr-4 wu-items-center wu-justify-between wu-flex">
<?php echo $args['image']; ?>
<?php echo wp_kses_post($args['image']); ?>
</div>
@ -25,11 +25,11 @@
<span class="wu-font-semibold wu-truncate wu-text-gray-700">
<?php echo $args['title']; ?>
<?php echo wp_kses_post($args['title']); ?>
<?php if ($args['id']) : ?>
<span class="wu-font-normal wu-text-xs">(#<?php echo $args['id']; ?>)</span>
<span class="wu-font-normal wu-text-xs">(#<?php echo esc_html($args['id']); ?>)</span>
<?php endif; ?>
@ -37,7 +37,7 @@
<div class="wu-ml-2 wu-flex-shrink-0 wu-flex">
<?php echo $args['status']; ?>
<?php echo wp_kses_post($args['status']); ?>
</div>
@ -55,21 +55,21 @@
<?php if (wu_get_isset($item, 'url')) : ?>
<a title="<?php echo wu_get_isset($item, 'value', ''); ?>" href="<?php echo esc_attr($item['url']); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight <?php echo ! $first ? 'sm:wu-mt-0 sm:wu-ml-6' : ''; ?> <?php echo $w_classes; ?>" <?php echo wu_tooltip_text($item['label']); ?>>
<a title="<?php echo wu_get_isset($item, 'value', ''); ?>" href="<?php echo esc_attr($item['url']); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight <?php echo ! $first ? 'sm:wu-mt-0 sm:wu-ml-6' : ''; ?> <?php echo esc_attr($w_classes); ?>" <?php echo wu_tooltip_text($item['label']); ?>>
<span class="<?php echo esc_attr($item['icon']); ?>"></span>
<?php echo $item['value']; ?>
<?php echo esc_html($item['value']); ?>
</a>
<?php else : ?>
<span class="wu-flex wu-items-center wu-text-xs wu-text-gray-600 <?php echo ! $first ? 'sm:wu-mt-0 sm:wu-ml-6' : ''; ?> <?php echo $w_classes; ?>" <?php echo wu_get_isset($item, 'label') ? wu_tooltip_text($item['label']) : ''; ?>>
<span class="wu-flex wu-items-center wu-text-xs wu-text-gray-600 <?php echo ! $first ? 'sm:wu-mt-0 sm:wu-ml-6' : ''; ?> <?php echo esc_attr($w_classes); ?>" <?php echo wu_get_isset($item, 'label') ? wu_tooltip_text($item['label']) : ''; ?>>
<span class="<?php echo esc_attr($item['icon']); ?>"></span>
<?php echo $item['value']; ?>
<?php echo esc_html($item['value']); ?>
</span>
@ -92,21 +92,21 @@ endforeach;
<?php if (wu_get_isset($item, 'url')) : ?>
<a title="<?php echo wu_get_isset($item, 'value', ''); ?>" href="<?php echo esc_attr($item['url']); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight <?php echo ! $first ? 'sm:wu-mt-0 sm:wu-ml-6' : ''; ?> <?php echo $w_classes; ?>" <?php echo wu_tooltip_text($item['label']); ?>>
<a title="<?php echo wu_get_isset($item, 'value', ''); ?>" href="<?php echo esc_attr($item['url']); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight <?php echo ! $first ? 'sm:wu-mt-0 sm:wu-ml-6' : ''; ?> <?php echo esc_attr($w_classes); ?>" <?php echo wu_tooltip_text($item['label']); ?>>
<span class="<?php echo esc_attr($item['icon']); ?>"></span>
<?php echo $item['value']; ?>
<?php echo esc_html($item['value']); ?>
</a>
<?php else : ?>
<span class="wu-flex wu-items-center wu-text-xs wu-text-gray-600 <?php echo ! $first ? 'sm:wu-mt-0 sm:wu-ml-6' : ''; ?> <?php echo $w_classes; ?> " <?php echo wu_get_isset($item, 'label') ? wu_tooltip_text($item['label']) : ''; ?>>
<span class="wu-flex wu-items-center wu-text-xs wu-text-gray-600 <?php echo ! $first ? 'sm:wu-mt-0 sm:wu-ml-6' : ''; ?> <?php echo esc_attr($w_classes); ?> " <?php echo wu_get_isset($item, 'label') ? wu_tooltip_text($item['label']) : ''; ?>>
<span class="<?php echo esc_attr($item['icon']); ?>"></span>
<?php echo $item['value']; ?>
<?php echo esc_html($item['value']); ?>
</span>
@ -127,7 +127,7 @@ endforeach;
<div class="wu-flex wu-ml-5 wu-flex-shrink-0 wu-items-center wu-justify-between">
<a href="<?php echo esc_attr($args['url']); ?>" title="<?php esc_attr_e('View', 'wp-ultimo'); ?>">
<a href="<?php echo esc_attr($args['url']); ?>" title="<?php esc_attr_e('View', 'wp-multisite-waas'); ?>">
<svg class="wu-h-5 wu-w-5 wu-text-gray-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
</svg>

View File

@ -9,7 +9,7 @@
<h1 class="wp-heading-inline">
<?php echo $page->get_title(); ?>
<?php echo esc_html($page->get_title()); ?>
<?php
/**
@ -32,7 +32,7 @@
<?php endif; ?>
<?php echo $action_link['label']; ?>
<?php echo esc_html($action_link['label']); ?>
</a>
@ -53,7 +53,7 @@
<?php if (wu_request('updated')) : ?>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php _e('Settings successfully saved.', 'wp-ultimo'); ?></p>
<p><?php esc_html_e('Settings successfully saved.', 'wp-multisite-waas'); ?></p>
</div>
<?php endif; ?>
@ -88,7 +88,7 @@
<li class="md:wu-hidden wu-p-4 wu-font-bold wu-uppercase wu-text-xs wu-text-gray-700">
<?php _e('Menu', 'wp-ultimo'); ?>
<?php esc_html_e('Menu', 'wp-multisite-waas'); ?>
</li>
@ -114,21 +114,21 @@
if (wu_get_isset($section, 'invisible')) {
continue; // skip add-ons for now.
} // end if;
}
if (wu_get_isset($section, 'addon')) {
$addons[ $section_name ] = $section;
continue; // skip add-ons for now.
} // end if;
}
/**
* Updates the flag after the current section is looped.
*/
if ($current_section === $section_name) {
$is_pre_current_section = false;
} // end if;
}
?>
@ -144,7 +144,7 @@
<span class="<?php echo esc_attr($section['icon']); ?> wu-align-text-bottom wu-mr-1"></span>
<?php echo $section['title']; ?>
<?php echo esc_html($section['title']); ?>
</a>
<!-- End Menu Link -->
@ -158,7 +158,7 @@
<li class="classes">
<a href="<?php echo esc_url($page->get_section_link($section_name) . '#' . $sub_section_name); ?>" class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-gray-500 hover:wu-text-gray-600 wu-text-sm">
&rarr; <?php echo $sub_section['title']; ?>
&rarr; <?php echo esc_html($sub_section['title']); ?>
</a>
</li>
@ -183,7 +183,7 @@
<ul class="wu-pt-4">
<li class="wu-px-4 wu-font-bold wu-uppercase wu-text-xs wu-text-gray-700">
<?php _e('Add-ons', 'wp-ultimo'); ?>
<?php esc_html_e('Add-ons', 'wp-multisite-waas'); ?>
</li>
<?php foreach ($addons as $section_name => $section) : ?>
@ -195,7 +195,7 @@
*/
if ($current_section === $section_name) {
$is_pre_current_section = false;
} // end if;
}
?>
@ -207,7 +207,7 @@
<span class="<?php echo esc_attr($section['icon']); ?> wu-align-text-bottom wu-mr-1"></span>
<?php echo $section['title']; ?>
<?php echo esc_html($section['title']); ?>
</a>
<!-- End Menu Link -->
@ -221,7 +221,7 @@
<li class="classes">
<a href="<?php echo esc_url($page->get_section_link($section_name) . '#' . $sub_section_name); ?>" class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-gray-500 hover:wu-text-gray-600 wu-text-sm">
&rarr; <?php echo $sub_section['title']; ?>
&rarr; <?php echo esc_html($sub_section['title']); ?>
</a>
</li>
@ -301,23 +301,3 @@
</form>
</div>
<script type="text/javascript">
/** Not a huge fan of having this here, but it's better than having
a file for this alone. */
settings_loader = wu_block_ui('#wp-ultimo-wizard-body');
/**
* Remove the block ui after the settings loaded.
*
* @since 2.0.0
* @return void
*/
function remove_block_ui() {
settings_loader.unblock();
} // end remove_block_ui;
</script>

View File

@ -14,14 +14,14 @@
<img
style="opacity: 0.6;"
class="wu-w-full wu-h-auto wu-image-preview"
data-image="<?php echo $item->get_featured_image('large'); ?>"
src="<?php echo $item->get_featured_image('wu-thumb-medium'); ?>"
data-image="<?php echo esc_attr($item->get_featured_image('large')); ?>"
src="<?php echo esc_attr($item->get_featured_image('wu-thumb-medium')); ?>"
/>
<?php if (current_user_can('wu_read_sites')) : ?>
<div class="wu-my-4 wu-mx-3 wu-inline-block wu-absolute wu-bottom-0 wu-right-0 wu-rounded wu-px-2 wu-py-1 wu-uppercase wu-text-xs wu-font-bold <?php echo esc_attr($item->get_type_class()); ?>">
<?php echo $item->get_type_label(); ?>
<?php echo esc_html($item->get_type_label()); ?>
</div>
<?php endif; ?>
@ -31,12 +31,12 @@
<div class="wu-text-base wu-px-3 wu-my-3">
<div>
<span class="wu-font-semibold"><?php echo $item->get_title(); ?></span>
<small><?php echo $item->get_id() ? '#' . $item->get_id() : ''; ?></small>
<span class="wu-font-semibold"><?php echo esc_html($item->get_title()); ?></span>
<small><?php echo esc_html($item->get_id() ? '#' . $item->get_id() : ''); ?></small>
</div>
<div class="wu-text-xs wu-my-1">
<a class="wu-no-underline" href="<?php echo $item->get_active_site_url(); ?>"><?php echo $item->get_active_site_url(); ?></a>
<a class="wu-no-underline" href="<?php echo esc_url($item->get_active_site_url()); ?>"><?php echo esc_url($item->get_active_site_url()); ?></a>
</div>
</div>
@ -48,23 +48,23 @@
<?php if ($item->get_type() === 'pending') : ?>
<label>
<input class="wu-rounded-none" type="checkbox" name="bulk-delete[]" value="<?php echo $item->get_membership_id(); ?>" />
<?php _e('Select Site', 'wp-ultimo'); ?>
<input class="wu-rounded-none" type="checkbox" name="bulk-delete[]" value="<?php echo esc_attr($item->get_membership_id()); ?>" />
<?php esc_html_e('Select Site', 'wp-multisite-waas'); ?>
</label>
<a title="<?php echo esc_attr(__('Publish pending site', 'wp-ultimo')); ?>" href="<?php echo wu_get_form_url('publish_pending_site', ['membership_id' => $item->get_membership_id()]); ?>" class="wubox button button-primary">
<?php _e('Publish Site', 'wp-ultimo'); ?>
<a title="<?php echo esc_attr(__('Publish pending site', 'wp-multisite-waas')); ?>" href="<?php echo esc_attr(wu_get_form_url('publish_pending_site', ['membership_id' => $item->get_membership_id()])); ?>" class="wubox button button-primary">
<?php esc_html_e('Publish Site', 'wp-multisite-waas'); ?>
</a>
<?php else : ?>
<label>
<input class="wu-rounded-none" type="checkbox" name="bulk-delete[]" value="<?php echo $item->get_id(); ?>" />
<?php _e('Select Site', 'wp-ultimo'); ?>
<input class="wu-rounded-none" type="checkbox" name="bulk-delete[]" value="<?php echo esc_attr($item->get_id()); ?>" />
<?php esc_html_e('Select Site', 'wp-multisite-waas'); ?>
</label>
<a href="<?php echo wu_network_admin_url('wp-ultimo-edit-site', ['id' => $item->get_id()]); ?>" class="button button-primary">
<?php _e('Manage', 'wp-ultimo'); ?>
<a href="<?php echo esc_attr(wu_network_admin_url('wp-ultimo-edit-site', ['id' => $item->get_id()])); ?>" class="button button-primary">
<?php esc_html_e('Manage', 'wp-multisite-waas'); ?>
</a>
<?php endif; ?>
@ -73,8 +73,8 @@
<span>&nbsp;</span>
<a href="<?php echo wu_network_admin_url('wp-ultimo-edit-site', ['id' => $item->get_id()]); ?>" class="button button-primary">
<?php _e('See Main Site', 'wp-ultimo'); ?>
<a href="<?php echo esc_attr(wu_network_admin_url('wp-ultimo-edit-site', ['id' => $item->get_id()])); ?>" class="button button-primary">
<?php esc_html_e('See Main Site', 'wp-multisite-waas'); ?>
</a>
<?php endif; ?>

View File

@ -8,26 +8,26 @@
<div id="wp-ultimo-wrap" class="wrap wu-wrap <?php echo esc_attr($classes); ?>">
<h1 class="wp-heading-inline">
<!-- This is here for admin notices placement only -->
<!-- This is here for admin notices placement only -->
</h1>
<?php if ($logo) : ?>
<div class="wu-text-center">
<div class="wu-text-center">
<img style="width: 200px;" src="<?php echo esc_attr($logo); ?>" alt="">
</div>
</div>
<?php endif; ?>
<?php if (isset($_GET['deleted'])) : ?>
<?php if (isset($_GET['deleted'])) : // phpcs:ignore WordPress.Security.NonceVerification ?>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php echo $page->labels['deleted_message']; ?></p>
<p><?php echo esc_html($page->labels['deleted_message']); ?></p>
</div>
</div>
<?php endif; ?>
@ -35,11 +35,11 @@
<div id="poststuff" class="md:wu-flex wu-mr-4 md:wu-mr-0">
<div class="md:wu-w-2/12 wu-pt-10">
<div class="md:wu-w-2/12 wu-pt-10">
<span class="wu-uppercase wu-block wu-px-4 wu-text-gray-700 wu-font-bold">
<?php echo $page->get_title(); ?>
<?php echo esc_html($page->get_title()); ?>
</span>
@ -53,105 +53,105 @@
do_action('wu_page_wizard_after_title', $page);
?>
<!-- Navigator -->
<ul class="">
<!-- Navigator -->
<ul class="">
<?php
<?php
/**
* We need to set a couple of flags in here to control clickable navigation elements.
* This flag makes sure only steps the user already went through are clickable.
*/
$is_pre_current_section = true;
/**
* We need to set a couple of flags in here to control clickable navigation elements.
* This flag makes sure only steps the user already went through are clickable.
*/
$is_pre_current_section = true;
?>
?>
<?php foreach ($sections as $section_name => $section) : ?>
<?php foreach ($sections as $section_name => $section) : ?>
<?php
<?php
/**
* Updates the flag after the current section is looped.
*/
if ($current_section === $section_name) {
$is_pre_current_section = false;
} // end if;
/**
* Updates the flag after the current section is looped.
*/
if ($current_section === $section_name) {
$is_pre_current_section = false;
}
?>
?>
<?php if (wu_get_isset($section, 'separator')) : ?>
<?php if (wu_get_isset($section, 'separator')) : ?>
<!-- Separator Item -->
<li class="wu-sticky wu-py-2 wu-px-4">&nbsp;</li>
<!-- Separator Item -->
<li class="wu-sticky wu-py-2 wu-px-4">&nbsp;</li>
<?php else : ?>
<?php else : ?>
<!-- Menu Item -->
<li class="wu-sticky">
<!-- Menu Item -->
<li class="wu-sticky">
<!-- Menu Link -->
<a href="<?php echo esc_url($page->get_section_link($section_name)); ?>" class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-sm wu-rounded <?php echo ! $clickable_navigation && ! $is_pre_current_section ? 'wu-pointer-events-none' : ''; ?> <?php echo $current_section === $section_name ? 'wu-bg-gray-300 wu-text-gray-800' : 'wu-text-gray-600 hover:wu-text-gray-700'; ?>">
<?php echo $section['title']; ?>
</a>
<!-- End Menu Link -->
<!-- Menu Link -->
<a href="<?php echo esc_url($page->get_section_link($section_name)); ?>" class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-sm wu-rounded <?php echo ! $clickable_navigation && ! $is_pre_current_section ? 'wu-pointer-events-none' : ''; ?> <?php echo $current_section === $section_name ? 'wu-bg-gray-300 wu-text-gray-800' : 'wu-text-gray-600 hover:wu-text-gray-700'; ?>">
<?php echo esc_html($section['title']); ?>
</a>
<!-- End Menu Link -->
<?php if ( ! empty($section['sub-sections'])) : ?>
<?php if ( ! empty($section['sub-sections'])) : ?>
<!-- Sub-menu -->
<ul class="classes">
<!-- Sub-menu -->
<ul class="classes">
<?php foreach ($section['sub-sections'] as $sub_section_name => $sub_section) : ?>
<?php foreach ($section['sub-sections'] as $sub_section_name => $sub_section) : ?>
<li class="classes">
<a href="#" class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-gray-500 hover:wu-text-gray-600 wu-text-sm">
&rarr; <?php echo $sub_section['title']; ?>
</a>
</li>
<li class="classes">
<a href="#" class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-gray-500 hover:wu-text-gray-600 wu-text-sm">
&rarr; <?php echo esc_html($sub_section['title']); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<!-- End Sub-menu -->
<?php endif; ?>
</li>
<!-- End Menu Item -->
<?php endif; ?>
<?php endforeach; ?>
</ul>
<!-- End Sub-menu -->
</ul>
<!-- End Navigator -->
<?php endif; ?>
</div>
</li>
<!-- End Menu Item -->
<div class="md:wu-w-8/12 wu-px-4 metabox-holder">
<?php endif; ?>
<form method="post" id="<?php echo esc_attr($form_id); ?>">
<?php endforeach; ?>
<?php
</ul>
<!-- End Navigator -->
/**
* Print Side Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'normal', false);
</div>
?>
<div class="md:wu-w-8/12 wu-px-4 metabox-holder">
<?php wp_nonce_field(sprintf('saving_%s', $current_section), sprintf('saving_%s', $current_section), false); ?>
<form method="post" id="<?php echo esc_attr($form_id); ?>">
<?php wp_nonce_field(sprintf('saving_%s', $current_section), '_wpultimo_nonce'); ?>
<?php
</form>
/**
* Print Side Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'normal', false);
?>
<?php wp_nonce_field(sprintf('saving_%s', $current_section), sprintf('saving_%s', $current_section), false); ?>
<?php wp_nonce_field(sprintf('saving_%s', $current_section), '_wpultimo_nonce'); ?>
</form>
</div>
</div>
</div>

View File

@ -9,13 +9,13 @@
<div class="wu-flex wu-justify-between wu-bg-gray-100 wu--m-in wu-mt-4 wu-p-4 wu-overflow-hidden wu-border-t wu-border-solid wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-300">
<a href="<?php echo esc_url($page->get_prev_section_link()); ?>" class="wu-self-center button button-large wu-float-left">
<?php _e('&larr; Go Back', 'wp-ultimo'); ?>
<?php esc_html_e('← Go Back', 'wp-multisite-waas'); ?>
</a>
<span class="wu-self-center wu-content-center wu-flex">
<button name="submit" value="1" class="button button-primary button-large">
<?php _e('Continue', 'wp-ultimo'); ?>
<?php esc_html_e('Continue', 'wp-multisite-waas'); ?>
</button>
</span>

View File

@ -17,7 +17,7 @@
if ( ! defined('ABSPATH')) {
exit; // Exit if accessed directly
} // end if;
}
?>
@ -78,7 +78,7 @@ if ( ! defined('ABSPATH')) {
<tr style="">
<td style=" text-align: center;">
<p style="font-family: <?php echo $template_settings['footer_font']; ?>; font-size: 12px; line-height: 1.6m; color: <?php echo $template_settings['footer_color']; ?>; font-weight: normal; margin: 0 0 10px; padding: 0; text-align: <?php echo $template_settings['footer_align']; ?>">
<p style="font-family: <?php echo $template_settings['footer_font']; ?>; font-size: 12px; line-height: 1.6em; color: <?php echo $template_settings['footer_color']; ?>; font-weight: normal; margin: 0 0 10px; padding: 0; text-align: <?php echo $template_settings['footer_align']; ?>">
<?php echo $template_settings['footer_text']; ?>
</p>
</td>
@ -89,7 +89,7 @@ if ( ! defined('ABSPATH')) {
<?php if ($template_settings['display_company_address']) : ?>
<tr style="">
<td style=" text-align: center;">
<p style="font-family: <?php echo $template_settings['footer_font']; ?>; font-size: 12px; line-height: 1.6m; color: <?php echo $template_settings['footer_color']; ?>; font-weight: normal; margin: 0 0 10px; padding: 0; text-align: <?php echo $template_settings['footer_align']; ?>">
<p style="font-family: <?php echo $template_settings['footer_font']; ?>; font-size: 12px; line-height: 1.6em; color: <?php echo $template_settings['footer_color']; ?>; font-weight: normal; margin: 0 0 10px; padding: 0; text-align: <?php echo $template_settings['footer_align']; ?>">
<strong><?php echo wu_get_setting('company_name'); ?></strong><br>
<?php echo nl2br(wu_get_setting('company_address', [])); ?>
</p>
@ -99,7 +99,7 @@ if ( ! defined('ABSPATH')) {
<tr style="">
<td style=" text-align: center;">
<p style="font-family: <?php echo $template_settings['footer_font']; ?>; font-size: 12px; line-height: 1.6m; color: <?php echo $template_settings['footer_color']; ?>; font-weight: normal; margin: 0 0 10px; padding: 0; text-align: <?php echo $template_settings['footer_align']; ?>">
<p style="font-family: <?php echo $template_settings['footer_font']; ?>; font-size: 12px; line-height: 1.6em; color: <?php echo $template_settings['footer_color']; ?>; font-weight: normal; margin: 0 0 10px; padding: 0; text-align: <?php echo $template_settings['footer_align']; ?>">
<a href="<?php echo $site_url; ?>" style="line-height: 1.6em; color: #999999; margin: 0; padding: 0;">
<?php echo esc_attr($site_name); ?>
</a>

View File

@ -9,61 +9,61 @@
<?php if ($targets) : ?>
<ul class="wu-widget-list">
<ul class="wu-widget-list">
<?php foreach ($targets as $target_key => $target) : ?>
<?php foreach ($targets as $target_key => $target) : ?>
<li class="wu-p-2 wu-m-0 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-200 wu-border-solid">
<li class="wu-p-2 wu-m-0 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-200 wu-border-solid">
<a title="<?php echo $target['display_name']; ?>" href='<?php echo $target['link']; ?>' class='<?php echo $modal_class; ?> wu-table-card wu-text-gray-700 wu-p-2 wu-flex wu-flex-grow wu-rounded wu-items-center wu-border wu-border-solid wu-border-gray-300 wu-no-underline'>
<a title="<?php echo esc_attr($target['display_name']); ?>" href='<?php echo esc_url($target['link']); ?>' class='<?php echo esc_attr($modal_class); ?> wu-table-card wu-text-gray-700 wu-p-2 wu-flex wu-flex-grow wu-rounded wu-items-center wu-border wu-border-solid wu-border-gray-300 wu-no-underline'>
<div class="wu-flex wu-relative wu-h-6 wu-w-6 wu-rounded-full wu-ring-2 wu-mx-4 wu-my-2 wu-box-border wu-ring-white wu-bg-gray-300 wu-items-center wu-justify-center">
<div class="wu-flex wu-relative wu-h-6 wu-w-6 wu-rounded-full wu-ring-2 wu-mx-4 wu-my-2 wu-box-border wu-ring-white wu-bg-gray-300 wu-items-center wu-justify-center">
<?php echo $target['avatar']; ?>
<?php echo wp_kses_post($target['avatar']); ?>
</div>
</div>
<div class='wu-pl-2'>
<div class='wu-pl-2'>
<strong class='wu-block'><?php echo $target['display_name']; ?><small class='wu-font-normal'> (#<?php echo $target['id']; ?>)</small></strong>
<strong class='wu-block'><?php echo esc_html($target['display_name']); ?><small class='wu-font-normal'> (#<?php echo intval($target['id']); ?>)</small></strong>
<small><?php echo $target['description']; ?></small>
<small><?php echo wp_kses_post($target['description']); ?></small>
</div>
</div>
</a>
</a>
</li>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
</ul>
<?php else : ?>
<ul class="wu-widget-list">
<ul class="wu-widget-list">
<li class="wu-p-2 wu-m-0 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-400 wu-border-solid">
<li class="wu-p-2 wu-m-0 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-400 wu-border-solid">
<div class="wu-p-2 wu-mr-1 wu-flex wu-rounded wu-items-center wu-border wu-border-solid wu-border-gray-300 wu-bg-white wu-relative wu-overflow-hidden">
<div class="wu-p-2 wu-mr-1 wu-flex wu-rounded wu-items-center wu-border wu-border-solid wu-border-gray-300 wu-bg-white wu-relative wu-overflow-hidden">
<span class='dashicons dashicons-wu-block wu-text-gray-600 wu-px-1 wu-pr-3'>&nbsp;</span>
<span class='dashicons dashicons-wu-block wu-text-gray-600 wu-px-1 wu-pr-3'>&nbsp;</span>
<div class=''>
<div class=''>
<span class='wu-block wu-py-3 wu-text-gray-600 wu-text-2xs wu-font-bold wu-uppercase'>
<?php echo esc_html(__('No Targets', 'wp-ultimo')); ?>
<?php echo esc_html(__('No Targets', 'wp-multisite-waas')); ?>
</span>
</div>
</div>
</div>
</div>
</li>
</li>
</ul>
</ul>
<?php endif; ?>

View File

@ -5,10 +5,9 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php
/**
* Adds the partial title template.
*
@ -20,23 +19,16 @@
'field' => $field,
]
);
?>
<?php foreach ($field->options as $option_value => $option_name) : ?>
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option_value); ?>">
<input id="field-gateway-<?php echo esc_attr($option_value); ?>" type="checkbox" name="<?php echo esc_attr($field->id); ?>[]" value="<?php echo esc_attr($option_value); ?>" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value == $option_value); ?>>
<?php echo $option_name; ?>
</label>
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option_value); ?>">
<input id="field-gateway-<?php echo esc_attr($option_value); ?>" type="checkbox" name="<?php echo esc_attr($field->id); ?>[]" value="<?php echo esc_attr($option_value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> <?php checked(in_array($option_value, (array) $field->value, true)); ?>>
<?php echo esc_html($option_name); ?>
</label>
<?php endforeach; ?>
<?php
/**
* Adds the partial error template.
*
@ -48,7 +40,6 @@
'field' => $field,
]
);
?>
</div>

View File

@ -5,22 +5,18 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<label class="wu-block wu-my-4" for="field-<?php echo esc_attr($field->id); ?>">
<input id="field-<?php echo esc_attr($field->id); ?>" type="checkbox" name="<?php echo esc_attr($field->id); ?>" value="1" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value); ?>>
<?php echo $field->title; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo $field->title; ?>
<?php echo wu_tooltip($field->tooltip); ?>
<?php echo $field->desc; ?>
<?php echo wu_tooltip($field->tooltip); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo $field->desc; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</label>
<?php
/**
* Adds the partial error template.
*
@ -32,7 +28,5 @@
'field' => $field,
]
);
?>
</div>

View File

@ -5,72 +5,57 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<span class="wu-block wu-w-full <?php echo esc_attr($field->classes); ?>">
<?php
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-title',
[
'field' => $field,
]
);
?>
<?php
/**
* Instantiate the form for the order details.
*
* @since 2.0.0
*/
$form = new \WP_Ultimo\UI\Form(
$field->id,
$field->fields,
[
'views' => 'checkout/fields',
'classes' => 'wu-flex wu-my-1',
'field_wrapper_classes' => 'wu-bg-transparent',
'wrap_tag' => 'span',
'step' => (object) [
'classes' => '',
],
]
);
$form->render();
/**
* Adds the partial error template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
[
'field' => $field,
]
);
?>
<?php if ($field->desc) : ?>
<span class="wu-mt-2 wu-block wu-bg-gray-100 wu-rounded wu-border-solid wu-border-gray-400 wu-border-t wu-border-l wu-border-b wu-border-r wu-text-2xs wu-py-2 wu-p-2">
<?php echo $field->desc; ?>
</span>
<?php
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-title',
[
'field' => $field,
]
);
?>
<?php
/**
* Instantiate the form for the order details.
*
* @since 2.0.0
*/
$form = new \WP_Ultimo\UI\Form(
$field->id,
$field->fields,
[
'views' => 'checkout/fields',
'classes' => 'wu-flex wu-my-1',
'field_wrapper_classes' => 'wu-bg-transparent',
'wrap_tag' => 'span',
'step' => (object) [
'classes' => '',
],
]
);
$form->render();
/**
* Adds the partial error template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
[
'field' => $field,
]
);
?>
<?php if ($field->desc) : ?>
<span class="wu-mt-2 wu-block wu-bg-gray-100 wu-rounded wu-border-solid wu-border-gray-400 wu-border-t wu-border-l wu-border-b wu-border-r wu-text-2xs wu-py-2 wu-p-2">
<?php echo esc_html($field->desc); ?>
</span>
<?php endif; ?>
</span>
</div>

View File

@ -1,27 +1,12 @@
<?php
/**
* Hidden field view.
*
* @since 2.0.0
*/
?>
<?php if (is_array($field->value)) : ?>
<?php foreach ($field->value as $index => $value) : ?>
<input id="field-<?php echo esc_attr($field->id) . '-' . esc_attr($index); ?>" name="<?php echo esc_attr($field->id); ?>[]" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input id="field-<?php echo esc_attr($field->id . '-' . $index); ?>" name="<?php echo esc_attr($field->id); ?>[]" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php endforeach; ?>
<?php else : ?>
<input id="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input id="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php endif; ?>
<?php
/**
* Adds the partial error template.
*
@ -33,5 +18,4 @@ wu_get_template(
'field' => $field,
]
);
?>

View File

@ -6,7 +6,7 @@
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-block wu-w-full">
@ -24,41 +24,31 @@
]
);
/**
* Adds the partial description template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-description',
[
'field' => $field,
]
);
/**
* Adds the partial description template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-description',
[
'field' => $field,
]
);
?>
/**
* Adds the partial errors template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
[
'field' => $field,
]
);
<div class="wu-block wu-w-full wu-mt-4">
<?php echo $field->content; ?>
</div>
<?php
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
[
'field' => $field,
]
);
?>
?>
</div>

View File

@ -6,8 +6,8 @@
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php echo $field->desc; ?>
<?php echo $field->desc; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>

View File

@ -5,10 +5,9 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php
/**
* Adds the partial title template.
*
@ -20,27 +19,24 @@
'field' => $field,
]
);
?>
<input class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>" id="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>"
id="field-<?php echo esc_attr($field->id); ?>"
name="<?php echo esc_attr($field->id); ?>"
type="<?php echo esc_attr($field->type); ?>"
placeholder="<?php echo esc_attr($field->placeholder); ?>"
value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php if ($field->meter) : ?>
<span class="wu-block">
<span id="pass-strength-result" class="wu-py-2 wu-px-4 wu-bg-gray-100 wu-block wu-text-sm">
<?php _e('Strength Meter', 'wp-ultimo'); ?>
<span class="wu-block">
<span id="pass-strength-result" class="wu-py-2 wu-px-4 wu-bg-gray-100 wu-block wu-text-sm">
<?php esc_html_e('Strength Meter', 'wp-multisite-waas'); ?>
</span>
</span>
</span>
<?php endif; ?>
<?php
/**
* Adds the partial error template.
*
@ -52,12 +48,6 @@
'field' => $field,
]
);
?>
<!--
<div class="wu-border-red-300"></div>
<div class="wu-border-yellow-300"></div>
-->
</div>

View File

@ -8,7 +8,7 @@
$active_gateways = wu_get_active_gateway_as_options();
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" v-cloak v-show="order && order.should_collect_payment" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" v-cloak v-show="order && order.should_collect_payment" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php
@ -30,35 +30,35 @@ $active_gateways = wu_get_active_gateway_as_options();
<?php if (count($active_gateways) === 1) : ?>
<input
id="field-gateway"
type="hidden"
name="gateway"
value="<?php echo esc_attr($option_value); ?>"
v-model="gateway"
<?php echo $field->get_html_attributes(); ?>
>
<input
id="field-gateway"
type="hidden"
name="gateway"
value="<?php echo esc_attr($option_value); ?>"
v-model="gateway"
<?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
>
<?php else : ?>
<?php else : ?>
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option_value); ?>">
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option_value); ?>">
<input
id="field-gateway-<?php echo esc_attr($option_value); ?>"
type="radio"
name="gateway"
value="<?php echo esc_attr($option_value); ?>"
v-model="gateway"
class="<?php echo trim($field->classes); ?>"
<?php echo $field->get_html_attributes(); ?>
<?php checked($field->value == $option_value); ?>
>
<input
id="field-gateway-<?php echo esc_attr($option_value); ?>"
type="radio"
name="gateway"
value="<?php echo esc_attr($option_value); ?>"
v-model="gateway"
class="<?php echo esc_attr(trim($field->classes)); ?>"
<?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php checked((string) $field->value === (string) $option_value, true); ?>
>
<?php echo $option_name; ?>
<?php echo esc_html($option_name); ?>
</label>
</label>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
@ -78,7 +78,7 @@ $active_gateways = wu_get_active_gateway_as_options();
/**
* Load Gateway fields
*
*
* @since 2.0.0
*/
do_action('wu_checkout_gateway_fields');

View File

@ -5,10 +5,9 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php
/**
* Adds the partial title template.
*
@ -20,23 +19,16 @@
'field' => $field,
]
);
?>
<?php foreach (wu_get_plans() as $option) : ?>
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option->get_id()); ?>">
<input id="field-products-<?php echo esc_attr($option->get_id()); ?>" type="checkbox" name="products[]" value="<?php echo esc_attr($option->get_id()); ?>" <?php echo $field->get_html_attributes(); ?> <?php checked($option->get_id() == $field->value); ?> v-model="products">
<?php echo $option->get_name(); ?>
</label>
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option->get_id()); ?>">
<input id="field-products-<?php echo esc_attr($option->get_id()); ?>" type="checkbox" name="products[]" value="<?php echo esc_attr($option->get_id()); ?>" <?php checked($option->get_id() == $field->value); ?> v-model="products">
<?php echo esc_html($option->get_name()); ?>
</label>
<?php endforeach; ?>
<?php
/**
* Adds the partial error template.
*
@ -48,7 +40,5 @@
'field' => $field,
]
);
?>
</div>

View File

@ -5,10 +5,9 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php
/**
* Adds the partial title template.
*
@ -20,23 +19,16 @@
'field' => $field,
]
);
?>
<?php foreach ($field->options as $option_value => $option_name) : ?>
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option_value); ?>">
<input id="field-gateway-<?php echo esc_attr($option_value); ?>" type="radio" name="<?php echo esc_attr($field->id); ?>" value="<?php echo esc_attr($option_value); ?>" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value == $option_value); ?>>
<?php echo $option_name; ?>
</label>
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option_value); ?>">
<input id="field-gateway-<?php echo esc_attr($option_value); ?>" type="radio" name="<?php echo esc_attr($field->id); ?>" value="<?php echo esc_attr($option_value); ?>" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value == $option_value); ?>>
<?php echo esc_html($option_name); ?>
</label>
<?php endforeach; ?>
<?php
/**
* Adds the partial title template.
*
@ -48,7 +40,6 @@
'field' => $field,
]
);
?>
</div>

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php
@ -28,12 +28,12 @@
id="field-<?php echo esc_attr($field->id); ?>"
name="<?php echo esc_attr($field->id); ?>"
value="<?php echo esc_attr($field->value); ?>"
<?php echo $field->get_html_attributes(); ?>
<?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
>
<?php if ($field->placeholder) : ?>
<option <?php checked(! $field->value); ?> class="wu-opacity-75"><?php echo $field->placeholder; ?></option>
<option <?php checked(! $field->value); ?> class="wu-opacity-75"><?php echo esc_html($field->placeholder); ?></option>
<?php endif; ?>
@ -43,14 +43,14 @@
value="<?php echo esc_attr($key); ?>"
<?php checked($key, $field->value); ?>
>
<?php echo $label; ?>
<?php echo esc_html($label); ?>
</option>
<?php endforeach; ?>
<?php if ($field->options_template) : ?>
<?php echo $field->options_template; ?>
<?php echo $field->options_template; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php endif; ?>

View File

@ -5,12 +5,8 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<button id="<?php echo esc_attr($field->id); ?>-btn" type="submit" name="<?php echo esc_attr($field->id); ?>-btn" <?php echo $field->get_html_attributes(); ?> class="button <?php echo esc_attr(trim($field->classes)); ?>">
<?php echo $field->title; ?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<button id="<?php echo esc_attr($field->id); ?>-btn" type="submit" name="<?php echo esc_attr($field->id); ?>-btn" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> class="button <?php echo esc_attr(trim($field->classes)); ?>">
<?php echo $field->title; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</button>
</div>

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php
@ -27,27 +27,27 @@
<div class="sm:wu-flex wu-items-stretch wu-content-center">
<div <?php echo wu_array_to_html_attrs($field->prefix_html_attr ?? []); ?>>
<?php echo $field->prefix; ?>
<div <?php echo wu_array_to_html_attrs($field->prefix_html_attr ?? []); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php echo $field->prefix; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
<?php endif; ?>
<?php endif; ?>
<input class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>" id="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>" id="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php if ($field->suffix) : ?>
<?php if ($field->suffix) : ?>
<div <?php echo wu_array_to_html_attrs($field->suffix_html_attr ?? []); ?>>
<?php echo $field->suffix; ?>
</div>
<div <?php echo wu_array_to_html_attrs($field->suffix_html_attr ?? []); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php echo $field->suffix; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($field->prefix || $field->suffix) : ?>
<?php if ($field->prefix || $field->suffix) : ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php

View File

@ -5,22 +5,18 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<label class="wu-block wu-my-4" for="field-<?php echo esc_attr($field->id); ?>">
<input id="field-<?php echo esc_attr($field->id); ?>" type="checkbox" name="<?php echo esc_attr($field->id); ?>" value="1" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value); ?>>
<?php echo $field->title; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo $field->title; ?>
<?php echo wu_tooltip($field->tooltip); ?>
<?php echo $field->desc; ?>
<?php echo wu_tooltip($field->tooltip); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo $field->desc; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</label>
<?php
/**
* Adds the partial error template.
*
@ -32,7 +28,5 @@
'field' => $field,
]
);
?>
</div>

View File

@ -7,21 +7,21 @@
?>
<?php if ($form->wrap_in_form_tag) : ?>
<form id="<?php echo esc_attr($form_slug); ?>" method="<?php echo esc_attr($form->method); ?>" <?php echo $form->get_html_attributes(); ?>>
<form id="<?php echo esc_attr($form_slug); ?>" method="<?php echo esc_attr($form->method); ?>" <?php echo $form->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php else : ?>
<<?php echo $form->wrap_tag; ?> class="<?php echo esc_attr(trim($form->classes ? $form->classes . ' ' . $step->classes . ' wu-mt-2' : $step->classes . ' wu-mt-2')); ?>" <?php echo $form->get_html_attributes(); ?>>
<<?php echo $form->wrap_tag; ?> class="<?php echo esc_attr(trim($form->classes ? $form->classes . ' ' . $step->classes . ' wu-mt-2' : $step->classes . ' wu-mt-2')); ?>" <?php echo $form->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php endif; ?>
<?php if ($form->title) : ?>
<h3 class="wu-checkout-section-title"><?php echo $form->title; ?></h3>
<h3 class="wu-checkout-section-title"><?php echo esc_html($form->title); ?></h3>
<?php endif; ?>
<?php echo $rendered_fields; ?>
<?php echo $rendered_fields; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php if ($form->wrap_in_form_tag) : ?>
@ -29,6 +29,6 @@
<?php else : ?>
</<?php echo $form->wrap_tag; ?>>
</<?php echo $form->wrap_tag; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php endif; ?>

View File

@ -9,60 +9,33 @@
*
* @since 2.0.0
* @param array $products List of product objects.
* @param string $name ID of the field.
* @param string $label The field label.
*/
?>
<?php if (empty($products)) : ?>
<div class="wu-text-center wu-bg-gray-100 wu-rounded wu-uppercase wu-font-semibold wu-text-xs wu-text-gray-700 wu-p-4">
<?php _e('No Products Found.', 'wp-ultimo'); ?>
<?php esc_html_e('No Products Found.', 'wp-multisite-waas'); ?>
</div>
<?php endif; ?>
<div class="wu-flex wu-mb-4 wu--mx-2">
<?php foreach ($products as $product) : ?>
<div
class="<?php echo "wu-product-{$product->get_id()}"; ?> wu-bg-gray-100 wu-m-2 wu-px-4 wu-py-4 wu-border wu-border-solid wu-rounded wu-border-gray-400 wu-box-border wu-flex-1 wu-flex wu-flex-col wu-justify-end"
>
<div class="wu-self-start">
<span class="wu-font-bold wu-block wu-text-xl"><?php echo $product->get_name(); ?></span>
<span class="wu-block wu-font-semibold"><?php echo $product->get_price_description(false); ?></span>
<div class="<?php echo esc_attr('wu-product-' . $product->get_id()); ?> wu-bg-gray-100 wu-m-2 wu-px-4 wu-py-4 wu-border wu-border-solid wu-rounded wu-border-gray-400 wu-box-border wu-flex-1 wu-flex wu-flex-col wu-justify-end">
<div class="wu-self-start">
<span class="wu-font-bold wu-block wu-text-xl"><?php echo esc_html($product->get_name()); ?></span>
<span class="wu-block wu-font-semibold"><?php echo esc_html($product->get_price_description(false)); ?></span>
</div>
<div class="wu-my-4">
<ul class="wu-m-0 wu-list-none">
<?php foreach ($product->get_pricing_table_lines() as $key => $line) : ?>
<li class="<?php echo esc_attr(str_replace('_', '-', $key)); ?>"><?php echo esc_html($line); ?></li>
<?php endforeach; ?>
</ul>
</div>
<div class="wu-relative">
<a href="#wu-checkout-add-<?php echo esc_attr($product->get_slug()); ?>" class="button btn wu-w-full wu-text-center wu-inline-block"><?php esc_html_e('Select', 'wp-multisite-waas'); ?></a>
</div>
<input type="checkbox" style="display: none;" name="products[]" value="<?php echo esc_attr($product->get_slug()); ?>" v-model="products">
</div>
<div class="wu-my-4">
<ul class="wu-m-0 wu-list-none">
<?php foreach ($product->get_pricing_table_lines() as $key => $line) : ?>
<li class="<?php echo str_replace('_', '-', $key); ?>"><?php echo $line; ?></li>
<?php endforeach; ?>
</ul>
</div>
<div class="wu-relative">
<a href="#wu-checkout-add-<?php echo $product->get_slug(); ?>" class="button btn wu-w-full wu-text-center wu-inline-block">
<?php _e('Select', 'wp-ultimo'); ?>
</a>
</div>
<input type="checkbox" style="display: none;" name="products[]" value="<?php echo $product->get_slug(); ?>" v-model="products">
</div>
<?php endforeach; ?>
</div>

View File

@ -14,8 +14,8 @@ if ($is_trial_setup) {
$date = wp_date(get_option('date_format'), strtotime($membership->get_date_trial_end(), wu_get_current_time('timestamp', true)));
$notes[] = sprintf(__('Your trial period will end on %1$s.', 'wp-ultimo'), $date);
} // end if;
$notes[] = sprintf(__('Your trial period will end on %1$s.', 'wp-multisite-waas'), $date);
}
$original_cart = $payment->get_meta('wu_original_cart');
@ -34,29 +34,29 @@ if ($membership->is_recurring() && $should_auto_renew) {
if ($original_cart->get_cart_type() === 'downgrade') {
$subtotal = wu_format_currency($payment->get_subtotal(), $payment->get_currency());
if ($is_trial_setup) {
$notes[] = sprintf(__('Your updated membership will start on $1$s, from that date you will be billed %2$s %3$s.', 'wp-ultimo'), $date, $subtotal, $desc);
$notes[] = sprintf(__('Your updated membership will start on $1$s, from that date you will be billed %2$s %3$s.', 'wp-multisite-waas'), $date, $subtotal, $desc);
} else {
$date_renew = wp_date(get_option('date_format'), strtotime($membership->get_date_expiration(), wu_get_current_time('timestamp', true)));
$notes[] = sprintf(__('Your updated membership will start on %1$s, from that date you will be billed %2$s %3$s.', 'wp-ultimo'), $date_renew, $subtotal, $desc);
} // end if;
$notes[] = sprintf(__('Your updated membership will start on %1$s, from that date you will be billed %2$s %3$s.', 'wp-multisite-waas'), $date_renew, $subtotal, $desc);
}
} elseif ($is_trial_setup) {
$initial_amount_format = wu_format_currency($membership->get_initial_amount(), $payment->get_currency());
$notes[] = sprintf(__('After the first payment of %1$s you will be billed %2$s %3$s.', 'wp-ultimo'), $initial_amount_format, $recurring_total_format, $desc);
$notes[] = sprintf(__('After the first payment of %1$s you will be billed %2$s %3$s.', 'wp-multisite-waas'), $initial_amount_format, $recurring_total_format, $desc);
} else {
$notes[] = sprintf(__('After this payment you will be billed %1$s %2$s.', 'wp-ultimo'), $recurring_total_format, $desc);
} // end if;
$notes[] = sprintf(__('After this payment you will be billed %1$s %2$s.', 'wp-multisite-waas'), $recurring_total_format, $desc);
}
} else {
$recurring_total_format = wu_format_currency($recurring_total, $payment->get_currency());
if ($is_trial_setup) {
$notes[] = sprintf(__('From that date, you will be billed %1$s %2$s.', 'wp-ultimo'), $recurring_total_format, $desc);
$notes[] = sprintf(__('From that date, you will be billed %1$s %2$s.', 'wp-multisite-waas'), $recurring_total_format, $desc);
} else {
$notes[] = sprintf(__('After this payment you will be billed %1$s.', 'wp-ultimo'), $desc);
} // end if;
} // end if;
} // end if;
$notes[] = sprintf(__('After this payment you will be billed %1$s.', 'wp-multisite-waas'), $desc);
}
}
}
$note = implode(' ', $notes);
@ -66,7 +66,7 @@ $subtotal = 0;
<form id="wu-paypal-express-confirm-form" class="wu-styling" action="<?php echo esc_url(add_query_arg('wu-confirm', 'paypal')); ?>" method="post">
<div class="wu-confirm-details" id="billing_info">
<h2><?php _e('Please confirm your payment', 'wp-ultimo'); ?></h2>
<h2><?php esc_html_e('Please confirm your payment', 'wp-multisite-waas'); ?></h2>
<div class="wu-text-sm wu-mb-4 wu-rounded-lg wu-border wu-border-gray-300 wu-bg-white wu-border-solid wu-shadow-sm wu-px-6 wu-py-4">
<span class="wu-font-semibold wu-block wu-text-gray-900">
@ -75,8 +75,8 @@ $subtotal = 0;
<div class="wu-text-gray-600">
<p>
<?php _e('PayPal Status:', 'wp-ultimo'); ?> <?php echo ucfirst(wu_get_isset($checkout_details, 'PAYERSTATUS', 'none')); ?>
<br><?php _e('Email:', 'wp-ultimo'); ?> <?php echo wu_get_isset($checkout_details, 'EMAIL', '--'); ?>
<?php esc_html_e('PayPal Status:', 'wp-multisite-waas'); ?> <?php echo ucfirst(wu_get_isset($checkout_details, 'PAYERSTATUS', 'none')); ?>
<br><?php esc_html_e('Email:', 'wp-multisite-waas'); ?> <?php echo wu_get_isset($checkout_details, 'EMAIL', '--'); ?>
</p>
</div>
</div>
@ -85,8 +85,8 @@ $subtotal = 0;
<table class="wu-w-full wu-mb-4">
<thead class="wu-bg-gray-100">
<tr>
<th class="wu-text-left wu-py-2 wu-px-4"><?php _e('Product', 'wp-ultimo'); ?></th>
<th class="wu-text-left wu-py-2 wu-px-4"><?php _e('Total', 'wp-ultimo'); ?></th>
<th class="wu-text-left wu-py-2 wu-px-4"><?php esc_html_e('Product', 'wp-multisite-waas'); ?></th>
<th class="wu-text-left wu-py-2 wu-px-4"><?php esc_html_e('Total', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
@ -112,21 +112,21 @@ $subtotal = 0;
<tfoot class="wu-bg-gray-100">
<tr>
<th class="wu-text-left wu-py-2 wu-px-4"><?php _e('Subtotal', 'wp-ultimo'); ?></th>
<th class="wu-text-left wu-py-2 wu-px-4"><?php esc_html_e('Subtotal', 'wp-multisite-waas'); ?></th>
<th class="wu-text-left wu-py-2 wu-px-4"><?php echo wu_format_currency($subtotal, $payment->get_currency()); ?></th>
</tr>
<?php foreach ($payment->get_tax_breakthrough() as $rate => $total) : ?>
<tr>
<th class="wu-text-left wu-py-2 wu-px-4"><?php printf(__('Tax (%s%%)', 'wp-ultimo'), $rate); ?></th>
<th class="wu-text-left wu-py-2 wu-px-4"><?php printf(__('Tax (%s%%)', 'wp-multisite-waas'), $rate); ?></th>
<th class="wu-text-left wu-py-2 wu-px-4"><?php echo wu_format_currency($total, $payment->get_currency()); ?></th>
</tr>
<?php endforeach; ?>
<tr>
<th class="wu-text-left wu-py-2 wu-px-4"><?php _e("Today's Grand Total", 'wp-ultimo'); ?></th>
<th class="wu-text-left wu-py-2 wu-px-4"><?php _e("Today's Grand Total", 'wp-multisite-waas'); ?></th>
<th class="wu-text-left wu-py-2 wu-px-4"><?php echo wu_format_currency($payment->get_total(), $payment->get_currency()); ?></th>
</tr>
</tfoot>
@ -157,7 +157,7 @@ $subtotal = 0;
<div class="wu_submit_button">
<button type="submit" class="button button button-primary btn-primary">
<?php esc_attr_e('Confirm', 'wp-ultimo'); ?>
<?php esc_attr_e('Confirm', 'wp-multisite-waas'); ?>
</button>
</div>

View File

@ -11,7 +11,7 @@
'product-fields',
$product_fields,
[
'title' => __('Products', 'wp-ultimo'),
'title' => __('Products', 'wp-multisite-waas'),
'views' => 'checkout/fields',
]
);

View File

@ -4,7 +4,7 @@
*
* @since 2.0.0
*/
//phpcs:disable WordPress.NamingConventions.PrefixAllGlobals
$duration = $duration ?: 1;
$duration_unit = $duration_unit ?: 'month';
@ -14,58 +14,39 @@ $product_variation = $product->get_as_variation($duration, $duration_unit);
if (false !== $product_variation) {
$product = $product_variation;
} // end if;
}
?>
<div class="wu-relative wu-flex wu-rounded-lg wu-border wu-border-gray-300 wu-bg-white wu-border-solid wu-shadow-sm wu-px-6 wu-py-4 wu-items-center wu-justify-between">
<div class="wu-flex wu-items-center">
<?php
if ($display_product_image) :
$image = $product->get_featured_image('thumbnail');
?>
<?php if ($display_product_image) : ?>
<?php $image = $product->get_featured_image('thumbnail'); ?>
<?php if ($image) : ?>
<div class="wu-w-thumb wu-h-thumb wu-rounded wu-overflow-hidden wu-text-center wu-inline-block wu-mr-4">
<img src="<?php echo esc_attr($image); ?>" class="wu-h-full">
</div>
<div class="wu-w-thumb wu-h-thumb wu-rounded wu-overflow-hidden wu-text-center wu-inline-block wu-mr-4">
<img src="<?php echo esc_attr($image); ?>" class="wu-h-full">
</div>
<?php endif; ?>
<?php endif; ?>
<div class="wu-text-sm">
<span class="wu-font-semibold wu-block wu-text-gray-900"><?php echo empty($name) ? esc_html($product->get_name()) : esc_html($name); ?></span>
<?php if ($display_product_description && $product->get_description()) : ?>
<div class="wu-text-gray-600">
<p class="sm:wu-inline-block wu-my-1"><?php echo esc_html($product->get_description()); ?></p>
</div>
<?php endif; ?>
<div class="wu-text-gray-600">
<p class="sm:wu-inline"><?php echo esc_html($product->get_price_description()); ?></p>
</div>
</div>
</div>
<?php if (! $parent || ! method_exists($parent, 'has_product')) : ?>
<div v-if="!($parent.has_product('<?php echo esc_js($product->get_id()); ?>') || $parent.has_product('<?php echo esc_js($product->get_slug()); ?>'))" class="wu-ml-2">
<a href="#" @click.prevent="$parent.add_product('<?php echo esc_js($product->get_id()); ?>')" class="button btn"><?php esc_html_e('Add to Cart', 'wp-multisite-waas'); ?></a>
</div>
<?php else : ?>
<div v-else class="wu-ml-2">
<a href="#" @click.prevent="$parent.remove_product('<?php echo esc_js($product->get_id()); ?>', '<?php echo esc_js($product->get_slug()); ?>')" class="button btn"><?php esc_html_e('Remove', 'wp-multisite-waas'); ?></a>
<input type="hidden" name="products[]" value="<?php echo esc_attr($product->get_id()); ?>">
</div>
<?php endif; ?>
<div class="wu-text-sm">
<span class="wu-font-semibold wu-block wu-text-gray-900"><?php echo empty($name) ? $product->get_name() : $name; ?></span>
<?php if ($display_product_description && $product->get_description()) : ?>
<div class="wu-text-gray-600">
<p class="sm:wu-inline-block wu-my-1">
<?php echo $product->get_description(); ?>
</p>
</div>
<?php endif; ?>
<div class="wu-text-gray-600">
<p class="sm:wu-inline">
<?php echo $product->get_price_description(); ?>
</p>
</div>
</div>
</div>
<div v-if="!($parent.has_product('<?php echo $product->get_id(); ?>') || $parent.has_product('<?php echo $product->get_slug(); ?>'))" class="wu-ml-2">
<a href="#" @click.prevent="$parent.add_product('<?php echo $product->get_id(); ?>')" class="button btn"><?php _e('Add to Cart', 'wp-ultimo'); ?></a>
</div>
<div v-else class="wu-ml-2">
<a href="#" @click.prevent="$parent.remove_product('<?php echo $product->get_id(); ?>', '<?php echo $product->get_slug(); ?>')" class="button btn"><?php _e('Remove', 'wp-ultimo'); ?></a>
<input type="hidden" name="products[]" value="<?php echo $product->get_id(); ?>">
</div>
<div
class="wu-absolute wu--inset-px wu-rounded-lg wu-border-solid wu-border-2 wu-pointer-events-none wu-top-0 wu-bottom-0 wu-right-0 wu-left-0"
:class="($parent.has_product('<?php echo $product->get_id(); ?>') || $parent.has_product('<?php echo $product->get_slug(); ?>'))? 'wu-border-blue-500' : 'wu-border-transparent'"
aria-hidden="true"
>
</div>
<div class="wu-absolute wu--inset-px wu-rounded-lg wu-border-solid wu-pointer-events-none wu-top-0 wu-bottom-0 wu-right-0 wu-left-0" :class="($parent.has_product('<?php echo esc_js($product->get_id()); ?>') || $parent.has_product('<?php echo esc_js($product->get_slug()); ?>')) ? 'wu-border-blue-500' : 'wu-border-transparent'" aria-hidden="true"></div>
</div>

View File

@ -9,7 +9,7 @@
<div v-show="!order" class="wu-bg-gray-100 wu-p-4 wu-text-center wu-border wu-border-solid wu-border-gray-300">
<?php _e('Generating Order Summary...', 'wp-ultimo'); ?>
<?php esc_html_e('Generating Order Summary...', 'wp-multisite-waas'); ?>
</div>
@ -22,31 +22,31 @@
<tr class="">
<th class="col-description">
<?php _e('Description', 'wp-ultimo'); ?>
<?php esc_html_e('Description', 'wp-multisite-waas'); ?>
</th>
<?php if ('simple' === $table_columns) : ?>
<th class="col-total-gross">
<?php _e('Subtotal', 'wp-ultimo'); ?>
<?php esc_html_e('Subtotal', 'wp-multisite-waas'); ?>
</th>
<?php else : ?>
<th class="col-total-net">
<?php _e('Net Total', 'wp-ultimo'); ?>
<?php esc_html_e('Net Total', 'wp-multisite-waas'); ?>
</th>
<th class="col-total-vat-percentage">
<?php _e('Discounts', 'wp-ultimo'); ?>
<?php esc_html_e('Discounts', 'wp-multisite-waas'); ?>
</th>
<th class="col-total-tax">
<?php _e('Tax', 'wp-ultimo'); ?>
<?php esc_html_e('Tax', 'wp-multisite-waas'); ?>
</th>
<th class="col-total-gross">
<?php _e('Gross Total', 'wp-ultimo'); ?>
<?php esc_html_e('Gross Total', 'wp-multisite-waas'); ?>
</th>
<?php endif; ?>
@ -61,7 +61,7 @@
<td class="" colspan="<?php echo esc_attr('simple' === $table_columns) ? 2 : 5; ?>" class="col-description">
<?php _e('No products in shopping cart.', 'wp-ultimo'); ?>
<?php esc_html_e('No products in shopping cart.', 'wp-multisite-waas'); ?>
</td>
@ -71,13 +71,13 @@
<td class="wu-py-2 col-description" v-show="line_item.recurring">
<?php printf(__('Subscription - %s', 'wp-ultimo'), '{{ line_item.title }}'); ?>
<?php printf(esc_html__('Subscription - %s', 'wp-multisite-waas'), '{{ line_item.title }}'); ?>
<small v-if="line_item.type == 'product'" class="wu-ml-3 wu-text-xs">
<a href="#" class="wu-no-underline" v-on:click.prevent="remove_product(line_item.product_id, line_item.product_slug)">
<?php _e('Remove', 'wp-ultimo'); ?>
<?php esc_html_e('Remove', 'wp-multisite-waas'); ?>
</a>
@ -93,7 +93,7 @@
<a href="#" class="wu-no-underline" v-on:click.prevent="remove_product(line_item.product_id, line_item.product_slug)">
<?php _e('Remove', 'wp-ultimo'); ?>
<?php esc_html_e('Remove', 'wp-multisite-waas'); ?>
</a>
@ -167,7 +167,7 @@
<td>
<?php _e('Discounts', 'wp-ultimo'); ?>
<?php esc_html_e('Discounts', 'wp-multisite-waas'); ?>
</td>
@ -183,7 +183,7 @@
<td>
<?php _e('Taxes', 'wp-ultimo'); ?>
<?php esc_html_e('Taxes', 'wp-multisite-waas'); ?>
</td>
@ -201,7 +201,7 @@
<td class="" colspan="<?php echo esc_attr('simple' === $table_columns) ? 1 : 4; ?>">
<strong><?php _e("Today's Grand Total", 'wp-ultimo'); ?></strong>
<strong><?php esc_html_e("Today's Grand Total", 'wp-multisite-waas'); ?></strong>
</td>
@ -224,7 +224,7 @@
<td class="" colspan="<?php echo esc_attr('simple' === $table_columns) ? 1 : 4; ?>">
<small>
<?php printf(__('Total in %1$s - end of trial period.', 'wp-ultimo'), '{{ $moment.unix(order.dates.date_trial_end).format(`LL`) }}'); ?>
<?php printf(esc_html__('Total in %1$s - end of trial period.', 'wp-multisite-waas'), '{{ $moment.unix(order.dates.date_trial_end).format(`LL`) }}'); ?>
</small>
</td>
@ -245,7 +245,7 @@
<li v-if="!order.has_trial && order.has_recurring">
<?php printf(__('Next fee of %1$s will be billed in %2$s.', 'wp-ultimo'), '{{ wu_format_money(order.totals.recurring.total) }}', '{{ $moment.unix(order.dates.date_next_charge).format(`LL`) }}'); ?>
<?php printf(esc_html__('Next fee of %1$s will be billed in %2$s.', 'wp-multisite-waas'), '{{ wu_format_money(order.totals.recurring.total) }}', '{{ $moment.unix(order.dates.date_next_charge).format(`LL`) }}'); ?>
</li>
@ -253,12 +253,12 @@
<?php
// translators: 1 is the discount name (e.g. Launch Promo). 2 is the coupon code (e.g PROMO10), 3 is the coupon amount and 4 is the discount total.
printf(__('Discount applied: %1$s - %2$s (%3$s) %4$s', 'wp-ultimo'), '{{ order.discount_code.name }}', '{{ order.discount_code.code }}', '{{ order.discount_code.discount_description }}', '{{ wu_format_money(-order.totals.total_discounts) }}');
printf(esc_html__('Discount applied: %1$s - %2$s (%3$s) %4$s', 'wp-multisite-waas'), '{{ order.discount_code.name }}', '{{ order.discount_code.code }}', '{{ order.discount_code.discount_description }}', '{{ wu_format_money(-order.totals.total_discounts) }}');
?>
<a class="wu-no-underline wu-ml-2" href="#" v-on:click.prevent="discount_code = ''">
<?php _e('Remove', 'wp-ultimo'); ?>
<?php esc_html_e('Remove', 'wp-multisite-waas'); ?>
</a>

View File

@ -24,12 +24,12 @@ defined('ABSPATH') || exit;
<?php foreach ($period_options as $index => $period_option) : ?>
<li class="wu-mx-2">
<a
:class="(duration == <?php echo $period_option['duration']; ?> && duration_unit == '<?php echo $period_option['duration_unit']; ?>') || (<?php echo json_encode(0 === $index); ?> && duration === '') ? 'wu-font-semibold active' : ''"
v-on:click.prevent="duration = <?php echo $period_option['duration']; ?>; duration_unit = '<?php echo $period_option['duration_unit']; ?>'"
<a
:class="(duration == <?php echo esc_attr($period_option['duration']); ?> && duration_unit == '<?php echo esc_attr($period_option['duration_unit']); ?>') || (<?php echo wp_json_encode(0 === $index); ?> && duration === '') ? 'wu-font-semibold active' : ''"
v-on:click.prevent="duration = <?php echo esc_attr($period_option['duration']); ?>; duration_unit = '<?php echo esc_attr($period_option['duration_unit']); ?>'"
href="#"
>
<?php echo $period_option['label']; ?>
<?php echo esc_html($period_option['label']); ?>
</a>
</li>

View File

@ -27,8 +27,8 @@ defined('ABSPATH') || exit;
<?php foreach ($period_options as $index => $period_option) : ?>
<li>
<a class="wu-text-center" :class="(duration == <?php echo $period_option['duration']; ?> && duration_unit == '<?php echo $period_option['duration_unit']; ?>') || (<?php echo json_encode(0 === $index); ?> && duration === '') ? 'active' : ''" v-on:click.prevent="duration = <?php echo $period_option['duration']; ?>; duration_unit = '<?php echo $period_option['duration_unit']; ?>'" href="#">
<?php echo $period_option['label']; ?>
<a class="wu-text-center" :class="(duration == <?php echo esc_html($period_option['duration']); ?> && duration_unit == '<?php echo esc_attr($period_option['duration_unit']); ?>') || (<?php echo wp_json_encode(0 === $index); ?> && duration === '') ? 'active' : ''" v-on:click.prevent="duration = <?php echo esc_attr($period_option['duration']); ?>; duration_unit = '<?php echo esc_attr($period_option['duration_unit']); ?>'" href="#">
<?php echo esc_html($period_option['label']); ?>
</a>
</li>

View File

@ -19,9 +19,9 @@ $first_recurring_product = array_reduce(
$products_to_reduce,
function ($chosen_product, $product) {
if ($product && $product->is_recurring() && false == $chosen_product) {
if ($product && $product->is_recurring() && ! $chosen_product) {
$chosen_product = $product;
} // end if;
}
return $chosen_product;
}
@ -32,8 +32,8 @@ $legacy_mode = array_reduce(
function ($all_have_same_duration, $product) use ($first_recurring_product) {
if ($product && $product->is_recurring()) {
$all_have_same_duration = $first_recurring_product->get_recurring_description() == $product->get_recurring_description();
} // end if;
$all_have_same_duration = $first_recurring_product->get_recurring_description() === $product->get_recurring_description();
}
return $all_have_same_duration;
}
@ -52,8 +52,8 @@ wp_add_inline_script(
window.wu_legacy_mode = %s;
',
json_encode($force_different_durations),
json_encode($legacy_mode)
wp_json_encode($force_different_durations),
wp_json_encode($legacy_mode)
),
'after'
);
@ -76,21 +76,21 @@ if (null !== $first_recurring_product) {
data.duration = %s;
} // end if;
}
if (!data.duration_unit && !wu_force_different_durations) {
data.duration_unit = %s;
} // end if;
}
return data;
});
",
json_encode($first_recurring_product->get_duration()),
json_encode($first_recurring_product->get_duration_unit())
wp_json_encode($first_recurring_product->get_duration()),
wp_json_encode($first_recurring_product->get_duration_unit())
),
'after'
);
@ -101,7 +101,7 @@ if (null !== $first_recurring_product) {
<div class="wu-text-center wu-bg-gray-100 wu-rounded wu-uppercase wu-font-semibold wu-text-xs wu-text-gray-700 wu-p-4">
<?php _e('No Products Found.', 'wp-ultimo'); ?>
<?php esc_html_e('No Products Found.', 'wp-multisite-waas'); ?>
</div>
@ -115,8 +115,8 @@ if (null !== $first_recurring_product) {
<div
id="plan-<?php echo esc_attr($product->get_id()); ?>"
class="<?php echo "wu-product-{$product->get_id()}"; ?> lift wu-plan plan-tier wu-flex-1 <?php echo esc_attr($product->is_featured_plan() ? 'callout' : ''); ?> wu-flex wu-flex-col wu-justify-between"
v-show="wu_force_different_durations || (duration && wu_legacy_mode) || (( (!duration) || duration == <?php echo $product->get_duration(); ?> && duration_unit == '<?php echo $product->get_duration_unit(); ?>' ) || <?php echo json_encode($product->get_pricing_type() !== 'paid'); ?>)"
class="<?php echo esc_attr("wu-product-{$product->get_id()}"); ?> lift wu-plan plan-tier wu-flex-1 <?php echo esc_attr($product->is_featured_plan() ? 'callout' : ''); ?> wu-flex wu-flex-col wu-justify-between"
v-show="wu_force_different_durations || (duration && wu_legacy_mode) || (( (!duration) || duration == <?php echo esc_attr($product->get_duration()); ?> && duration_unit == '<?php echo esc_attr($product->get_duration_unit()); ?>' ) || <?php echo wp_json_encode($product->get_pricing_type() !== 'paid'); ?>)"
>
<div class="wu-relative">
@ -130,7 +130,7 @@ if (null !== $first_recurring_product) {
/**
* Featured tag.
*/
echo apply_filters('wu_featured_plan_label', __('Featured Plan', 'wp-ultimo'), $product);
echo esc_html(apply_filters('wu_featured_plan_label', __('Featured Plan', 'wp-multisite-waas'), $product));
?>
@ -140,7 +140,7 @@ if (null !== $first_recurring_product) {
<h4 class="wp-ui-primary">
<?php echo $product->get_name(); ?>
<?php echo esc_html($product->get_name()); ?>
</h4>
@ -158,7 +158,7 @@ if (null !== $first_recurring_product) {
<span class="plan-price">
<?php _e('Free!', 'wp-ultimo'); ?>
<?php esc_html_e('Free!', 'wp-multisite-waas'); ?>
</span>
@ -178,7 +178,7 @@ if (null !== $first_recurring_product) {
<span class="plan-price">
<?php echo apply_filters('wu_plan_contact_us_price_line', __('--', 'wp-ultimo')); ?>
<?php echo esc_html(apply_filters('wu_plan_contact_us_price_line', __('--', 'wp-multisite-waas'))); ?>
</span>
@ -195,7 +195,7 @@ if (null !== $first_recurring_product) {
* Price display.
*/
$symbol_left = in_array(wu_get_setting('currency_position', '%s%v'), ['%s%v', '%s %v']);
$symbol_left = in_array(wu_get_setting('currency_position', '%s%v'), ['%s%v', '%s %v'], true);
?>
@ -203,19 +203,19 @@ if (null !== $first_recurring_product) {
<sup class="superscript">
<?php echo wu_get_currency_symbol($product->get_currency()); ?>
<?php esc_html(wu_get_currency_symbol($product->get_currency())); ?>
</sup>
<?php endif; ?>
<span class="plan-price" v-if="wu_force_different_durations || (duration == <?php echo $product->get_duration(); ?> && duration_unit == '<?php echo $product->get_duration_unit(); ?>')">
<span class="plan-price" v-if="wu_force_different_durations || (duration == <?php echo esc_attr($product->get_duration()); ?> && duration_unit == '<?php echo esc_attr($product->get_duration_unit()); ?>')">
<?php
$n = $product->get_amount();
echo str_replace(wu_get_currency_symbol(), '', wu_format_currency($n));
echo esc_html(str_replace(wu_get_currency_symbol(), '', wu_format_currency($n)));
?>
@ -227,21 +227,21 @@ if (null !== $first_recurring_product) {
if ( ! $price_variation) {
continue;
} // end if;
}
?>
<span class="plan-price" v-cloak v-if="duration == <?php echo $price_variation['duration']; ?> && duration_unit == '<?php echo $price_variation['duration_unit']; ?>'">
<span class="plan-price" v-cloak v-if="duration == <?php echo esc_attr($price_variation['duration']); ?> && duration_unit == '<?php echo esc_attr($price_variation['duration_unit']); ?>'">
<?php
$n = $price_variation ? $price_variation['monthly_amount'] : false;
if ($n) {
echo str_replace(wu_get_currency_symbol(), '', wu_format_currency($n));
echo esc_html(str_replace(wu_get_currency_symbol(), '', wu_format_currency($n)));
} else {
echo '--';
} // end if;
}
?>
@ -249,14 +249,14 @@ if (null !== $first_recurring_product) {
<?php endforeach; ?>
<sub v-if="1 == <?php echo $product->get_duration(); ?> && 'month' == '<?php echo $product->get_duration_unit(); ?>'">
<sub v-if="1 == <?php echo esc_attr($product->get_duration()); ?> && 'month' == '<?php echo $product->get_duration_unit(); ?>'">
<?php
/**
* Period Unit.
*/
$symbol = $product->is_recurring() ? __('/mo', 'wp-ultimo') : '';
$symbol = $product->is_recurring() ? __('/mo', 'wp-multisite-waas') : '';
echo (! $symbol_left ? wu_get_currency_symbol() : '') . ' ' . $symbol;
@ -304,27 +304,27 @@ if (null !== $first_recurring_product) {
* Display quarterly and Annually plans, to be hidden.
*/
$prices_total = [
3 => __('every 3 months', 'wp-ultimo'),
12 => __('yearly', 'wp-ultimo'),
3 => __('every 3 months', 'wp-multisite-waas'),
12 => __('yearly', 'wp-multisite-waas'),
];
foreach ($prices_total as $freq => $string) {
$price_variation = $product->get_price_variation($freq, 'month');
if ( ! $price_variation || $product->get_pricing_type() == 'free' || $product->get_pricing_type() == 'contact_us') {
echo "<li v-cloak v-show='duration == " . $freq . "' class='total-price total-price-$freq'>-</li>";
echo "<li v-cloak v-show='duration == " . esc_attr($freq) . "' class='total-price total-price-($freq)'>-</li>";
} else {
$text = sprintf(__('%1$s, billed %2$s', 'wp-ultimo'), wu_format_currency($price_variation['amount']), $string);
$text = sprintf(__('%1$s, billed %2$s', 'wp-multisite-waas'), wu_format_currency($price_variation['amount']), $string);
$extra_check_for_annual = '';
if (12 === $freq) {
$extra_check_for_annual = ' || (duration == "1" && duration_unit == "year")';
} // end if;
}
echo "<li v-cloak v-show='duration == " . $freq . $extra_check_for_annual . "' class='total-price total-price-$freq'>$text</li>";
} // end if;
} // end foreach;
}
}
?>
@ -337,14 +337,14 @@ if (null !== $first_recurring_product) {
<li class="wu-cta">
<button
v-if="<?php echo json_encode($product->get_pricing_type() !== 'contact_us'); ?>"
v-if="<?php echo wp_json_encode($product->get_pricing_type() !== 'contact_us'); ?>"
v-on:click="add_plan(<?php echo $product->get_id(); ?>)"
type="button"
name="products[]"
value="<?php echo $product->get_id(); ?>"
class="button button-primary button-next"
>
<?php _e('Select Plan', 'wp-ultimo'); ?>
<?php esc_html_e('Select Plan', 'wp-multisite-waas'); ?>
</button>
<button
@ -354,7 +354,7 @@ if (null !== $first_recurring_product) {
value="<?php echo $product->get_id(); ?>"
class="button button-primary button-next"
>
<?php _e('Select Plan', 'wp-ultimo'); ?>
<?php esc_html_e('Select Plan', 'wp-multisite-waas'); ?>
</button>
</li>

View File

@ -17,8 +17,8 @@ foreach ($products as $index => &$_product) {
unset($products[ $index ]);
$_product = $product_variation;
} // end if;
} // end foreach;
}
}
?>
<div class="">
@ -31,7 +31,7 @@ foreach ($products as $index => &$_product) {
id="wu-product-<?php echo $product->get_id(); ?>"
class="wu-relative wu-block wu-rounded-lg wu-border wu-border-gray-300 wu-bg-white wu-border-solid wu-shadow-sm wu-px-6 wu-py-4 wu-cursor-pointer hover:wu-border-gray-400 sm:wu-flex sm:wu-justify-between focus-within:wu-ring-1 focus-within:wu-ring-offset-2 focus-within:wu-ring-indigo-500">
<input v-if="<?php echo json_encode($product->get_pricing_type() !== 'contact_us'); ?>" v-on:click="$parent.add_plan(<?php echo $product->get_id(); ?>)" type="checkbox" name="products[]" value="<?php echo $product->get_id(); ?>" class="screen-reader-text wu-hidden">
<input v-if="<?php echo wp_json_encode($product->get_pricing_type() !== 'contact_us'); ?>" v-on:click="$parent.add_plan(<?php echo $product->get_id(); ?>)" type="checkbox" name="products[]" value="<?php echo $product->get_id(); ?>" class="screen-reader-text wu-hidden">
<input v-else v-on:click="$parent.open_url('<?php echo esc_url($product->get_contact_us_link()); ?>', '_blank');" type="checkbox" name="products[]" value="<?php echo $product->get_id(); ?>" class="screen-reader-text wu-hidden">

View File

@ -22,7 +22,7 @@ if ( ! defined('ABSPATH')) {
?>
<!-- This example requires Tailwind CSS v2.0+ -->
<nav aria-label="<?php esc_attr_e('Progress', 'wp-ultimo'); ?>">
<nav aria-label="<?php esc_attr_e('Progress', 'wp-multisite-waas'); ?>">
<ul class="wu-clean-steps wu-list-none md:wu-flex wu-p-0 wu--mx-2 wu-my-4">
@ -43,13 +43,13 @@ if ( ! defined('ABSPATH')) {
} elseif (array_search($current_step, array_column($steps, 'id')) > array_search($step_key, array_column($steps, 'id'))) {
$container_class = 'wu-opacity-50';
$color = 'blue';
} // end if;
}
?>
<li class="wu-py-0 md:wu-flex-1 wu-px-2 <?php echo esc_attr($container_class); ?>">
<span class="wu-h-2 wu-block wu-mb-2 wu-bg-<?php echo esc_attr($color); ?>-500">&nbsp;</span>
<span class="wu-block wu-text-2xs wu-font-medium wu-tracking-wide wu-uppercase wu-text-<?php echo esc_attr($color); ?>-500"><?php printf(__('Step %d', 'wp-ultimo'), $index + 1); ?></span>
<span class="wu-block wu-text-2xs wu-font-medium wu-tracking-wide wu-uppercase wu-text-<?php echo esc_attr($color); ?>-500"><?php printf(__('Step %d', 'wp-multisite-waas'), $index + 1); ?></span>
<span class="wu-block wu-text-sm wu-font-medium wu-text-<?php echo esc_attr($color); ?>-600"><?php echo $step['name']; ?></span>
</li>

View File

@ -38,7 +38,7 @@ if ( ! defined('ABSPATH')) {
$class = 'active';
} elseif (array_search($current_step, array_column($steps, 'id')) > array_search($step_key, array_column($steps, 'id'))) {
$class = 'done';
} // end if;
}
?>

View File

@ -22,7 +22,7 @@ if ( ! defined('ABSPATH')) {
?>
<!-- This example requires Tailwind CSS v2.0+ -->
<nav aria-label="<?php esc_attr_e('Progress', 'wp-ultimo'); ?>">
<nav aria-label="<?php esc_attr_e('Progress', 'wp-multisite-waas'); ?>">
<ul class="wu-minimal-steps">
@ -41,13 +41,13 @@ if ( ! defined('ABSPATH')) {
$class = 'step-current';
} elseif (array_search($current_step, array_column($steps, 'id')) > array_search($step_key, array_column($steps, 'id'))) {
$class = 'step-done';
} // end if;
}
?>
<li class="<?php echo esc_attr($class); ?>">
<span class="wu-minimal-steps-bar">&nbsp;</span>
<span class="wu-minimal-steps-step-count"><?php printf(__('Step %d', 'wp-ultimo'), $index + 1); ?></span>
<span class="wu-minimal-steps-step-count"><?php printf(__('Step %d', 'wp-multisite-waas'), $index + 1); ?></span>
<span class="wu-minimal-steps-step-label"><?php echo $step['name']; ?></span>
</li>

View File

@ -8,6 +8,7 @@
* See more here: https://help.wpultimo.com/article/335-template-overrides.
*
* @since 2.0.0
* @package WP_Ultimo/Views
* @param array $products List of product objects.
* @param string $name ID of the field.
* @param string $label The field label.
@ -23,7 +24,7 @@ if (isset($should_display) && ! $should_display) {
<?php
return;
} // end if;
}
$sites = array_map('wu_get_site', $sites ?? []);
@ -39,110 +40,114 @@ $customer_sites = isset($customer_sites) ? array_map('intval', $customer_sites)
<ul id="wu-site-template-filter" class="wu-bg-white wu-border-solid wu-border wu-border-gray-300 wu-shadow-sm wu-p-4 wu-flex wu-rounded wu-relative wu-m-0 wu-mb-4 wu-list-none">
<li class="wu-site-template-filter-all wu-mx-2 wu-my-0">
<a
href="#"
data-category=""
:class="$parent.template_category === '' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = ''"
>
<?php _e('All', 'wp-ultimo'); ?>
</a>
</li>
<?php if ( ! empty($customer_sites)) : ?>
<li class="wu-site-template-filter-<?php echo esc_attr(sanitize_title($customer_sites_category)); ?> wu-mx-2 wu-my-0">
<a
href="#"
data-category="<?php echo esc_attr($customer_sites_category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($customer_sites_category); ?>' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($customer_sites_category); ?>'"
><?php echo $customer_sites_category; ?></a>
</li>
<?php endif; ?>
<?php if (isset($categories) && $categories) : ?>
<?php foreach ($categories as $category) : ?>
<li class="wu-site-template-filter-<?php echo esc_attr(sanitize_title($category)); ?> wu-mx-2 wu-my-0">
<li class="wu-site-template-filter-all wu-mx-2 wu-my-0">
<a
href="#"
data-category="<?php echo esc_attr($category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($category); ?>' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($category); ?>'"
><?php echo $category; ?></a>
href="#"
data-category=""
:class="$parent.template_category === '' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = ''"
>
<?php esc_html_e('All', 'wp-multisite-waas'); ?>
</a>
</li>
<?php endforeach; ?>
<?php if ( ! empty($customer_sites)) : ?>
<?php endif; ?>
<li class="wu-site-template-filter-<?php echo esc_attr(sanitize_title($customer_sites_category)); ?> wu-mx-2 wu-my-0">
<a
href="#"
data-category="<?php echo esc_attr($customer_sites_category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($customer_sites_category); ?>' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($customer_sites_category); ?>'"
><?php echo esc_html($customer_sites_category); ?></a>
</li>
<?php endif; ?>
<?php if (isset($categories) && $categories) : ?>
<?php foreach ($categories as $category) : ?>
<li class="wu-site-template-filter-<?php echo esc_attr(sanitize_title($category)); ?> wu-mx-2 wu-my-0">
<a
href="#"
data-category="<?php echo esc_attr($category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($category); ?>' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($category); ?>'"
>
<?php echo esc_html($category); ?></a>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
<div id="wu-site-template-container-grid" class="wu-grid wu-grid-cols-1 sm:wu-grid-cols-2 md:wu-grid-cols-<?php echo $cols ?? '3'; ?> wu-gap-4">
<?php foreach ($sites as $site_template) : ?>
<div id="wu-site-template-container-grid" class="wu-grid wu-grid-cols-1 sm:wu-grid-cols-2 md:wu-grid-cols-<?php echo esc_attr($cols ?? '3'); ?> wu-gap-4">
<?php
if ($site_template->get_type() !== 'site_template' && ! in_array($site_template->get_id(), $customer_sites, true)) {
continue; }
?>
<?php foreach ($sites as $site_template) : ?>
<?php $is_template = $site_template->get_type() === 'site_template'; ?>
<?php
if ($site_template->get_type() !== 'site_template' && ! in_array($site_template->get_id(), $customer_sites, true)) {
continue; }
?>
<?php $categories = array_merge($site_template->get_categories(), ! $is_template ? [$customer_sites_category] : []); ?>
<?php $is_template = $site_template->get_type() === 'site_template'; ?>
<div
id="wu-site-template-<?php echo esc_attr($site_template->get_id()); ?>"
class="wu-bg-white wu-border-solid wu-border wu-border-gray-300 wu-shadow-sm wu-p-4 wu-rounded wu-relative"
v-show="!$parent.template_category || <?php echo esc_attr(json_encode($categories)); ?>.join(',').indexOf($parent.template_category) > -1"
v-cloak
>
<?php $categories = array_merge($site_template->get_categories(), ! $is_template ? [$customer_sites_category] : []); ?>
<div class="wu-site-template-image-container wu-relative">
<div
id="wu-site-template-<?php echo esc_attr($site_template->get_id()); ?>"
class="wu-bg-white wu-border-solid wu-border wu-border-gray-300 wu-shadow-sm wu-p-4 wu-rounded wu-relative"
<a
title="<?php esc_attr_e('View Template Preview', 'wp-ultimo'); ?>"
class="wu-site-template-selector wu-cursor-pointer wu-no-underline"
<?php echo $is_template ? $site_template->get_preview_url_attrs() : sprintf('href="%s" target="_blank"', $site_template->get_active_site_url()); ?>
v-show="!$parent.template_category || <?php echo esc_attr(wp_json_encode($categories)); ?>.join(',').indexOf($parent.template_category) > -1"
v-cloak
>
<img class="wu-site-template-image wu-w-full wu-border-solid wu-border wu-border-gray-300 wu-mb-4 wu-bg-white" src="<?php echo esc_attr($site_template->get_featured_image()); ?>" alt="<?php echo $site_template->get_title(); ?>">
<div class="wu-site-template-image-container wu-relative">
</a>
<a
title="<?php esc_attr_e('View Template Preview', 'wp-multisite-waas'); ?>"
class="wu-site-template-selector wu-cursor-pointer wu-no-underline"
<?php echo $is_template ? $site_template->get_preview_url_attrs() : sprintf('href="%s" target="_blank"', $site_template->get_active_site_url()); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
>
</div>
<h3 class="wu-site-template-title wu-text-lg wu-font-semibold">
</a>
<?php echo $site_template->get_title(); ?>
</div>
</h3>
<h3 class="wu-site-template-title wu-text-lg wu-font-semibold">
<p class="wu-site-template-description wu-text-sm">
<?php echo $site_template->get_description(); ?>
<?php echo esc_html($site_template->get_title()); ?>
</p>
</h3>
<div class="wu-mt-4">
<p class="wu-site-template-description wu-text-sm">
<button v-on:click.prevent="$parent.template_id = <?php echo esc_attr($site_template->get_id()); ?>" type="button" class="wu-site-template-selector button btn button-primary btn-primary wu-w-full wu-text-center wu-cursor-pointer">
<span v-if="$parent.template_id == <?php echo esc_attr($site_template->get_id()); ?>"><?php _e('Selected', 'wp-ultimo'); ?></span>
<?php echo esc_html($site_template->get_description()); ?>
<span v-else><?php _e('Select', 'wp-ultimo'); ?></span>
</p>
</button>
<div class="wu-mt-4">
</div>
<button v-on:click.prevent="$parent.template_id = <?php echo esc_attr($site_template->get_id()); ?>" type="button" class="wu-site-template-selector button btn button-primary btn-primary wu-w-full wu-text-center wu-cursor-pointer">
</div>
<span v-if="$parent.template_id == <?php echo esc_attr($site_template->get_id()); ?>"><?php esc_html_e('Selected', 'wp-multisite-waas'); ?></span>
<?php endforeach; ?>
<span v-else><?php esc_html_e('Select', 'wp-multisite-waas'); ?></span>
</button>
</div>
</div>
<?php endforeach; ?>
</div>

View File

@ -2,26 +2,28 @@
/**
* Template File: Basic Pricing Table.
*
* To see what methods are available on the product variable, @see inc/models/class-products.php.
* To see what methods are available on the product variable, @param array $products List of product objects.
*
* @param string $name ID of the field.
* @param string $label The field label.
*
* @see inc/models/class-products.php.
*
* This template can also be overridden using template overrides.
* See more here: https://help.wpultimo.com/article/335-template-overrides.
*
* @since 2.0.0
* @param array $products List of product objects.
* @param string $name ID of the field.
* @param string $label The field label.
* @package WP_Ultimo/Views
*/
// Exit if accessed directly
defined('ABSPATH') || exit;
if ( ! $should_display) {
if ( ! $should_display ) {
echo '<div></div>';
return;
} // end if;
}
$sites = array_map('wu_get_site', $sites ?? []);
$categories ??= [];
@ -32,234 +34,232 @@ $customer_sites = isset($customer_sites) ? array_map('intval', $customer_sites)
?>
<?php if (empty($sites)) : ?>
<?php if ( empty($sites) ) : ?>
<div
class="wu-text-center wu-bg-gray-100 wu-rounded wu-uppercase wu-font-semibold wu-text-xs wu-text-gray-700 wu-p-4"
>
<?php _e('No Site Templates Found.', 'wp-ultimo'); ?>
</div>
<div class="wu-text-center wu-bg-gray-100 wu-rounded wu-uppercase wu-font-semibold wu-text-xs wu-text-gray-700 wu-p-4">
<?php esc_html_e('No Site Templates Found.', 'wp-multisite-waas'); ?>
</div>
<?php else : ?>
<div class="themes-php wu-styling">
<div class="themes-php wu-styling">
<div class="wrap wu-template-selection">
<div class="wrap wu-template-selection">
<?php
<?php
/**
* Allow developers to hide the title.
*/
if (apply_filters('wu_step_template_display_header', true)) :
/**
* Allow developers to hide the title.
*/
if ( apply_filters('wu_step_template_display_header', true) ) :
?>
?>
<h2>
<h2>
<?php _e('Pick your Template', 'wp-ultimo'); ?>
<?php esc_html_e('Pick your Template', 'wp-multisite-waas'); ?>
<span class="title-count theme-count">
<span class="title-count theme-count">
<?php echo count($sites); ?>
</span>
<?php echo count($sites); ?>
</span>
</h2>
<?php endif; ?>
<div class="wp-filter">
<div class="wp-filter-responsive">
<h4><?php _e('Template Categories', 'wp-ultimo'); ?></h4>
<select class="">
<option value="">
<?php _e('All Templates', 'wp-ultimo'); ?>
</option>
<?php if ( ! empty($customer_sites)) : ?>
<option value="<?php echo esc_attr($customer_sites_category); ?>">
<?php echo $customer_sites_category; ?>
</option>
</h2>
<?php endif; ?>
<?php foreach ($categories as $category) : ?>
<div class="wp-filter">
<option value="<?php echo esc_attr($category); ?>">
<?php echo $category; ?>
</option>
<div class="wp-filter-responsive">
<?php endforeach; ?>
<h4><?php esc_html_e('Template Categories', 'wp-multisite-waas'); ?></h4>
</select>
<select class="">
</div>
<option value="">
<ul class="filter-links wp-filter-template">
<?php esc_html_e('All Templates', 'wp-multisite-waas'); ?>
<li class="selector-inactive">
</option>
<a
href="#"
data-category=""
:class="$parent.template_category === '' ? 'current' : ''"
v-on:click.prevent="$parent.template_category = ''"
>
<?php _e('All Templates', 'wp-ultimo'); ?>
</a>
<?php if ( ! empty($customer_sites) ) : ?>
</li>
<option value="<?php echo esc_attr($customer_sites_category); ?>">
<?php if ( ! empty($customer_sites)) : ?>
<li class="selector-inactive">
<?php echo esc_html($customer_sites_category); ?>
<a
href="#"
data-category="<?php echo esc_attr($customer_sites_category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($customer_sites_category); ?>' ? 'current' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($customer_sites_category); ?>'"
>
<?php echo $customer_sites_category; ?>
</a>
</option>
</li>
<?php endif; ?>
<?php endif; ?>
<?php foreach ( $categories as $category ) : ?>
<?php foreach ($categories as $category) : ?>
<option value="<?php echo esc_attr($category); ?>">
<li class="selector-inactive">
<a
href="#"
data-category="<?php echo esc_attr($category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($category); ?>' ? 'current' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($category); ?>'"
>
<?php echo $category; ?>
</a>
<?php echo esc_html($category); ?>
</li>
</option>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
</select>
</div>
</div>
<div class="theme-browser rendered">
<ul class="filter-links wp-filter-template">
<div class="wu-grid wu-grid-cols-1 sm:wu-grid-cols-2 md:wu-grid-cols-<?php echo $cols; ?> wu-gap-4 wp-clearfix">
<li class="selector-inactive">
<?php $i = 0; foreach ($sites as $site) : ?>
<a
href="#"
data-category=""
:class="$parent.template_category === '' ? 'current' : ''"
v-on:click.prevent="$parent.template_category = ''"
>
<?php
if ($site->get_type() !== 'site_template' && ! in_array($site->get_id(), $customer_sites, true)) {
continue; }
?>
<?php esc_html_e('All Templates', 'wp-multisite-waas'); ?>
<?php $is_template = $site->get_type() === 'site_template'; ?>
</a>
<?php $categories = array_merge($site->get_categories(), ! $is_template ? [$customer_sites_category] : []); ?>
</li>
<div
class="theme"
tabindex="<?php echo $i; ?>"
aria-describedby="<?php echo $site->get_id(); ?>-action <?php echo $site->get_id(); ?>-name"
data-slug="<?php echo $site->get_id(); ?>"
v-show="!$parent.template_category || <?php echo esc_attr(json_encode($categories)); ?>.join(',').indexOf($parent.template_category) > -1"
v-cloak
>
<?php if ( ! empty($customer_sites) ) : ?>
<div class="theme-screenshot">
<li class="selector-inactive">
<img
src="<?php echo $site->get_featured_image(); ?>"
alt="<?php echo $site->get_title(); ?>"
>
<a
href="#"
data-category="<?php echo esc_attr($customer_sites_category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($customer_sites_category); ?>' ? 'current' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($customer_sites_category); ?>'"
>
<?php echo esc_html($customer_sites_category); ?>
</a>
</li>
<?php endif; ?>
<?php foreach ( $categories as $category ) : ?>
<li class="selector-inactive">
<a
href="#"
data-category="<?php echo esc_attr($category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($category); ?>' ? 'current' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($category); ?>'"
>
<?php echo esc_html($category); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<a
<?php echo $is_template ? $site->get_preview_url_attrs() : sprintf('href="%s" target="_blank"', $site->get_active_site_url()); ?>
class="more-details"
id="<?php echo $site->get_id(); ?>-action"
>
<div class="theme-browser rendered">
<?php $is_template ? _e('View Template', 'wp-ultimo') : _e('View Site', 'wp-ultimo'); ?>
</a>
<div class="wu-grid wu-grid-cols-1 sm:wu-grid-cols-2 md:wu-grid-cols-<?php echo esc_attr($cols); ?> wu-gap-4 wp-clearfix">
<div class="wu-flex theme-name-header wu-items-center wu-relative">
<?php
$i = 0;
foreach ( $sites as $site ) :
?>
<h2 class="theme-name wu-flex-grow wu-h-full" id="<?php echo $site->get_id(); ?>-name">
<?php
if ( $site->get_type() !== 'site_template' && ! in_array($site->get_id(), $customer_sites, true) ) {
continue;
}
?>
<?php echo $site->get_title(); ?>
</h2>
<?php $is_template = $site->get_type() === 'site_template'; ?>
<div class="theme-actions wu-flex">
<?php $categories = array_merge($site->get_categories(), ! $is_template ? [$customer_sites_category] : []); ?>
<button
class="button button-primary"
type="button"
v-on:click.prevent="$parent.template_id = <?php echo esc_attr($site->get_id()); ?>"
>
<div
class="theme"
tabindex="<?php echo esc_attr($i); ?>"
aria-describedby="<?php echo esc_attr($site->get_id()); ?>-action <?php echo esc_attr($site->get_id()); ?>-name"
data-slug="<?php echo esc_attr($site->get_id()); ?>"
v-show="!$parent.template_category || <?php echo esc_attr(wp_json_encode($categories)); ?>.join(',').indexOf($parent.template_category) > -1"
v-cloak
>
<span v-if="$parent.template_id == <?php echo esc_attr($site->get_id()); ?>"><?php _e('Selected', 'wp-ultimo'); ?></span>
<div class="theme-screenshot">
<span v-else><?php _e('Select', 'wp-ultimo'); ?></span>
<img
src="<?php echo esc_url($site->get_featured_image()); ?>"
alt="<?php echo esc_attr($site->get_title()); ?>"
>
</div>
</button>
<a
<?php echo $is_template ? $site->get_preview_url_attrs() : sprintf('href="%s" target="_blank"', $site->get_active_site_url()); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
class="more-details"
id="<?php echo esc_attr($site->get_id()); ?>-action"
>
<?php $is_template ? esc_html_e('View Template', 'wp-multisite-waas') : esc_html_e('View Site', 'wp-multisite-waas'); ?>
</a>
<div class="wu-flex theme-name-header wu-items-center wu-relative">
<h2 class="theme-name wu-flex-grow wu-h-full"
id="<?php echo esc_attr($site->get_id()); ?>-name">
<?php echo esc_html($site->get_title()); ?>
</h2>
<div class="theme-actions wu-flex">
<button
class="button button-primary"
type="button"
v-on:click.prevent="$parent.template_id = <?php echo esc_attr($site->get_id()); ?>"
>
<span v-if="$parent.template_id == <?php echo esc_attr($site->get_id()); ?>"><?php esc_html_e('Selected', 'wp-multisite-waas'); ?></span>
<span v-else><?php esc_html_e('Select', 'wp-multisite-waas'); ?></span>
</button>
</div>
</div>
</div>
<?php
++$i;
endforeach;
?>
</div>
</div>
</div>
<div class="theme-overlay"></div>
<?php
++$i;
endforeach;
?>
<p class="no-themes">
<?php esc_html_e('No Templates Found', 'wp-multisite-waas'); ?>
</p>
</div>
</div>
<div class="theme-overlay"></div>
<p class="no-themes">
<?php _e('No Templates Found', 'wp-ultimo'); ?>
</p>
</div>
</div>
<?php endif; ?>

View File

@ -20,8 +20,7 @@ defined('ABSPATH') || exit;
if ( ! $should_display) {
return;
} // end if;
}
$sites = array_map('wu_get_site', $sites ?? []);
$categories ??= [];
@ -35,107 +34,103 @@ $customer_sites = isset($customer_sites) ? array_map('intval', $customer_sites)
<ul id="wu-site-template-filter">
<li class="wu-site-template-filter-all">
<a
href="#"
data-category=""
:class="$parent.template_category === '' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = ''"
>
<?php _e('All', 'wp-ultimo'); ?>
</a>
</li>
<?php if ( ! empty($customer_sites)) : ?>
<li class="wu-site-template-filter-<?php echo esc_attr(sanitize_title($customer_sites_category)); ?>">
<a
href="#"
data-category="<?php echo esc_attr($customer_sites_category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($customer_sites_category); ?>' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($customer_sites_category); ?>'"
><?php echo $customer_sites_category; ?></a>
</li>
<?php endif; ?>
<?php if (isset($categories) && $categories) : ?>
<?php foreach ($categories as $category) : ?>
<li class="wu-site-template-filter-<?php echo esc_attr(sanitize_title($category)); ?>">
<li class="wu-site-template-filter-all">
<a
href="#"
data-category="<?php echo esc_attr($category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($category); ?>' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($category); ?>'"
><?php echo $category; ?></a>
href="#"
data-category=""
:class="$parent.template_category === '' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = ''"
>
<?php esc_html_e('All', 'wp-multisite-waas'); ?>
</a>
</li>
<?php endforeach; ?>
<?php if ( ! empty($customer_sites)) : ?>
<?php endif; ?>
<li class="wu-site-template-filter-<?php echo esc_attr(sanitize_title($customer_sites_category)); ?>">
<a
href="#"
data-category="<?php echo esc_attr($customer_sites_category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($customer_sites_category); ?>' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($customer_sites_category); ?>'"
>
<?php echo esc_html($customer_sites_category); ?></a>
</li>
<?php endif; ?>
<?php if (isset($categories) && $categories) : ?>
<?php foreach ($categories as $category) : ?>
<li class="wu-site-template-filter-<?php echo esc_attr(sanitize_title($category)); ?>">
<a
href="#"
data-category="<?php echo esc_attr($category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($category); ?>' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($category); ?>'"
>
<?php echo esc_html($category); ?></a>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
<div id="wu-site-template-container-grid">
<?php foreach ($sites as $site_template) : ?>
<?php foreach ($sites as $site_template) : ?>
<?php
if ($site_template->get_type() !== 'site_template' && ! in_array($site_template->get_id(), $customer_sites, true)) {
continue; }
?>
<?php
if ($site_template->get_type() !== 'site_template' && ! in_array($site_template->get_id(), $customer_sites, true)) {
continue; }
?>
<?php $is_template = $site_template->get_type() === 'site_template'; ?>
<?php $is_template = $site_template->get_type() === 'site_template'; ?>
<?php $categories = array_merge($site_template->get_categories(), ! $is_template ? [$customer_sites_category] : []); ?>
<?php $categories = array_merge($site_template->get_categories(), ! $is_template ? [$customer_sites_category] : []); ?>
<div
id="wu-site-template-<?php echo esc_attr($site_template->get_id()); ?>"
v-show="!$parent.template_category || <?php echo esc_attr(json_encode($categories)); ?>.join(',').indexOf($parent.template_category) > -1"
v-cloak
>
<div
id="wu-site-template-<?php echo esc_attr($site_template->get_id()); ?>"
v-show="!$parent.template_category || <?php echo esc_attr(wp_json_encode($categories)); ?>.join(',').indexOf($parent.template_category) > -1"
v-cloak
>
<img class="wu-site-template-image" src="<?php echo esc_attr($site_template->get_featured_image()); ?>" alt="<?php echo $site_template->get_title(); ?>">
<img class="wu-site-template-image" src="<?php echo esc_attr($site_template->get_featured_image()); ?>" alt="<?php echo esc_attr($site_template->get_title()); ?>">
<h3 class="wu-site-template-title">
<h3 class="wu-site-template-title">
<?php echo esc_html($site_template->get_title()); ?>
</h3>
<?php echo $site_template->get_title(); ?>
<p class="wu-site-template-description">
<?php echo esc_html($site_template->get_description()); ?>
</p>
</h3>
<div class="wu-site-template-preview-block">
<p class="wu-site-template-description">
<a class="wu-site-template-selector" <?php echo $site_template->get_preview_url_attrs(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php esc_html_e('View Template Preview', 'wp-multisite-waas'); ?>
</a>
<?php echo $site_template->get_description(); ?>
</div>
</p>
<label for="wu-site-template-id-<?php echo esc_attr($site_template->get_id()); ?>">
<div class="wu-site-template-preview-block">
<input id="wu-site-template-id-<?php echo esc_attr($site_template->get_id()); ?>" type="radio" name="template_id" v-model="$parent.template_id" value="<?php echo esc_attr($site_template->get_id()); ?>" />
<a class="wu-site-template-selector" <?php echo $site_template->get_preview_url_attrs(); ?>>
<a class="wu-site-template-selector" @click.prevent="" href="#">
<?php _e('View Template Preview', 'wp-ultimo'); ?>
<?php esc_html_e('Select this Template', 'wp-multisite-waas'); ?>
</a>
</a>
</div>
</label>
<label for="wu-site-template-id-<?php echo esc_attr($site_template->get_id()); ?>">
</div>
<input id="wu-site-template-id-<?php echo esc_attr($site_template->get_id()); ?>" type="radio" name="template_id" v-model="$parent.template_id" value="<?php echo esc_attr($site_template->get_id()); ?>" />
<a class="wu-site-template-selector" @click.prevent="" href="#">
<?php _e('Select this Template', 'wp-ultimo'); ?>
</a>
</label>
</div>
<?php endforeach; ?>
<?php endforeach; ?>
</div>

View File

@ -44,13 +44,13 @@
<div class="">
<div class="wu-block wu-my-1 wu-text-base wu-font-semibold">
<?php echo $user->display_name; ?>
<?php echo esc_html($user->display_name); ?>
</div>
<div class="wu-block wu-my-2">
<a href="mailto:<?php echo esc_attr($user->user_email); ?>" class="wu-no-underline" <?php echo wu_tooltip_text(__('Send an email to this customer.', 'wp-ultimo')); ?>>
<?php echo $user->user_email; ?>
<a href="mailto:<?php echo esc_attr($user->user_email); ?>" class="wu-no-underline" <?php echo wu_tooltip_text(esc_html__('Send an email to this customer.', 'wp-multisite-waas')); ?>>
<?php echo esc_html($user->user_email); ?>
</a>
</div>
@ -62,16 +62,16 @@
<a
href="<?php echo \WP_Ultimo\User_Switching::get_instance()->render($user->ID); ?>"
class="button wu-w-full <?php echo \WP_Ultimo\User_Switching::get_instance()->check_user_switching_is_activated() ? '' : 'wubox'; ?> wu-block wu-text-center"
title="<?php echo \WP_Ultimo\User_Switching::get_instance()->check_user_switching_is_activated() ? '' : __('Install User Switching', 'wp-ultimo'); ?>"
title="<?php echo \WP_Ultimo\User_Switching::get_instance()->check_user_switching_is_activated() ? '' : esc_attr__('Install User Switching', 'wp-multisite-waas'); ?>"
>
<?php _e('Switch To &rarr;', 'wp-ultimo'); ?>
<?php esc_html_e('Switch To &rarr;', 'wp-multisite-waas'); ?>
</a>
<?php else : ?>
<button class="button wu-w-full" disabled="disabled">
<span <?php echo wu_tooltip_text(__('Switching to your own account is not possible.', 'wp-ultimo')); ?>>
<?php _e('Switch To &rarr;', 'wp-ultimo'); ?>
<span <?php echo wu_tooltip_text(esc_html__('Switching to your own account is not possible.', 'wp-multisite-waas')); ?>>
<?php esc_html_e('Switch To &rarr;', 'wp-multisite-waas'); ?>
</span>
</button>
@ -79,7 +79,7 @@
<a href="<?php echo get_edit_user_link($user->ID); ?>" target="_blank" class="wu-w-full wu-block wu-text-center wu-no-underline wu-mt-4">
<?php _e('Visit Profile &rarr;', 'wp-ultimo'); ?>
<?php esc_html_e('Visit Profile &rarr;', 'wp-multisite-waas'); ?>
</a>

View File

@ -6,20 +6,14 @@
*/
?>
<div id="dashboard-filters" class="wp-filter wu-filter">
<ul class="filter-links">
<?php foreach ($views as $tab => $view) : ?>
<li class="<?php echo $tab === $active_tab ? 'current' : ''; ?>">
<a href="<?php echo esc_attr($view['url']); ?>"
class="<?php echo $tab === $active_tab ? 'current wu-font-medium' : ''; ?> wu-loader">
<?php echo $view['label']; ?>
</a>
</li>
<?php endforeach; ?>
<?php foreach ($views as $tab => $view) : ?>
<li class="<?php echo esc_attr($tab === $active_tab ? 'current' : ''); ?>">
<a href="<?php echo esc_url($view['url']); ?>" class="wu-loader <?php echo esc_attr($tab === $active_tab ? 'current wu-font-medium' : ''); ?>">
<?php echo esc_html($view['label']); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<ul class="filter-links sm:wu-float-right sm:wu-w-1/2 lg:wu-w-1/4 wu--mx-2 wu-block sm:wu-inline-block">
@ -29,38 +23,29 @@
id="wu-date-range"
style="min-height: 28px;"
class="wu-border-0 wu-border-l wu-border-gray-300 wu-bg-gray-100 wu-w-full wu-text-right wu-py-3 wu-outline-none wu-rounded-none"
placeholder="Loading..."
placeholder="<?php esc_html_e('Loading...'); ?>'"
>
</li>
</ul>
<ul class="wu-hidden md:wu-inline-block filter-links sm:wu-float-right md:wu-mr-6">
<?php foreach ($preset_options as $slug => $preset) : ?>
<?php
$link = add_query_arg(
$link = add_query_arg(
[
'start_date' => $preset['start_date'],
'end_date' => $preset['end_date'],
'preset' => $slug,
]
);
$request_slug = wu_request('preset', 'none');
?>
<li class="<?php echo $slug === $request_slug ? 'current' : ''; ?>">
<a href="<?php echo esc_attr($link); ?>"
class="<?php echo $slug === $request_slug ? 'current wu-font-medium' : ''; ?> wu-loader">
<?php echo $preset['label']; ?>
</a>
</li>
<?php endforeach; ?>
<li class="<?php echo esc_attr($slug === $request_slug ? 'current' : ''); ?>">
<a href="<?php echo esc_url($link); ?>" class="wu-loader <?php echo esc_attr($slug === $request_slug ? 'current wu-font-medium' : ''); ?>">
<?php echo esc_html($preset['label']); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>

View File

@ -7,37 +7,37 @@
?>
<div class="wu-styling">
<div class="wu-widget-inset">
<div class="wu-widget-inset">
<?php
<?php
$data = [];
$slug = 'signup_countries';
$headers = [
__('Country', 'wp-ultimo'),
__('Customer Count', 'wp-ultimo'),
];
$data = [];
$slug = 'signup_countries';
$headers = [
__('Country', 'wp-multisite-waas'),
__('Customer Count', 'wp-multisite-waas'),
];
foreach ($countries as $country_code => $count) {
$line = [
wu_get_country_name($country_code),
$count,
];
foreach ($countries as $country_code => $count) {
$line = [
wu_get_country_name($country_code),
$count,
];
$data[] = $line;
} // end foreach;
$data[] = $line;
}
$page->render_csv_button(
[
'headers' => $headers,
'data' => $data,
'slug' => $slug,
]
);
$page->render_csv_button(
[
'headers' => $headers,
'data' => $data,
'slug' => $slug,
]
);
?>
?>
</div>
</div>
</div>
@ -45,68 +45,61 @@ $page->render_csv_button(
<div class="wu-advanced-filters wu--mx-3 wu--mb-3 wu-mt-3">
<table class="wp-list-table widefat fixed striped wu-border-t-0 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<th><?php _e('Country', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('Customer Count', 'wp-ultimo'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($countries as $country_code => $count) : ?>
<table class="wp-list-table widefat fixed striped wu-border-t-0 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<td>
<th><?php esc_html_e('Country', 'wp-multisite-waas'); ?></th>
<th class="wu-text-right"><?php esc_html_e('Customer Count', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($countries as $country_code => $count) : ?>
<tr>
<td>
<?php
printf(
'<span class="wu-flag-icon wu-w-5 wu-mr-1" %s>%s</span>',
wu_tooltip_text(esc_html(wu_get_country_name($country_code))), // phpcs:ignore WordPress.Security.EscapeOutput
esc_html(wu_get_flag_emoji($country_code)),
);
?>
<?php echo esc_html(wu_get_country_name($country_code)); ?>
</td>
<td class="wu-text-right"><?php echo esc_html($count); ?></td>
</tr>
<?php
printf(
'<span class="wu-flag-icon wu-flag-icon-%s wu-w-5 wu-mr-1" %s></span>',
strtolower($country_code),
wu_tooltip_text(wu_get_country_name($country_code))
);
$state_list = wu_get_states_of_customers($country_code);
$_state_count = 0;
?>
<?php echo wu_get_country_name($country_code); ?>
</td>
<td class="wu-text-right"><?php echo $count; ?></td>
</tr>
<?php
<?php foreach ($state_list as $state => $state_count) : ?>
<tr>
<td class="wu-text-xs">|&longrightarrow; <?php echo esc_html($state); ?></td>
<td class="wu-text-right"><?php echo esc_html($state_count); ?></td>
</tr>
<?php endforeach; ?>
$state_list = wu_get_states_of_customers($country_code);
$_state_count = 0;
?>
<?php
foreach ($state_list as $state => $state_count) :
$_state_count += $state_count;
?>
<tr>
<td class="wu-text-xs">|&longrightarrow; <?php echo $state; ?></td>
<td class="wu-text-right"><?php echo $state_count; ?></td>
</tr>
<?php if ($state_list && $count - $_state_count >= 0) : ?>
<tr>
<td class="wu-text-xs">|&longrightarrow; <?php esc_html_e('Other', 'wp-multisite-waas'); ?></td>
<td class="wu-text-right"><?php echo esc_html($count - $_state_count); ?></td>
</tr>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($state_list && $count - $_state_count >= 0) : ?>
</tbody>
<tr>
<td class="wu-text-xs">|&longrightarrow; <?php _e('Other', 'wp-ultimo'); ?></td>
<td class="wu-text-right"><?php echo $count - $_state_count; ?></td>
</tr>
<?php endif; ?>
<?php endforeach; ?>
</tbody>
</table>
</table>
</div>
@ -114,7 +107,7 @@ $page->render_csv_button(
<div class="wu-bg-gray-100 wu-p-4 wu-rounded wu-mt-6">
<?php _e('No countries registered yet.', 'wp-ultimo'); ?>
<?php esc_html_e('No countries registered yet.', 'wp-multisite-waas'); ?>
</div>

View File

@ -8,37 +8,35 @@
<div class="wu-styling">
<div class="wu-widget-inset">
<div class="wu-widget-inset">
<?php
<?php
$data = [];
$slug = 'signup_forms';
$headers = [
__('Checkout Form', 'wp-multisite-waas'),
__('Signups', 'wp-multisite-waas'),
];
$data = [];
$slug = 'signup_forms';
$headers = [
__('Checkout Form', 'wp-ultimo'),
__('Signups', 'wp-ultimo'),
];
foreach ($forms as $form) {
$line = [
esc_html($form->signup_form),
intval($form->count), // Ensure count is an integer and properly escaped
];
foreach ($forms as $form) {
$line = [
$form->signup_form,
$form->count,
];
$data[] = $line;
}
$data[] = $line;
} // end foreach;
$page->render_csv_button(
[
'headers' => $headers,
'data' => $data,
'slug' => $slug,
]
);
?>
$page->render_csv_button(
[
'headers' => $headers,
'data' => $data,
'slug' => $slug,
]
);
?>
</div>
</div>
</div>
@ -46,34 +44,34 @@ $page->render_csv_button(
<div class="wu-advanced-filters wu--mx-3 wu--mb-3 wu-mt-3">
<table class="wp-list-table widefat fixed striped wu-border-t-0 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<th><?php _e('Checkout Form', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('Signups', 'wp-ultimo'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($forms as $form) : ?>
<table class="wp-list-table widefat fixed striped wu-border-t-0 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<td>
<?php echo $form->signup_form; ?>
<?php if ('by-admin' === $form->signup_form) : ?>
<?php echo wu_tooltip(__('Customers created via the admin panel, by super admins.', 'wp-ultimo')); ?>
<?php endif; ?>
</td>
<td class="wu-text-right"><?php echo $form->count; ?></td>
<th><?php esc_html_e('Checkout Form', 'wp-multisite-waas'); ?></th>
<th class="wu-text-right"><?php esc_html_e('Signups', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
<?php endforeach; ?>
<tbody>
</tbody>
<?php foreach ($forms as $form) : ?>
</table>
<tr>
<td>
<?php echo esc_html($form->signup_form); ?>
<?php if ('by-admin' === $form->signup_form) : ?>
<?php echo wu_tooltip(__('Customers created via the admin panel, by super admins.', 'wp-multisite-waas')); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php endif; ?>
</td>
<td class="wu-text-right"><?php echo intval($form->count); ?></td> <!-- Ensure count is an integer and properly escaped -->
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
@ -81,7 +79,7 @@ $page->render_csv_button(
<div class="wu-bg-gray-100 wu-p-4 wu-rounded wu-mt-6">
<?php _e('No data yet.', 'wp-ultimo'); ?>
<?php esc_html_e('No data yet.', 'wp-multisite-waas'); ?>
</div>

View File

@ -15,8 +15,8 @@
$data = [];
$slug = 'most_visited_sites';
$headers = [
__('Site', 'wp-ultimo'),
__('Visits', 'wp-ultimo'),
__('Site', 'wp-multisite-waas'),
__('Visits', 'wp-multisite-waas'),
];
foreach ($sites as $site_visits) {
@ -28,7 +28,7 @@ foreach ($sites as $site_visits) {
];
$data[] = $line;
} // end foreach;
}
$page->render_csv_button(
[
@ -52,8 +52,8 @@ $page->render_csv_button(
<thead>
<tr>
<th class="wu-w-8/12"><?php _e('Site', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('Visits', 'wp-ultimo'); ?></th>
<th class="wu-w-8/12"><?php esc_html_e('Site', 'wp-multisite-waas'); ?></th>
<th class="wu-text-right"><?php esc_html_e('Visits', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
@ -64,29 +64,29 @@ $page->render_csv_button(
<tr>
<td class="wu-align-middle">
<span class="wu-uppercase wu-text-xs wu-text-gray-700 wu-font-bold">
<?php echo $site_visits->site->get_title(); ?>
<?php echo esc_html($site_visits->site->get_title()); ?>
</span>
<div class="sm:wu-flex">
<a title="<?php _e('Homepage', 'wp-ultimo'); ?>" href="<?php echo esc_attr(get_home_url($site_visits->site->get_id())); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight">
<a title="<?php esc_html_e('Homepage', 'wp-multisite-waas'); ?>" href="<?php echo esc_attr(get_home_url($site_visits->site->get_id())); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight">
<span class="dashicons-wu-link1 wu-align-middle wu-mr-1"></span>
<?php _e('Homepage', 'wp-ultimo'); ?>
<?php esc_html_e('Homepage', 'wp-multisite-waas'); ?>
</a>
<a title="<?php _e('Dashboard', 'wp-ultimo'); ?>" href="<?php echo esc_attr(get_admin_url($site_visits->site->get_id())); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight sm:wu-mt-0 sm:wu-ml-6">
<a title="<?php esc_html_e('Dashboard', 'wp-multisite-waas'); ?>" href="<?php echo esc_attr(get_admin_url($site_visits->site->get_id())); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight sm:wu-mt-0 sm:wu-ml-6">
<span class="dashicons-wu-browser wu-align-middle wu-mr-1"></span>
<?php _e('Dashboard', 'wp-ultimo'); ?>
<?php esc_html_e('Dashboard', 'wp-multisite-waas'); ?>
</a>
</div>
</td>
<td class="wu-align-middle wu-text-right">
<?php printf(_n('%d visit', '%d visits', $site_visits->count, 'wp-ultimo'), $site_visits->count); ?>
<?php printf(_n('%d visit', '%d visits', $site_visits->count, 'wp-multisite-waas'), $site_visits->count); ?>
</td>
</tr>
@ -102,7 +102,7 @@ $page->render_csv_button(
<div class="wu-bg-gray-100 wu-p-4 wu-rounded wu-mt-6">
<?php _e('No visits registered in this period.', 'wp-ultimo'); ?>
<?php esc_html_e('No visits registered in this period.', 'wp-multisite-waas'); ?>
</div>

View File

@ -11,7 +11,7 @@
<span class="wu-blinking-animation">
<?php _e('Loading...', 'wp-ultimo'); ?>
<?php esc_html_e('Loading...', 'wp-multisite-waas'); ?>
</span>

View File

@ -6,70 +6,42 @@
*/
?>
<div class="wu-styling">
<ul class="md:wu-flex wu-my-0 wu-mx-0">
<li class="wu-p-2 wu-w-full md:wu-w-full wu-relative">
<div>
<strong class="wu-text-gray-800 wu-text-2xl md:wu-text-xl">
<?php echo $new_accounts; ?>
</strong>
</div>
<div class="wu-text-sm wu-text-gray-600">
<span class="wu-block"><?php _e('New Memberships', 'wp-ultimo'); ?></span>
</div>
</li>
<li class="wu-p-2 wu-w-full md:wu-w-full wu-relative">
<div>
<strong class="wu-text-gray-800 wu-text-2xl md:wu-text-xl">
<?php echo esc_html($new_accounts); ?>
</strong>
</div>
<div class="wu-text-sm wu-text-gray-600">
<span class="wu-block"><?php esc_html_e('New Memberships', 'wp-multisite-waas'); ?></span>
</div>
</li>
</ul>
<div class="wu--mx-3 wu--mb-3 wu-mt-2">
<table class="wp-list-table widefat fixed striped wu-border-t-1 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<th><?php _e('Product Name', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('New Memberships', 'wp-ultimo'); ?></th>
</tr>
</thead>
<tbody>
<?php if ($products) : ?>
<?php foreach ($products as $product) : ?>
<table class="wp-list-table widefat fixed striped wu-border-t-1 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<td>
<?php echo $product->name; ?>
</td>
<td class="wu-text-right">
<?php echo $product->count; ?>
</td>
<th><?php esc_html_e('Product Name', 'wp-multisite-waas'); ?></th>
<th class="wu-text-right"><?php esc_html_e('New Memberships', 'wp-multisite-waas'); ?></th>
</tr>
<?php endforeach; ?>
<?php else : ?>
<tr>
<td colspan="2">
<?php _e('No Products found.', 'wp-ultimo'); ?>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</thead>
<tbody>
<?php if ($products) : ?>
<?php foreach ($products as $product) : ?>
<tr>
<td><?php echo esc_html($product->name); ?></td>
<td class="wu-text-right"><?php echo esc_html($product->count); ?></td>
</tr>
<?php endforeach; ?>
<?php else : ?>
<tr>
<td colspan="2">
<?php esc_html_e('No Products found.', 'wp-multisite-waas'); ?>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>

View File

@ -9,7 +9,7 @@
<ul class="lg:wu-flex wu-my-0 wu-mx-0">
<li class="wu-p-2 wu-w-full md:wu-w-4/12 wu-relative" <?php echo wu_tooltip_text(__('MRR stands for Monthly Recurring Revenue', 'wp-ultimo')); ?>>
<li class="wu-p-2 wu-w-full md:wu-w-4/12 wu-relative" <?php echo wu_tooltip_text(__('MRR stands for Monthly Recurring Revenue', 'wp-multisite-waas')); ?>>
<div>
@ -20,7 +20,7 @@
</div>
<div class="wu-text-md wu-text-gray-600">
<span class="wu-block"><?php _e('MRR', 'wp-ultimo'); ?></span>
<span class="wu-block"><?php esc_html_e('MRR', 'wp-multisite-waas'); ?></span>
</div>
</li>
@ -36,7 +36,7 @@
</div>
<div class="wu-text-md wu-text-gray-600">
<span class="wu-block"><?php _e('Gross Revenue', 'wp-ultimo'); ?></span>
<span class="wu-block"><?php esc_html_e('Gross Revenue', 'wp-multisite-waas'); ?></span>
</div>
</li>
@ -52,7 +52,7 @@
</div>
<div class="wu-text-md wu-text-gray-600">
<span class="wu-block"><?php _e('Refunded', 'wp-ultimo'); ?></span>
<span class="wu-block"><?php esc_html_e('Refunded', 'wp-multisite-waas'); ?></span>
</div>
</li>
@ -65,8 +65,8 @@
<thead>
<tr>
<th><?php _e('Product', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('Revenue', 'wp-ultimo'); ?></th>
<th><?php esc_html_e('Product', 'wp-multisite-waas'); ?></th>
<th class="wu-text-right"><?php esc_html_e('Revenue', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
@ -91,7 +91,7 @@
<tr>
<td colspan="2">
<?php _e('No Products found.', 'wp-ultimo'); ?>
<?php esc_html_e('No Products found.', 'wp-multisite-waas'); ?>
</td>
</tr>

View File

@ -14,10 +14,10 @@
$data = [];
$slug = 'taxes_by_code';
$headers = [
__('Tax', 'wp-ultimo'),
__('Rate', 'wp-ultimo'),
__('Orders', 'wp-ultimo'),
__('Tax Total', 'wp-ultimo'),
__('Tax', 'wp-multisite-waas'),
__('Rate', 'wp-multisite-waas'),
__('Orders', 'wp-multisite-waas'),
__('Tax Total', 'wp-multisite-waas'),
];
foreach ($taxes_by_rate as $tax_line) {
@ -29,7 +29,7 @@
];
$data[] = $line;
} // end foreach;
}
$page->render_csv_button(
[
@ -45,10 +45,10 @@
<thead>
<tr>
<th><?php _e('Tax', 'wp-ultimo'); ?></th>
<th><?php _e('Rate', 'wp-ultimo'); ?></th>
<th><?php _e('Orders', 'wp-ultimo'); ?></th>
<th><?php _e('Tax Total', 'wp-ultimo'); ?></th>
<th><?php esc_html_e('Tax', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Rate', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Orders', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Tax Total', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
@ -59,18 +59,10 @@
<?php foreach ($taxes_by_rate as $tax_line) : ?>
<tr>
<td>
<?php echo wu_get_isset($tax_line, 'title', 'No Name'); ?>
</td>
<td>
<?php echo $tax_line['tax_rate']; ?>%
</td>
<td>
<?php echo $tax_line['order_count']; ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['tax_total']); ?>
</td>
<td><?php echo esc_html(wu_get_isset($tax_line, 'title', 'No Name')); ?></td>
<td><?php echo esc_html($tax_line['tax_rate']); ?>%</td>
<td><?php echo esc_html($tax_line['order_count']); ?></td>
<td><?php echo esc_html(wu_format_currency($tax_line['tax_total'])); ?></td>
</tr>
<?php endforeach; ?>
@ -79,7 +71,7 @@
<tr>
<td colspan="4">
<?php _e('No Taxes found.', 'wp-ultimo'); ?>
<?php esc_html_e('No Taxes found.', 'wp-multisite-waas'); ?>
</td>
</tr>

View File

@ -14,11 +14,11 @@
$data = [];
$slug = 'taxes_by_day';
$headers = [
__('Day', 'wp-ultimo'),
__('Orders', 'wp-ultimo'),
__('Total Sales', 'wp-ultimo'),
__('Tax Total', 'wp-ultimo'),
__('Net Profit', 'wp-ultimo'),
__('Day', 'wp-multisite-waas'),
__('Orders', 'wp-multisite-waas'),
__('Total Sales', 'wp-multisite-waas'),
__('Tax Total', 'wp-multisite-waas'),
__('Net Profit', 'wp-multisite-waas'),
];
foreach ($taxes_by_day as $day => $tax_line) {
@ -31,7 +31,7 @@
];
$data[] = $line;
} // end foreach;
}
$page->render_csv_button(
[
@ -47,11 +47,11 @@
<thead>
<tr>
<th class="wu-w-1/3"><?php _e('Day', 'wp-ultimo'); ?></th>
<th><?php _e('Orders', 'wp-ultimo'); ?></th>
<th><?php _e('Total Sales', 'wp-ultimo'); ?></th>
<th><?php _e('Tax Total', 'wp-ultimo'); ?></th>
<th><?php _e('Net Profit', 'wp-ultimo'); ?></th>
<th class="wu-w-1/3"><?php esc_html_e('Day', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Orders', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Total Sales', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Tax Total', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Net Profit', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
@ -62,21 +62,11 @@
<?php foreach ($taxes_by_day as $day => $tax_line) : ?>
<tr>
<td>
<?php echo date_i18n(get_option('date_format'), strtotime($day)); ?>
</td>
<td>
<?php echo $tax_line['order_count']; ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['total']); ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['tax_total']); ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['net_profit']); ?>
</td>
<td><?php echo esc_html(date_i18n(get_option('date_format'), strtotime($day))); ?></td>
<td><?php echo intval($tax_line['order_count']); ?></td>
<td><?php echo esc_html(wu_format_currency($tax_line['total'])); ?></td>
<td><?php echo esc_html(wu_format_currency($tax_line['tax_total'])); ?></td>
<td><?php echo esc_html(wu_format_currency($tax_line['net_profit'])); ?></td>
</tr>
<?php endforeach; ?>
@ -85,7 +75,7 @@
<tr>
<td colspan="4">
<?php _e('No Taxes found.', 'wp-ultimo'); ?>
<?php esc_html_e('No Taxes found.', 'wp-multisite-waas'); ?>
</td>
</tr>

View File

@ -11,7 +11,7 @@
<span class="wu-blinking-animation">
<?php _e('Loading...', 'wp-ultimo'); ?>
<?php esc_html_e('Loading...', 'wp-multisite-waas'); ?>
</span>

View File

@ -11,7 +11,7 @@
<span class="wu-blinking-animation">
<?php _e('Loading...', 'wp-ultimo'); ?>
<?php esc_html_e('Loading...', 'wp-multisite-waas'); ?>
</span>

View File

@ -16,7 +16,7 @@
<h3 class="wu-m-0 <?php echo wu_env_picker('', 'wu-widget-title'); ?>">
<?php echo $title; ?>
<?php echo esc_html($title); ?>
</h3>
@ -27,12 +27,12 @@
<div class="wu-ml-auto">
<a
title="<?php esc_attr_e('See More', 'wp-ultimo'); ?>"
title="<?php esc_attr_e('See More', 'wp-multisite-waas'); ?>"
class="wu-text-sm wu-no-underline button"
href="<?php echo $element->get_manage_url($site->get_id()); ?>"
>
<?php _e('See More', 'wp-ultimo'); ?>
<?php esc_html_e('See More', 'wp-multisite-waas'); ?>
</a>
@ -53,15 +53,15 @@
<strong class="wu-text-gray-800 wu-text-base">
<?php echo $product->get_name(); ?>
<?php echo esc_html($product->get_name()); ?>
</strong>
</div>
<div class="wu-text-sm wu-text-gray-600">
<span class="wu-block"><?php _e('Your current plan', 'wp-ultimo'); ?></span>
<!-- <a href="#" class="wu-no-underline"><?php _e('Manage &rarr;', 'wp-ultimo'); ?></a> -->
<span class="wu-block"><?php esc_html_e('Your current plan', 'wp-multisite-waas'); ?></span>
<!-- <a href="#" class="wu-no-underline"><?php esc_html_e('Manage ', 'wp-multisite-waas'); ?></a> -->
</div>
</li>
@ -75,14 +75,14 @@
<div>
<strong class="wu-text-gray-800 wu-text-base">
<?php printf(_n('%s day', '%s days', $site_trial, 'wp-ultimo'), $site_trial); ?>
<?php printf(esc_html(_n('%s day', '%s days', $site_trial, 'wp-multisite-waas')), esc_html($site_trial)); ?>
</strong>
</div>
<div class="wu-text-sm wu-text-gray-600">
<span class="wu-block"><?php _e('Remaining time in trial', 'wp-ultimo'); ?></span>
<!-- <a href="#" class="wu-no-underline"><?php _e('Upgrade &rarr;', 'wp-ultimo'); ?></a> -->
<span class="wu-block"><?php esc_html_e('Remaining time in trial', 'wp-multisite-waas'); ?></span>
<!-- <a href="#" class="wu-no-underline"><?php esc_html_e('Upgrade ', 'wp-multisite-waas'); ?></a> -->
</div>
</li>
@ -98,7 +98,7 @@
/**
* Display space used
*/
printf($message, size_format($space_used), size_format($space_allowed));
printf(esc_html($message), esc_html(size_format($space_used)), esc_html(size_format($space_allowed)));
?>
</strong>
@ -113,8 +113,8 @@
</div>
<div class="wu-text-sm wu-text-gray-600">
<span class="wu-block"><?php _e('Disk space used', 'wp-ultimo'); ?></span>
<!-- <a href="#" class="wu-no-underline"><?php _e('Upgrade &rarr;', 'wp-ultimo'); ?></a> -->
<span class="wu-block"><?php esc_html_e('Disk space used', 'wp-multisite-waas'); ?></span>
<!-- <a href="#" class="wu-no-underline"><?php esc_html_e('Upgrade ', 'wp-multisite-waas'); ?></a> -->
</div>
</li>

View File

@ -11,11 +11,11 @@
<div v-if="loading"
class="wu-text-center wu-bg-gray-100 wu-rounded wu-uppercase wu-font-semibold wu-text-xs wu-text-gray-700 wu-p-4">
<span class="wu-blinking-animation"><?php _e('Loading...', 'wp-ultimo'); ?></span>
<span class="wu-blinking-animation"><?php esc_html_e('Loading...', 'wp-multisite-waas'); ?></span>
</div>
<div v-if='!queried.count && !loading' v-cloak class='wu-feed-loading wu-mb-6'>
<?php _e('No more items to display', 'wp-ultimo'); ?>
<?php esc_html_e('No more items to display', 'wp-multisite-waas'); ?>
</div>
<div v-if="!loading" class="wu-widget-inset">
@ -58,7 +58,7 @@
<div class="wu-flex wu-font-medium wu-text-gray-700 wu-truncate">
<p class="wu-m-0 wu-p-0 wu-capitalize">{{ event.object_type }}</p>
<p class="wu-p-0 wu-m-0 wu-ml-1 wu-font-normal wu-text-gray-600">
<?php printf(__('with %s', 'wp-ultimo'), '{{ event.slug }}'); ?>
<?php printf(__('with %s', 'wp-multisite-waas'), '{{ event.slug }}'); ?>
</p>
</div>
<div class="wu-mt-1">
@ -67,7 +67,7 @@
<p class="wu-p-0 wu-m-0">
<span v-html="event.message"></span>
<span class="wu-text-gray-700 wu-ml-2"><span class="dashicons-wu-clock wu-mr-1 wu-align-middle"></span>{{ $moment(event.date_created, "YYYYMMDD").fromNow() }}</span>
<span v-if="event.author.display_name" class="wu-text-gray-700"><?php printf(__('by %s', 'wp-ultimo'), '{{ event.author.display_name }}'); ?></span>
<span v-if="event.author.display_name" class="wu-text-gray-700"><?php printf(__('by %s', 'wp-multisite-waas'), '{{ event.author.display_name }}'); ?></span>
</p>
</div>
</div>
@ -91,17 +91,17 @@
class='wu-feed-pagination wu-m-0 wu-flex wu-justify-between'>
<li class="wu-w-1/3 wu-m-0">
<a href="#" class="wu-block" v-on:click.prevent="refresh">
<?php _e('Refresh', 'wp-ultimo'); ?>
<?php esc_html_e('Refresh', 'wp-multisite-waas'); ?>
</a>
</li>
<li v-if="page > 1" class="wu-w-1/3 wu-text-center wu-m-0">
<a href="#" v-on:click.prevent="navigatePrev" class="wu-block">
&larr; <?php _e('Previous Page', 'wp-ultimo'); ?>
&larr; <?php esc_html_e('Previous Page', 'wp-multisite-waas'); ?>
</a>
</li>
<li v-if="hasMore() && !loading" class="wu-w-1/3 wu-text-right wu-m-0">
<a href="#" v-on:click.prevent="navigateNext" class="wu-block">
<?php _e('Next Page', 'wp-ultimo'); ?>
<?php esc_html_e('Next Page', 'wp-multisite-waas'); ?>
&rarr;
</a>
</li>
@ -173,7 +173,7 @@
Vue.set(wuActivityStream, 'queried', data.data);
} // end if;
}
},
})

View File

@ -20,7 +20,7 @@
<h3 class="wu-m-0 <?php echo wu_env_picker('', 'wu-widget-title'); ?>">
<?php echo $title; ?>
<?php echo esc_html($title); ?>
</h3>
@ -29,12 +29,12 @@
<div class="wu-ml-auto">
<a
title="<?php esc_attr_e('Update Billing Address', 'wp-ultimo'); ?>"
title="<?php esc_attr_e('Update Billing Address', 'wp-multisite-waas'); ?>"
class="wu-text-sm wu-no-underline wubox button"
href="<?php echo $update_billing_address_link; ?>"
>
<?php _e('Update', 'wp-ultimo'); ?>
<?php esc_html_e('Update', 'wp-multisite-waas'); ?>
</a>
@ -49,7 +49,7 @@
<div class="wu-p-4 wu-bg-gray-100 wu-rounded">
<?php printf(__('No billing address found. Click <a title="%1$s" href="%2$s" class="wubox wu-no-underline">here</a> to add one.', 'wp-ultimo'), __('Update Billing Address', 'wp-ultimo'), $update_billing_address_link); ?>
<?php printf(wp_kses_post(__('No billing address found. Click <a title="%1$s" href="%2$s" class="wubox wu-no-underline">here</a> to add one.', 'wp-multisite-waas')), esc_html__('Update Billing Address', 'wp-multisite-waas'), esc_url($update_billing_address_link)); ?>
</div>
@ -66,10 +66,10 @@
<div class="sm:wu-divide-y sm:wu-divide-gray-200">
<div class="wu-py-4 sm:wu-grid sm:wu-grid-cols-3 sm:wu-gap-4 sm:wu-px-4">
<div class="wu-text-sm wu-font-medium wu-text-gray-600">
<?php echo $label; ?>
<?php echo esc_html($label); ?>
</div>
<div class="wu-mt-1 wu-text-sm wu-text-gray-900 sm:wu-mt-0 sm:wu-col-span-2">
<?php echo $value; ?>
<?php echo esc_html($value); ?>
</div>
</div>
</div>
@ -99,7 +99,7 @@
<h3 class="wu-m-0 <?php echo wu_env_picker('', 'wu-widget-title'); ?>">
<?php echo __('Payment Method', 'wp-ultimo'); ?>
<?php echo __('Payment Method', 'wp-multisite-waas'); ?>
</h3>
@ -108,12 +108,12 @@
<div class="wu-ml-auto">
<a
title="<?php esc_attr_e('Update Billing Address', 'wp-ultimo'); ?>"
title="<?php esc_attr_e('Update Billing Address', 'wp-multisite-waas'); ?>"
class="wu-text-sm wu-no-underline wubox button"
href="<?php echo $update_billing_address_link; ?>"
>
<?php _e('Update', 'wp-ultimo'); ?>
<?php esc_html_e('Update', 'wp-multisite-waas'); ?>
</a>

View File

@ -38,7 +38,7 @@
<span class="wu-text-xs wu-uppercase wu-font-bold wu-block">
<?php _e('Product Description:', 'wp-ultimo'); ?>
<?php esc_html_e('Product Description:', 'wp-multisite-waas'); ?>
</span>
@ -48,7 +48,7 @@
<span class="wu-text-xs wu-uppercase wu-font-bold wu-block">
<?php _e('Product Characteristics:', 'wp-ultimo'); ?>
<?php esc_html_e('Product Characteristics:', 'wp-multisite-waas'); ?>
</span>

View File

@ -27,12 +27,12 @@
<div class="wu-ml-auto">
<a
title="<?php esc_attr_e('Update your membership', 'wp-ultimo'); ?>"
title="<?php esc_attr_e('Update your membership', 'wp-multisite-waas'); ?>"
class="wu-text-sm wu-no-underline button"
href="<?php echo esc_attr(wu_get_membership_update_url($membership)); ?>"
>
<?php esc_html_e('Change', 'wp-ultimo'); ?>
<?php esc_html_e('Change', 'wp-multisite-waas'); ?>
</a>
@ -93,7 +93,7 @@
<div class="wu-bg-yellow-200 wu-text-yellow-700 wu-rounded wu-p-2">
<?php printf(__("There's a pending change for this membership, scheduled to take place on <strong>%1\$s</strong>. Changing to <strong>%2\$s</strong>.", 'wp-ultimo'), $pending_change_date, $pending_change); ?>
<?php printf(__("There's a pending change for this membership, scheduled to take place on <strong>%1\$s</strong>. Changing to <strong>%2\$s</strong>.", 'wp-multisite-waas'), $pending_change_date, $pending_change); ?>
</div>
@ -116,7 +116,7 @@
<div class="sm:wu-col-span-1">
<div class="wu-text-sm wu-font-medium wu-text-gray-600">
<?php _e('Status', 'wp-ultimo'); ?>
<?php esc_html_e('Status', 'wp-multisite-waas'); ?>
</div>
<div class="wu-mt-1 wu-text-sm wu-text-gray-900 wu-mb-4">
@ -134,7 +134,7 @@
<div class="sm:wu-col-span-1">
<div class="wu-text-sm wu-font-medium wu-text-gray-600">
<?php _e('Initial Amount', 'wp-ultimo'); ?>
<?php esc_html_e('Initial Amount', 'wp-multisite-waas'); ?>
</div>
<div class="wu-mt-1 wu-text-sm wu-text-gray-900 wu-mb-4">
@ -148,7 +148,7 @@
<div class="sm:wu-col-span-1">
<div class="wu-text-sm wu-font-medium wu-text-gray-600">
<?php _e('Times Billed', 'wp-ultimo'); ?>
<?php esc_html_e('Times Billed', 'wp-multisite-waas'); ?>
</div>
<div class="wu-mt-1 wu-text-sm wu-text-gray-900 wu-mb-4">
@ -164,7 +164,7 @@
<div class="sm:wu-col-span-1">
<div class="wu-text-sm wu-font-medium wu-text-gray-600">
<?php _e('Expires', 'wp-ultimo'); ?>
<?php esc_html_e('Expires', 'wp-multisite-waas'); ?>
</div>
<div class="wu-mt-1 wu-text-sm wu-text-gray-900 wu-mb-4">
@ -226,7 +226,7 @@
<h3 class="wu-m-0 <?php echo wu_env_picker('', 'wu-widget-title'); ?>">
<?php echo __('Additional Packages & Services', 'wp-ultimo'); ?>
<?php echo __('Additional Packages & Services', 'wp-multisite-waas'); ?>
</h3>
@ -268,7 +268,7 @@
<div class="wu-ml-4 wu-flex-shrink-0 wu-flex">
<a
title="<?php esc_attr_e('Product Details', 'wp-ultimo'); ?>"
title="<?php esc_attr_e('Product Details', 'wp-multisite-waas'); ?>"
href="
<?php
echo esc_attr(
@ -285,14 +285,14 @@
class="wubox wu-ml-4 wu-no-underline"
>
<?php esc_html_e('Details', 'wp-ultimo'); ?>
<?php esc_html_e('Details', 'wp-multisite-waas'); ?>
</a>
<?php if ($addon['product']->is_recurring() && (! $pending_products || wu_get_isset($pending_products, $addon['product']->get_id()))) : ?>
<a <?php // Translators: %s is the name of the product being canceled. ?>
title="<?php esc_attr(sprintf(__('Cancel %s', 'wp-ultimo'), $addon['product']->get_name())); ?>"
title="<?php esc_attr(sprintf(__('Cancel %s', 'wp-multisite-waas'), $addon['product']->get_name())); ?>"
href="
<?php
echo esc_attr(
@ -310,7 +310,7 @@
class="wubox wu-ml-4 wu-no-underline delete wu-text-red-500 hover:wu-text-red-600"
>
<?php esc_html_e('Cancel', 'wp-ultimo'); ?>
<?php esc_html_e('Cancel', 'wp-multisite-waas'); ?>
</a>
@ -329,7 +329,7 @@
<?php else : ?>
<div class="wu-px-4 wu-py-6 wu-text-center wu-text-gray-600">
<?php esc_html_e('No packages or services found.', 'wp-ultimo'); ?>
<?php esc_html_e('No packages or services found.', 'wp-multisite-waas'); ?>
</div>
<?php endif; ?>
@ -344,7 +344,7 @@
<div class="wu-text-lg">
<small class="wu-block wu-text-xs wu-uppercase wu-font-bold wu-text-gray-600">
<?php esc_html_e('Total', 'wp-ultimo'); ?>
<?php esc_html_e('Total', 'wp-multisite-waas'); ?>
</small>
<!-- <span class="wu-text-gray-500 wu-line-through">$29</span> -->

View File

@ -17,7 +17,7 @@
<nav
class="wu-border wu-rounded wu-border-solid wu-flex wu-px-4 <?php echo wu_env_picker('wu-border-gray-300', 'wu-border-gray-400'); ?>"
aria-label="<?php esc_attr_e('Breadcrumb', 'wp-ultimo'); ?>"
aria-label="<?php esc_attr_e('Breadcrumb', 'wp-multisite-waas'); ?>"
>
<ol class="wu-p-0 wu-m-0 wu-w-full wu-mx-auto wu-flex">
@ -42,7 +42,7 @@
<path d="M.293 0l22 22-22 22h1.414l22-22-22-22H.293z" />
</svg>
<a href="<?php echo esc_url($my_sites_url); ?>" class="wu-mx-4 wu-text-sm wu-font-medium wu-text-gray-500 hover:wu-text-gray-700 wu-no-underline">
<?php _e('Your Sites', 'wp-ultimo'); ?>
<?php esc_html_e('Your Sites', 'wp-multisite-waas'); ?>
</a>
</div>
</li>
@ -78,7 +78,7 @@
style="max-width: <?php echo esc_attr($screenshot_size); ?>px;"
class="wu-w-full wu-rounded wu-border wu-border-solid <?php echo wu_env_picker('wu-border-gray-300', 'wu-border-gray-400'); ?>"
src="<?php echo $current_site->get_featured_image(); ?>"
alt="<?php printf(esc_attr__('Site Image: %s', 'wp-ultimo'), $current_site->get_title()); ?>"
alt="<?php printf(esc_attr__('Site Image: %s', 'wp-multisite-waas'), $current_site->get_title()); ?>"
>
</div>

Some files were not shown because too many files have changed in this diff Show More