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

@ -10,19 +10,19 @@
<ul id="wu-footer-nav" class="wu-text-xs wu-pb-0">
<li class="wu-inline-block wu-mx-1 wu-font-medium">
<?php printf(__('Version %s', 'wp-ultimo'), wu_get_version()); ?>
<?php printf(__('Version %s', 'wp-multisite-waas'), wu_get_version()); ?>
</li>
<?php if (WP_Ultimo()->is_loaded()) : ?>
<li class="wu-inline-block wu-mx-1">
<a href="<?php echo wu_network_admin_url('wp-ultimo-system-info'); ?>" class="wu-text-gray-500 hover:wu-text-gray-600">
<?php _e('System Info', 'wp-ultimo'); ?>
<?php esc_html_e('System Info', 'wp-multisite-waas'); ?>
</a>
</li>
<li class="wu-inline-block wu-mx-1">
<a href="<?php echo wu_network_admin_url('wp-ultimo-shortcodes'); ?>" class="wu-text-gray-500 hover:wu-text-gray-600">
<?php _e('Available Shortcodes', 'wp-ultimo'); ?>
<?php esc_html_e('Available Shortcodes', 'wp-multisite-waas'); ?>
</a>
</li>
@ -32,7 +32,7 @@
<li class="wu-inline-block wu-mx-1">
<a href="<?php echo wu_network_admin_url('wp-ultimo-settings'); ?>" class="wu-text-gray-500 hover:wu-text-gray-600">
<?php _e('Settings', 'wp-ultimo'); ?>
<?php esc_html_e('Settings', 'wp-multisite-waas'); ?>
</a>
</li>
@ -42,7 +42,7 @@
<li class="wu-inline-block wu-mx-1">
<a href="<?php echo wu_network_admin_url('wp-ultimo-jobs'); ?>" class="wu-text-gray-500 hover:wu-text-gray-600">
<?php _e('Job Queue', 'wp-ultimo'); ?>
<?php esc_html_e('Job Queue', 'wp-multisite-waas'); ?>
</a>
</li>

View File

@ -58,7 +58,7 @@
<small class="wu-ticker-container wu-hidden md:wu-inline-block">
<strong>
<span class="wu-inline-block wu-bg-gray-200 wu-rounded-full wu-py-1 wu-pl-2 wu-pr-3 wu-uppercase">
<span title="<?php esc_attr_e('Server Clock', 'wp-ultimo'); ?>" class="dashicons dashicons-wu-clock wu-text-sm wu-w-auto wu-h-auto wu-align-text-top wu-mr-1 wu-relative"></span>
<span title="<?php esc_attr_e('Server Clock', 'wp-multisite-waas'); ?>" class="dashicons dashicons-wu-clock wu-text-sm wu-w-auto wu-h-auto wu-align-text-top wu-mr-1 wu-relative"></span>
<span id="wu-ticker" class="wu-font-mono wu-font-normal">
<?php echo gmdate('Y-m-d H:i:s', wu_get_current_time('timestamp')); ?>
</span>

View File

