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

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

View File

@ -24,9 +24,9 @@
<div class="wu-ml-auto">
<a title="<?php _e('Add Domain', 'wp-ultimo'); ?>" href="<?php echo $modal['url']; ?>" class="wu-text-sm wu-no-underline wubox button">
<a title="<?php esc_html_e('Add Domain', 'wp-multisite-waas'); ?>" href="<?php echo $modal['url']; ?>" class="wu-text-sm wu-no-underline wubox button">
<?php _e('Add Domain', 'wp-ultimo'); ?>
<?php esc_html_e('Add Domain', 'wp-multisite-waas'); ?>
</a>
@ -57,8 +57,8 @@
$label = $item->get_stage_label();
if ( ! $item->is_active()) {
$label = sprintf('%s <small>(%s)</small>', $label, __('Inactive', 'wp-ultimo'));
} // end if;
$label = sprintf('%s <small>(%s)</small>', $label, __('Inactive', 'wp-multisite-waas'));
}
$class = $item->get_stage_class();
@ -72,15 +72,15 @@
'icon' => 'dashicons-wu-edit1 wu-align-middle wu-mr-1',
'label' => '',
'url' => $domain['primary_link'],
'value' => __('Make Primary', 'wp-ultimo'),
'value' => __('Make Primary', 'wp-multisite-waas'),
];
} // end if;
}
$second_row_actions['remove'] = [
'wrapper_classes' => 'wu-text-red-500 wubox',
'icon' => 'dashicons-wu-trash-2 wu-align-middle wu-mr-1',
'label' => '',
'value' => __('Delete', 'wp-ultimo'),
'value' => __('Delete', 'wp-multisite-waas'),
'url' => $domain['delete_link'],
];
@ -96,13 +96,13 @@
'wrapper_classes' => $item->is_primary_domain() ? 'wu-text-blue-600' : '',
'icon' => $item->is_primary_domain() ? 'dashicons-wu-filter_1 wu-align-text-bottom wu-mr-1' : 'dashicons-wu-plus-square wu-align-text-bottom wu-mr-1',
'label' => '',
'value' => $item->is_primary_domain() ? __('Primary', 'wp-ultimo') . wu_tooltip(__('All other mapped domains will redirect to the primary domain.', 'wp-ultimo'), 'dashicons-editor-help wu-align-middle wu-ml-1') : __('Alias', 'wp-ultimo'),
'value' => $item->is_primary_domain() ? __('Primary', 'wp-multisite-waas') . wu_tooltip(__('All other mapped domains will redirect to the primary domain.', 'wp-multisite-waas'), 'dashicons-editor-help wu-align-middle wu-ml-1') : __('Alias', 'wp-multisite-waas'),
],
'secure' => [
'wrapper_classes' => $item->is_secure() ? 'wu-text-green-500' : '',
'icon' => $item->is_secure() ? 'dashicons-wu-lock1 wu-align-text-bottom wu-mr-1' : 'dashicons-wu-lock1 wu-align-text-bottom wu-mr-1',
'label' => '',
'value' => $item->is_secure() ? __('Secure (HTTPS)', 'wp-ultimo') : __('Not Secure (HTTP)', 'wp-ultimo'),
'value' => $item->is_secure() ? __('Secure (HTTPS)', 'wp-multisite-waas') : __('Not Secure (HTTP)', 'wp-multisite-waas'),
],
],
$second_row_actions
@ -119,7 +119,7 @@
<?php else : ?>
<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 wu-m-4 wu-mt-6">
<span><?php echo __('No domains added.', 'wp-ultimo'); ?></span>
<span><?php echo __('No domains added.', 'wp-multisite-waas'); ?></span>
</div>
<?php endif; ?>

View File

