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

@ -6,11 +6,11 @@
*/
?>
<h1>
<?php printf(__('Activate %s Integration', 'wp-ultimo'), $integration->get_title()); ?>
<?php printf(__('Activate %s Integration', 'wp-multisite-waas'), $integration->get_title()); ?>
</h1>
<p class="wu-text-lg wu-text-gray-600 wu-my-4">
<?php echo $integration->get_description(); ?>
<?php echo $integration->get_description(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</p>
<div class="wu-bg-white wu-p-4 wu--mx-6">
@ -18,7 +18,7 @@
<div class="wu-flex wu-justify-center">
<div class="wu-flex wu-content-center">
<img style="width: 150px;" class="wu-self-center" src="<?php echo wu_get_network_logo(); ?>">
<img style="width: 150px;" class="wu-self-center" src="<?php echo esc_url(wu_get_network_logo()); ?>">
</div>
<div class="wu-text-2xl wu-self-center wu-m-8">&rarr;</div>
@ -32,7 +32,7 @@
<div>
<span class="wu-text-sm wu-text-gray-800 wu-inline-block wu-py-4">
<?php _e('This integration will:', 'wp-ultimo'); ?>
<?php esc_html_e('This integration will:', 'wp-multisite-waas'); ?>
</span>
<ul class="wu--mx-5 wu-my-0 wu-border-t wu-border-solid wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-300">
@ -41,7 +41,7 @@
<li class="wu-flex wu-content-center wu-py-2 wu-px-4 wu-bg-gray-100 wu-border-t-0 wu-border-solid wu-border-l-0 wu-border-r-0 wu-border-b wu-border-gray-300 wu-m-0">
<span class="dashicons dashicons-yes-alt wu-text-green-400 wu-self-center wu-mr-2"></span>
<span><?php echo $line; ?></span>
<span><?php echo esc_html($line); ?></span>
</li>
<?php endforeach; ?>
@ -54,7 +54,7 @@
<div>
<span class="wu-text-sm wu-text-gray-800 wu-inline-block wu-py-4">
<?php _e('This integration will <strong>not</strong>:', 'wp-ultimo'); ?>
<?php echo wp_kses(__('This integration will <strong>not</strong>:', 'wp-multisite-waas'), ['strong' => []]); ?>
</span>
<ul class="wu--mx-5 wu-my-0 wu-border-t wu-border-solid wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-300">
@ -63,7 +63,7 @@
<li class="wu-flex wu-content-center wu-py-2 wu-px-4 wu-bg-gray-100 wu-border-t-0 wu-border-solid wu-border-l-0 wu-border-r-0 wu-border-b wu-border-gray-300 wu-m-0">
<span class="dashicons dashicons-dismiss wu-text-red-400 wu-self-center wu-mr-2"></span>
<span><?php echo $line; ?></span>
<span><?php echo esc_html($line); ?></span>
</li>
<?php endforeach; ?>
@ -79,27 +79,27 @@
<!-- Submit Box -->
<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(wu_network_admin_url('wp-ultimo-settings&tab=integrations')); ?>" class="wu-self-center button button-large wu-float-left"><?php _e('&larr; Cancel', 'wp-ultimo'); ?></a>
<a href="<?php echo esc_url(wu_network_admin_url('wp-ultimo-settings&tab=integrations')); ?>" class="wu-self-center button button-large wu-float-left"><?php esc_html_e('&larr; Cancel', 'wp-multisite-waas'); ?></a>
<span class="wu-self-center wu-content-center wu-flex">
<?php if ($integration->is_enabled()) : ?>
<span class="wu-self-center wu-text-green-800 wu-mr-4">
<?php _e('Integration already activated.', 'wp-ultimo'); ?>
<?php esc_html_e('Integration already activated.', 'wp-multisite-waas'); ?>
</span>
<?php endif; ?>
<button name="submit" value="1" class="button button-primary button-large">
<?php echo $integration->is_enabled() ? __('Deactivate', 'wp-ultimo') : __('Activate', 'wp-ultimo'); ?>
<?php echo esc_html($integration->is_enabled() ? __('Deactivate', 'wp-multisite-waas') : __('Activate', 'wp-multisite-waas')); ?>
</button>
&nbsp;
<?php if ($integration->is_enabled()) : ?>
<a href="<?php echo esc_attr($page->get_next_section_link()); ?>" class="button button-large">
<?php _e('Continue', 'wp-ultimo'); ?>
<?php esc_html_e('Continue', 'wp-multisite-waas'); ?>
</a>
<?php endif; ?>