@ -7,16 +7,16 @@
?>
<small>
<strong>
<a id="wu-container-toggle" role="tooltip" aria-label='<?php _e('Toggle container', 'wp-ultimo'); ?>' href="#" class="wu-tooltip wu-inline-block wu-py-1 wu-pl-2 md:wu-pr-3 wu-uppercase wu-text-gray-600 wu-no-underline">
<a id="wu-container-toggle" role="tooltip" aria-label='<?php esc_html_e('Toggle container', 'wp-multisite-waas'); ?>' href="#" class="wu-tooltip wu-inline-block wu-py-1 wu-pl-2 md:wu-pr-3 wu-uppercase wu-text-gray-600 wu-no-underline">
<span title="<?php esc_attr_e('Boxed', 'wp-ultimo'); ?>" class="wu-use-container dashicons dashicons-wu-arrow-with-circle-left wu-text-sm wu-w-auto wu-h-auto wu-align-text-bottom wu-relative"></span>
<span title="<?php esc_attr_e('Boxed', 'wp-multisite-waas'); ?>" class="wu-use-container dashicons dashicons-wu-arrow-with-circle-left wu-text-sm wu-w-auto wu-h-auto wu-align-text-bottom wu-relative"></span>
<span class="wu-font-bold wu-use-container">
<?php esc_attr_e('Boxed', 'wp-ultimo'); ?>
<?php esc_attr_e('Boxed', 'wp-multisite-waas'); ?>
</span>
<span title="<?php esc_attr_e('Boxed', 'wp-ultimo'); ?>" class="wu-no-container dashicons dashicons-wu-arrow-with-circle-right wu-text-sm wu-w-auto wu-h-auto wu-align-text-bottom wu-relative"></span>
<span title="<?php esc_attr_e('Boxed', 'wp-multisite-waas'); ?>" class="wu-no-container dashicons dashicons-wu-arrow-with-circle-right wu-text-sm wu-w-auto wu-h-auto wu-align-text-bottom wu-relative"></span>
<span class="wu-font-bold wu-no-container">
<?php esc_attr_e('Wide', 'wp-ultimo'); ?>
<?php esc_attr_e('Wide', 'wp-multisite-waas'); ?>
</span>
</a>

View File

@ -8,9 +8,9 @@
<small>
<strong>
<a id="wu-jumper-button-trigger" role="tooltip" aria-label='<?php echo esc_attr($jumper->add_jumper_footer_message('')); ?>' href="#" class="wu-tooltip wu-inline-block wu-py-1 wu-pl-2 md:wu-pr-3 wu-uppercase wu-text-gray-600 wu-no-underline">
<span title="<?php esc_attr_e('Jumper', 'wp-ultimo'); ?>" class="dashicons dashicons-wu-flash wu-text-sm wu-w-auto wu-h-auto wu-align-text-top wu-relative wu--mr-1"></span>
<span title="<?php esc_attr_e('Jumper', 'wp-multisite-waas'); ?>" class="dashicons dashicons-wu-flash wu-text-sm wu-w-auto wu-h-auto wu-align-text-top wu-relative wu--mr-1"></span>
<span class="wu-font-bold">
<?php esc_attr_e('Jumper', 'wp-ultimo'); ?>
<?php esc_attr_e('Jumper', 'wp-multisite-waas'); ?>
</span>
</a>
</strong>

View File