@ -12,11 +12,11 @@
<div class="wu-w-full sm:wu-w-8/12">
<span class="wu-block wu-my-1 wu-text-base wu-font-semibold wu-text-gray-700">
<?php _e('Your network is taking shape!', 'wp-ultimo'); ?>
<?php esc_html_e('Your network is taking shape!', 'wp-multisite-waas'); ?>
</span>
<span class="wu-block wu-my-1 wu-text-gray-600">
<?php _e('Here are the next steps to keep you on that streak!', 'wp-ultimo'); ?>
<?php esc_html_e('Here are the next steps to keep you on that streak!', 'wp-multisite-waas'); ?>
</span>
</div>
@ -24,7 +24,7 @@
<div class="wu-w-4/12 wu-text-right wu-hidden sm:wu-inline-block">
<span class="wu-inline-block wu-bg-green-100 wu-text-center wu-align-middle wu-p-2 wu-font-mono wu-px-3 wu-border wu-border-green-300 wu-text-green-700 wu-border-solid wu-rounded">
<?php echo $percentage . '% ' . __('done', 'wp-ultimo'); ?>
<?php echo esc_html($percentage) . '% ' . esc_html__('done', 'wp-multisite-waas'); ?>
</span>
</div>
@ -41,7 +41,7 @@
<div>
<span class="wu-hidden sm:wu-inline-block wu-mr-4 wu-bg-white 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">
<?php echo $index; ?>
<?php echo esc_html($index); ?>
</span>
</div>
@ -49,7 +49,7 @@
<span class="wu-block wu-my-1 wu-font-semibold wu-text-gray-700">
<span class="<?php echo $step['done'] ? 'wu-line-through' : ''; ?>"><?php echo $step['title']; ?></span>
<span class="<?php echo $step['done'] ? 'wu-line-through' : ''; ?>"><?php echo esc_html($step['title']); ?></span>
<?php if ($step['done']) : ?>
@ -59,7 +59,7 @@
</span>
<span class="wu-block wu-my-1 wu-text-gray-600 <?php echo $step['done'] ? 'wu-line-through' : ''; ?>"><?php echo $step['desc']; ?></span>
<span class="wu-block wu-my-1 wu-text-gray-600 <?php echo $step['done'] ? 'wu-line-through' : ''; ?>"><?php echo esc_html($step['desc']); ?></span>
</div>
@ -68,7 +68,7 @@
<div class="wu-block sm:wu-hidden wu-h-2">&nbsp;</div>
<a href="<?php echo $step['action_link']; ?>" class="button wu-w-full sm:wu-w-auto wu-text-center">
<?php echo $step['action_label']; ?>
<?php echo esc_html($step['action_label']); ?>
</a>
</div>
@ -92,7 +92,7 @@ endforeach;
class="button wu-text-center hide-postbox-tog"
id="wp-ultimo-setup-hide"
>
<?php _e('Dismiss', 'wp-ultimo'); ?>
<?php esc_html_e('Dismiss', 'wp-multisite-waas'); ?>
</button>
</div>

View File

@ -17,7 +17,7 @@
<h3 class="wu-m-0 <?php echo wu_env_picker('', 'wu-widget-title'); ?>">
<?php echo $title; ?>
<?php echo esc_html($title); ?>
</h3>
@ -47,15 +47,15 @@
</a>',
$payment->get_invoice_url(),
esc_attr__('Download Invoice', 'wp-ultimo')
esc_html__('Download Invoice', 'wp-multisite-waas')
);
$payment_column = $payment->get_status() === 'pending' ? [
'pay_now' => [
'url' => add_query_arg(['payment' => $payment->get_hash()], wu_get_registration_url()),
'icon' => 'dashicons-wu-credit-card wu-align-middle wu-mr-1',
'label' => __('Go to payment', 'wp-ultimo'),
'value' => __('Pay Now', 'wp-ultimo'),
'label' => esc_html__('Go to payment', 'wp-multisite-waas'),
'value' => esc_html__('Pay Now', 'wp-multisite-waas'),
],
] : [];

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>
@ -37,7 +37,7 @@
if (is_array($items_to_display) && ! in_array($post_type_slug, $items_to_display, true)) {
continue;
} // end if;
}
if ($post_type_limits->{$post_type_slug}->enabled) :
$post_count = $post_type_limits->get_post_count($post_type_slug);
@ -48,11 +48,11 @@
$width = 5;
} else {
$width = ($post_count / $post_type_limits->{$post_type_slug}->number * 100);
} // end if;
}
if ($width > 100) {
$width = 100;
} // end if;
}
?>
@ -60,7 +60,7 @@
<span class="">
<?php echo $post_type->label; ?>
<?php echo esc_html($post_type->label); ?>
</span>
@ -72,9 +72,9 @@
<div class="wu-text-xs wu-text-gray-600 wu-align-middle">
<?php echo $post_count; ?>
<?php echo esc_html($post_count); ?>
/
<?php echo empty($post_type_limits->{$post_type_slug}->number) ? __('Unlimited', 'wp-ultimo') : $post_type_limits->{$post_type_slug}->number; ?>
<?php echo empty($post_type_limits->{$post_type_slug}->number) ? esc_html__('Unlimited', 'wp-multisite-waas') : esc_html($post_type_limits->{$post_type_slug}->number); ?>
</div>
@ -113,9 +113,9 @@ endforeach;
<div class="">
<?php _e('Unique Visits', 'wp-ultimo'); ?>
<?php esc_html_e('Unique Visits', 'wp-multisite-waas'); ?>
<?php echo wu_tooltip(sprintf(__('Next Reset: %s', 'wp-ultimo'), date_i18n(get_option('date_format', 'd/m/Y'), strtotime('last day of this month')))); ?>
<?php echo wu_tooltip(sprintf(__('Next Reset: %s', 'wp-multisite-waas'), date_i18n(get_option('date_format', 'd/m/Y'), strtotime('last day of this month')))); ?>
</div>
@ -129,7 +129,7 @@ endforeach;
<?php echo number_format($visits_count); ?>
/
<?php echo $visit_limitations->get_limit() == 0 ? __('Unlimited', 'wp-ultimo') : number_format((int) $visit_limitations->get_limit()); ?>
<?php echo $visit_limitations->get_limit() == 0 ? __('Unlimited', 'wp-multisite-waas') : number_format((int) $visit_limitations->get_limit()); ?>
</div>

View File

@ -16,7 +16,7 @@
<?php
// translators: 1$s is the display name of the user currently logged in.
printf(__('Not %1$s? <a href="%2$s" class="wu-no-underline">Log in</a> using your account.', 'wp-ultimo'), wp_get_current_user()->display_name, $login_url);
printf(wp_kses_post(__('Not %1$s? <a href="%2$s" class="wu-no-underline">Log in</a> using your account.', 'wp-multisite-waas')), esc_html(wp_get_current_user()->display_name), esc_url($login_url));
?>
@ -33,7 +33,7 @@
<h2 class="wu-m-0 <?php echo wu_env_picker('', 'wu-widget-title'); ?>">
<?php echo $title; ?>
<?php echo esc_html($title); ?>
</h2>
@ -44,12 +44,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 button"
href="<?php echo wu_get_registration_url(); ?>"
>
<?php _e('Create an Account', 'wp-ultimo'); ?>
<?php esc_html_e('Create an Account', 'wp-multisite-waas'); ?>
</a>

View File

@ -5,8 +5,6 @@
* @since 2.0.0
*/
$current_site = wu_get_current_site();
$add_new_url = wu_get_setting('enable_multiple_sites') ? $element->get_new_site_url() : wu_get_registration_url();
// Redirect back to this page after create the site
@ -54,7 +52,7 @@ $show_add_new = apply_filters('wp_ultimo_my_sites_show_add_new', $show_add_new);
<span
class="wu-shadow-sm wu-inline-flex wu-items-center wu-px-2 wu-py-1 wu-rounded wu-text-sm wu-font-medium wu-bg-purple-200 wu-text-purple-700"
>
<?php echo __('Pending', 'wp-ultimo'); ?>
<?php echo __('Pending', 'wp-multisite-waas'); ?>
</span>
<?php endif; ?>
@ -71,7 +69,7 @@ $show_add_new = apply_filters('wp_ultimo_my_sites_show_add_new', $show_add_new);
<span
class="wu-shadow-sm wu-inline-flex wu-items-center wu-px-2 wu-py-1 wu-rounded wu-text-sm wu-font-medium wu-bg-gray-800 wu-text-gray-300">
<?php _e('Primary', 'wp-ultimo'); ?>
<?php esc_html_e('Primary', 'wp-multisite-waas'); ?>
</span>
<?php endif; ?>
@ -89,7 +87,7 @@ $show_add_new = apply_filters('wp_ultimo_my_sites_show_add_new', $show_add_new);
<img
class="wu-h-48 wu-w-full wu-object-cover wu-block"
src="<?php echo $site->get_featured_image(); ?>"
alt="<?php printf(esc_attr__('Site Image: %s', 'wp-ultimo'), $site->get_title()); ?>"
alt="<?php printf(esc_attr__('Site Image: %s', 'wp-multisite-waas'), $site->get_title()); ?>"
style="background-color: rgba(255, 255, 255, 0.5)"
>
@ -108,7 +106,7 @@ $show_add_new = apply_filters('wp_ultimo_my_sites_show_add_new', $show_add_new);
<?php if ($site->get_id()) : ?>
<a href="<?php echo esc_attr($site->get_active_site_url()); ?>" class="wu-block wu-no-underline">
<span class="wu-text-base wu-font-semibold wu-text-gray-800 wu-block" <?php echo wu_tooltip_text(__('Visit Site', 'wp-ultimo')); ?>>
<span class="wu-text-base wu-font-semibold wu-text-gray-800 wu-block" <?php echo wu_tooltip_text(__('Visit Site', 'wp-multisite-waas')); ?>>
<?php echo $site->get_title(); ?> <span class="wu-text-sm dashicons-wu-popup"></span>
</span>
@ -141,7 +139,7 @@ $show_add_new = apply_filters('wp_ultimo_my_sites_show_add_new', $show_add_new);
<li class="wu-block wu-my-2">
<span
class="wu-w-full wu-no-underline <?php echo wu_env_picker('wu-text-sm', 'button button-primary button-disabled'); ?>">
<?php _e('Current Site', 'wp-ultimo'); ?>
<?php esc_html_e('Current Site', 'wp-multisite-waas'); ?>
</span>
</li>
@ -150,7 +148,7 @@ $show_add_new = apply_filters('wp_ultimo_my_sites_show_add_new', $show_add_new);
<li class="wu-block wu-my-2">
<a href="<?php echo esc_url($element->get_manage_url($site->get_id(), $site_manage_type, $custom_manage_page)); ?>"
class="wu-w-full wu-no-underline <?php echo wu_env_picker('wu-text-sm', 'button button-primary'); ?>">
<?php _e('Manage', 'wp-ultimo'); ?>
<?php esc_html_e('Manage', 'wp-multisite-waas'); ?>
</a>
</li>
@ -172,7 +170,7 @@ $show_add_new = apply_filters('wp_ultimo_my_sites_show_add_new', $show_add_new);
<span class="wu-text-center wu-p-8">
<span class="wu-text-3xl dashicons-wu-circle-with-plus"></span>
<span class="wu-text-lg wu-mt-2 wu-block"><?php _e('Add new Site', 'wp-ultimo'); ?></span>
<span class="wu-text-lg wu-mt-2 wu-block"><?php esc_html_e('Add new Site', 'wp-multisite-waas'); ?></span>
</span>
</a>