@ -12,7 +12,7 @@
<div class="wu-jumper-icon-container wu-relative wu-w-full wu-bg-gray-100 wu-rounded">
<select id="wu-jumper-select" data-placeholder="<?php esc_attr_e('Search Anything...', 'wp-ultimo'); ?>">
<select id="wu-jumper-select" data-placeholder="<?php esc_attr_e('Search Anything...', 'wp-multisite-waas'); ?>">
<option></option>
@ -20,11 +20,11 @@
<option></option>
<optgroup label="<?php esc_attr_e('Error', 'wp-ultimo'); ?>">
<optgroup label="<?php esc_attr_e('Error', 'wp-multisite-waas'); ?>">
<option value="<?php echo network_admin_url('?wu-rebuild-jumper=1'); ?>">
<?php _e('Click to rebuild menu list', 'wp-ultimo'); ?>
<?php esc_html_e('Click to rebuild menu list', 'wp-multisite-waas'); ?>
</option>
@ -34,7 +34,7 @@
<?php foreach ($menu_groups as $optgroup => $menus) : ?>
<optgroup label="<?php esc_attr_e('Menu', 'wp-ultimo'); ?> - <?php echo esc_attr($optgroup); ?>" value="<?php esc_attr_e('Menu', 'wp-ultimo'); ?> - <?php echo esc_attr($optgroup); ?>">
<optgroup label="<?php esc_attr_e('Menu', 'wp-multisite-waas'); ?> - <?php echo esc_attr($optgroup); ?>" value="<?php esc_attr_e('Menu', 'wp-multisite-waas'); ?> - <?php echo esc_attr($optgroup); ?>">
<?php foreach ($menus as $url => $menu) : ?>
@ -50,29 +50,29 @@
<?php endforeach; ?>
<optgroup label="<?php esc_attr_e('Settings', 'wp-ultimo'); ?>" value="setting"></optgroup>
<optgroup label="<?php esc_attr_e('Settings', 'wp-multisite-waas'); ?>" value="setting"></optgroup>
<optgroup label="<?php esc_attr_e('Users', 'wp-ultimo'); ?>" value="user"></optgroup>
<optgroup label="<?php esc_attr_e('Users', 'wp-multisite-waas'); ?>" value="user"></optgroup>
<optgroup label="<?php esc_attr_e('Customers', 'wp-ultimo'); ?>" value="customer"></optgroup>
<optgroup label="<?php esc_attr_e('Customers', 'wp-multisite-waas'); ?>" value="customer"></optgroup>
<optgroup label="<?php esc_attr_e('Products', 'wp-ultimo'); ?>" value="product"></optgroup>
<optgroup label="<?php esc_attr_e('Products', 'wp-multisite-waas'); ?>" value="product"></optgroup>
<optgroup label="<?php esc_attr_e('Domains', 'wp-ultimo'); ?>" value="domain"></optgroup>
<optgroup label="<?php esc_attr_e('Domains', 'wp-multisite-waas'); ?>" value="domain"></optgroup>
<optgroup label="<?php esc_attr_e('Sites', 'wp-ultimo'); ?>" value="site"></optgroup>
<optgroup label="<?php esc_attr_e('Sites', 'wp-multisite-waas'); ?>" value="site"></optgroup>
<optgroup label="<?php esc_attr_e('Memberships', 'wp-ultimo'); ?>" value="membership"></optgroup>
<optgroup label="<?php esc_attr_e('Memberships', 'wp-multisite-waas'); ?>" value="membership"></optgroup>
<optgroup label="<?php esc_attr_e('Payments', 'wp-ultimo'); ?>" value="payment"></optgroup>
<optgroup label="<?php esc_attr_e('Payments', 'wp-multisite-waas'); ?>" value="payment"></optgroup>
<optgroup label="<?php esc_attr_e('Discount Codes', 'wp-ultimo'); ?>" value="discount-code"></optgroup>
<optgroup label="<?php esc_attr_e('Discount Codes', 'wp-multisite-waas'); ?>" value="discount-code"></optgroup>
<optgroup label="<?php esc_attr_e('Webhooks', 'wp-ultimo'); ?>" value="webhook"></optgroup>
<optgroup label="<?php esc_attr_e('Webhooks', 'wp-multisite-waas'); ?>" value="webhook"></optgroup>
<optgroup label="<?php esc_attr_e('Broadcasts', 'wp-ultimo'); ?>" value="broadcast"></optgroup>
<optgroup label="<?php esc_attr_e('Broadcasts', 'wp-multisite-waas'); ?>" value="broadcast"></optgroup>
<optgroup label="<?php esc_attr_e('Checkout Forms', 'wp-ultimo'); ?>" value="checkout-form"></optgroup>
<optgroup label="<?php esc_attr_e('Checkout Forms', 'wp-multisite-waas'); ?>" value="checkout-form"></optgroup>
<?php
@ -91,13 +91,13 @@
<div class="wu-jumper-redirecting wu-bg-gray-200">
<?php _e('Redirecting you to the target page...', 'wp-ultimo'); ?>
<?php esc_html_e('Redirecting you to the target page...', 'wp-multisite-waas'); ?>
</div>
<div class="wu-jumper-loading wu-bg-gray-200">
<?php _e('Searching Results...', 'wp-ultimo'); ?>
<?php esc_html_e('Searching Results...', 'wp-multisite-waas'); ?>
</div>

View File