View File

@ -16,7 +16,7 @@
<h3 class="wu-m-0 <?php echo wu_env_picker('', 'wu-widget-title'); ?>">
<?php echo __('Actions', 'wp-ultimo'); ?>
<?php echo __('Actions', 'wp-multisite-waas'); ?>
</h3>
@ -37,7 +37,7 @@
class="
<?php
if (isset($action['classes']) && $action['classes']) {
echo esc_attr($action['classes']); } // end if;
echo esc_attr($action['classes']); }
?>
wu-px-4 wu-py-3 wu-inline-block wu-no-underline"
>
@ -61,7 +61,7 @@
<h3 class="wu-m-0 <?php echo wu_env_picker('', 'wu-widget-title'); ?>">
<?php echo __('Danger Zone', 'wp-ultimo'); ?>
<?php echo __('Danger Zone', 'wp-multisite-waas'); ?>
</h3>

View File

@ -20,12 +20,12 @@
</div>
<div class="wu-text-md wu-text-gray-600">
<span class="wu-block"><?php _e('Signups today', 'wp-ultimo'); ?></span>
<span class="wu-block"><?php esc_html_e('Signups today', 'wp-multisite-waas'); ?></span>
</div>
</li>
<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>
@ -36,7 +36,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>
@ -52,7 +52,7 @@
</div>
<div class="wu-text-md wu-text-gray-600">
<span class="wu-block"><?php _e('Today\'s gross revenue', 'wp-ultimo'); ?></span>
<span class="wu-block"><?php _e('Today\'s gross revenue', 'wp-multisite-waas'); ?></span>
</div>
</li>

View File

@ -45,7 +45,7 @@
<span class="wu-uppercase wu-text-sm wu-block">
<?php _e('Order ID', 'wp-ultimo'); ?>
<?php esc_html_e('Order ID', 'wp-multisite-waas'); ?>
</span>
@ -69,7 +69,7 @@
<span class="wu-uppercase wu-text-sm wu-block">
<?php _e('Email', 'wp-ultimo'); ?>
<?php esc_html_e('Email', 'wp-multisite-waas'); ?>
</span>
@ -87,7 +87,7 @@
<span class="wu-uppercase wu-text-sm wu-block">
<?php _e('Total', 'wp-ultimo'); ?>
<?php esc_html_e('Total', 'wp-multisite-waas'); ?>
</span>
@ -141,7 +141,7 @@
<span class="wu-uppercase wu-text-sm wu-block">
<?php _e('Order ID', 'wp-ultimo'); ?>
<?php esc_html_e('Order ID', 'wp-multisite-waas'); ?>
</span>
@ -159,7 +159,7 @@
<span class="wu-uppercase wu-text-sm wu-block">
<?php _e('Date', 'wp-ultimo'); ?>
<?php esc_html_e('Date', 'wp-multisite-waas'); ?>
</span>
@ -177,7 +177,7 @@
<span class="wu-uppercase wu-text-sm wu-block">
<?php _e('Email', 'wp-ultimo'); ?>
<?php esc_html_e('Email', 'wp-multisite-waas'); ?>
</span>
@ -195,7 +195,7 @@
<span class="wu-uppercase wu-text-sm wu-block">
<?php _e('Total', 'wp-ultimo'); ?>
<?php esc_html_e('Total', 'wp-multisite-waas'); ?>
</span>
@ -227,7 +227,7 @@
<h4 class="wu-m-0 <?php echo wu_env_picker('', 'wu-widget-title'); ?>">
<?php echo _e('Site', 'wp-ultimo'); ?>
<?php echo esc_html_e('Site', 'wp-multisite-waas'); ?>
</h4>
@ -277,7 +277,7 @@
<?php else : ?>
<span class="wu-align-middle wu-inline-block wu-rounded wu-px-2 wu-py-1 wu-uppercase wu-text-xs wu-font-bold wu-bg-green-300 wu-text-green-700">
<?php _e('Ready!', 'wp-ultimo'); ?>
<?php esc_html_e('Ready!', 'wp-multisite-waas'); ?>
</span>
<?php endif; ?>
@ -302,23 +302,23 @@
<a v-if="!creating" href="<?php echo wu_get_current_url(); ?>" class="wu-block sm:wu-inline-block wu-no-underline">
<span class="dashicons-wu-cycle wu-align-middle wu-mr-1"></span>
<?php _e('Check Status', 'wp-ultimo'); ?>
<?php esc_html_e('Check Status', 'wp-multisite-waas'); ?>
</a>
<div v-else class="wu-block sm:wu-inline-block wu-no-underline">
<span class="dashicons-wu-loader wu-align-middle wu-mr-1 wu-spin" style="display: inline-block;"></span>
<?php _e('Creating', 'wp-ultimo'); ?>
<?php esc_html_e('Creating', 'wp-multisite-waas'); ?>
</div>
<?php else : ?>
<a href="<?php echo esc_attr(get_admin_url($site->get_id())); ?>" class="wu-block sm:wu-inline-block wu-no-underline sm:wu-mr-4">
<span class="dashicons-wu-gauge wu-align-middle wu-mr-1"></span>
<?php _e('Admin Panel', 'wp-ultimo'); ?>
<?php esc_html_e('Admin Panel', 'wp-multisite-waas'); ?>
</a>
<a href="<?php echo esc_attr(wu_with_sso(get_site_url($site->get_id()))); ?>" class="wu-block sm:wu-inline-block wu-no-underline" target="_blank">
<span class="dashicons-wu-browser wu-align-middle wu-mr-1"></span>
<?php _e('Visit', 'wp-ultimo'); ?>
<?php esc_html_e('Visit', 'wp-multisite-waas'); ?>
</a>
<?php endif; ?>
@ -357,7 +357,7 @@
<h4 class="wu-m-0 <?php echo wu_env_picker('', 'wu-widget-title'); ?>">
<?php echo _e('Order Details', 'wp-ultimo'); ?>
<?php echo esc_html_e('Order Details', 'wp-multisite-waas'); ?>
</h4>
@ -374,8 +374,8 @@
<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>
@ -404,21 +404,21 @@
<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($payment->get_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('Total', 'wp-ultimo'); ?></th>
<th class="wu-text-left wu-py-2 wu-px-4"><?php esc_html_e('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>
@ -442,7 +442,7 @@
<h4 class="wu-m-0 <?php echo wu_env_picker('', 'wu-widget-title'); ?>">
<?php echo _e('Billing Address', 'wp-ultimo'); ?>
<?php echo esc_html_e('Billing Address', 'wp-multisite-waas'); ?>
</h4>