@ -180,7 +180,7 @@
<span class="wu-block">{{ text }}</span>
<small><?php _e('Network Admin', 'wp-ultimo'); ?> &rarr; {{ group }}</small>
<small><?php esc_html_e('Network Admin', 'wp-multisite-waas'); ?> &rarr; {{ group }}</small>
</div>
@ -216,7 +216,7 @@
<span class="wu-block">{{ domain }}</span>
<small><?php _e('Mapped Domain', 'wp-ultimo'); ?></small>
<small><?php esc_html_e('Mapped Domain', 'wp-multisite-waas'); ?></small>
</div>
@ -324,7 +324,7 @@
<div class="wu-p-4 wu-block wu-flex wu-items-center">
<?php _e('Nothing Found...', 'wp-ultimo'); ?>
<?php esc_html_e('Nothing Found...', 'wp-multisite-waas'); ?>
</div>

View File

@ -18,7 +18,7 @@
if ( ! defined('ABSPATH')) {
exit; // Exit if accessed directly
} // end if;
}
/**
* Allow developers to run code before the template previewer is loaded.
@ -85,7 +85,7 @@ do_action('wu_template_previewer_before');
<a id="template_selector" href="#">
<?php _e('Select template...', 'wp-ultimo'); ?>
<?php esc_html_e('Select template...', 'wp-multisite-waas'); ?>
<span style="float: right; margin-top: -3px" class="dashicons dashicons-arrow-down-alt2"></span>
@ -126,15 +126,15 @@ do_action('wu_template_previewer_before');
<div class="responsive">
<a href="#" class="desktop active dashicons-before dashicons-desktop" title="<?php esc_attr_e('View Desktop Version', 'wp-ultimo'); ?>"></a>
<a href="#" class="desktop active dashicons-before dashicons-desktop" title="<?php esc_attr_e('View Desktop Version', 'wp-multisite-waas'); ?>"></a>
<a href="#" class="tabletlandscape dashicons-before dashicons-tablet" title="<?php esc_attr_e('View Tablet Landscape (1024x768)', 'wp-ultimo'); ?>"></a>
<a href="#" class="tabletlandscape dashicons-before dashicons-tablet" title="<?php esc_attr_e('View Tablet Landscape (1024x768)', 'wp-multisite-waas'); ?>"></a>
<a href="#" class="tabletportrait dashicons-before dashicons-tablet" title="<?php esc_attr_e('View Tablet Portrait (768x1024)', 'wp-ultimo'); ?>"></a>
<a href="#" class="tabletportrait dashicons-before dashicons-tablet" title="<?php esc_attr_e('View Tablet Portrait (768x1024)', 'wp-multisite-waas'); ?>"></a>
<a href="#" class="mobilelandscape dashicons-before dashicons-smartphone" title="<?php esc_attr_e('View Mobile Landscape (480x320)', 'wp-ultimo'); ?>"></a>
<a href="#" class="mobilelandscape dashicons-before dashicons-smartphone" title="<?php esc_attr_e('View Mobile Landscape (480x320)', 'wp-multisite-waas'); ?>"></a>
<a href="#" class="mobileportrait dashicons-before dashicons-smartphone" title="<?php esc_attr_e('View Mobile Portrait (320x480)', 'wp-ultimo'); ?>"></a>
<a href="#" class="mobileportrait dashicons-before dashicons-smartphone" title="<?php esc_attr_e('View Mobile Portrait (320x480)', 'wp-multisite-waas'); ?>"></a>
</div>
@ -202,7 +202,7 @@ do_action('wu_template_previewer_before');
<div class="wu-text-xl wu-rounded wu-font-bold wu-uppercase wu-inline-block wu-p-8 wu-opacity-50" style="margin-top: 62px; background-color: #000; color: #666;">
<?php _e('Site Template Preview will go here!', 'wp-ultimo'); ?>
<?php esc_html_e('Site Template Preview will go here!', 'wp-multisite-waas'); ?>
</div>

View File

@ -16,7 +16,7 @@
<ul class="wu-inline-block wu-m-0 wu-p-0 wu-align-middle wu-mx-1">
<li class="wu-inline-block wu-m-0 wu-p-0">
<span id="wu-toolbox-toggle" class="dashicons-before dashicons-wu-wp-ultimo" <?php echo wu_tooltip_text(__('Toggle Toolbox', 'wp-ultimo')); ?>></span>
<span id="wu-toolbox-toggle" class="dashicons-before dashicons-wu-wp-ultimo" <?php echo wu_tooltip_text(__('Toggle Toolbox', 'wp-multisite-waas')); ?>></span>
</li>
</ul>
@ -26,7 +26,7 @@
<a href="<?php echo esc_attr(wu_network_admin_url('wp-ultimo-edit-site', ['id' => $current_site->get_id()])); ?>"
class="wu-inline-block wu-uppercase wu-text-gray-600 wu-no-underline">
<span title="<?php esc_attr_e('Current Site', 'wp-ultimo'); ?>"
<span title="<?php esc_attr_e('Current Site', 'wp-multisite-waas'); ?>"
class="dashicons-wu-browser wu-text-sm wu-w-auto wu-h-auto wu-align-text-bottom wu-relative"></span>
<span class="">
<?php echo $current_site->get_title(); ?>
@ -41,7 +41,7 @@
<a href="<?php echo esc_attr(wu_network_admin_url('wp-ultimo-edit-customer', ['id' => $customer->get_id()])); ?>"
class="wu-inline-block wu-uppercase wu-text-gray-600 wu-no-underline">
<span title="<?php esc_attr_e('Current Site', 'wp-ultimo'); ?>"
<span title="<?php esc_attr_e('Current Site', 'wp-multisite-waas'); ?>"
class="dashicons-wu-user wu-text-sm wu-w-auto wu-h-auto wu-align-text-bottom wu-relative"></span>
<span class="">
<?php echo $customer->get_display_name(); ?>
@ -58,10 +58,10 @@
<a href="<?php echo esc_attr(wu_network_admin_url('wp-ultimo-edit-membership', ['id' => $membership->get_id()])); ?>"
class="wu-inline-block wu-uppercase wu-text-gray-600 wu-no-underline">
<span title="<?php esc_attr_e('Current Site', 'wp-ultimo'); ?>"
<span title="<?php esc_attr_e('Current Site', 'wp-multisite-waas'); ?>"
class="dashicons-wu-circular-graph wu-text-sm wu-w-auto wu-h-auto wu-align-text-bottom wu-relative"></span>
<span class="">
<?php printf(__('Membership <Strong>%s</strong>', 'wp-ultimo'), $membership->get_hash()); ?>
<?php printf(__('Membership <Strong>%s</strong>', 'wp-multisite-waas'), $membership->get_hash()); ?>
</span>
<span id="wu-toolbox-membership-status" class="wu-inline-block wu-w-3 wu-h-3 wu-rounded-full wu-align-text-top <?php echo esc_attr($membership->get_status_class()); ?>" <?php echo wu_tooltip_text($membership->get_status_label()); ?>>
&nbsp;
@ -79,10 +79,10 @@
<a id="wu-jumper-button-trigger" href="#"
class="wu-inline-block wu-uppercase wu-text-gray-600 wu-no-underline">
<span title="<?php esc_attr_e('Jumper', 'wp-ultimo'); ?>"
<span title="<?php esc_attr_e('Jumper', 'wp-multisite-waas'); ?>"
class="dashicons dashicons-wu-flash wu-text-sm wu-w-auto wu-h-auto wu-align-text-top wu-relative wu--mr-1"></span>
<span class="wu-font-bold">
<?php esc_attr_e('Jumper', 'wp-ultimo'); ?>
<?php esc_attr_e('Jumper', 'wp-multisite-waas'); ?>
</span>
</a>
@ -102,7 +102,7 @@ if (typeof jQuery !== 'undefined') {
});
});
})(jQuery);
} // end if;
}
</script>
<style>