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

@ -8,38 +8,38 @@
<div class="wu-block">
<div class="wu-block wu-text-gray-700 wu-font-bold wu-uppercase wu-text-xs wu-py-2">
<?php echo __('WP Multisite WaaS Requires:', 'wp-ultimo'); ?>
<?php echo __('WP Multisite WaaS Requires:', 'wp-multisite-waas'); ?>
</div>
<div class="wu-advanced-filters">
<table class="widefat fixed striped wu-border-b">
<thead>
<tr>
<th><?php _e('Item', 'wp-ultimo'); ?></th>
<th><?php _e('Minimum Version', 'wp-ultimo'); ?></th>
<th><?php _e('Recommended', 'wp-ultimo'); ?></th>
<th><?php _e('Installed', 'wp-ultimo'); ?></th>
<th><?php esc_html_e('Item', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Minimum Version', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Recommended', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Installed', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($requirements as $req) : ?>
<tr class="">
<td><?php echo $req['name']; ?></td>
<td><?php echo $req['required_version']; ?></td>
<td><?php echo esc_html($req['name']); ?></td>
<td><?php echo esc_html($req['required_version']); ?></td>
<?php // translators: %s is the requirement version ?>
<td><?php printf(__('%s or later'), $req['recommended_version']); ?></td>
<td><?php printf(esc_html__('%s or later', 'wp-multisite-waas'), esc_html($req['recommended_version'])); ?></td>
<td class="<?php echo $req['pass_requirements'] ? 'wu-text-green-600' : 'wu-text-red-600'; ?>">
<?php echo $req['installed_version']; ?>
<?php echo $req['pass_requirements'] ? '<span class="dashicons-wu-check"></span>' : '<span class="dashicons-wu-cross"></span>'; ?>
<?php echo esc_html($req['installed_version']); ?>
<?php echo $req['pass_requirements'] ? '<span class="dashicons-wu-check"></span>' : '<span class="dashicons-wu-cross"></span>'; ?>
<?php if ( ! $req['pass_requirements']) : ?>
<?php if ( ! $req['pass_requirements']) : ?>
<a class="wu-no-underline wu-block" href="<?php echo $req['help']; ?>" title="<?php esc_attr_e('Help', 'wp-ultimo'); ?>">
<?php _e('Read More', 'wp-ultimo'); ?>
<span class="dashicons-wu-help-with-circle"></span>
</a>
<a class="wu-no-underline wu-block" href="<?php echo esc_url($req['help']); ?>" title="<?php esc_attr_e('Help', 'wp-multisite-waas'); ?>">
<?php esc_html_e('Read More', 'wp-multisite-waas'); ?>
<span class="dashicons-wu-help-with-circle"></span>
</a>
<?php endif; ?>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
@ -49,30 +49,30 @@
</div>
<div class="wu-block wu-text-gray-700 wu-font-bold wu-uppercase wu-text-xs wu-py-2">
<?php echo __('And', 'wp-ultimo'); ?>
<?php echo esc_html__('And', 'wp-multisite-waas'); ?>
</div>
<div class="wu-advanced-filters">
<table class="widefat fixed striped wu-border-b">
<thead>
<tr>
<th><?php _e('Item', 'wp-ultimo'); ?></th>
<th><?php _e('Condition', 'wp-ultimo'); ?></th>
<th><?php esc_html_e('Item', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Condition', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($plugin_requirements as $req) : ?>
<tr class="">
<td><?php echo $req['name']; ?></td>
<td><?php echo esc_html($req['name']); ?></td>
<td class="<?php echo $req['pass_requirements'] ? 'wu-text-green-600' : 'wu-text-red-600'; ?>">
<?php echo $req['condition']; ?>
<?php echo esc_html($req['condition']); ?>
<?php echo $req['pass_requirements'] ? '<span class="dashicons-wu-check"></span>' : '<span class="dashicons-wu-cross wu-align-middle"></span>'; ?>
<?php if ( ! $req['pass_requirements']) : ?>
<a target="_blank" class="wu-no-underline wu-ml-2" href="<?php echo $req['help']; ?>" title="<?php esc_attr_e('Help', 'wp-ultimo'); ?>">
<a target="_blank" class="wu-no-underline wu-ml-2" href="<?php echo esc_url($req['help']); ?>" title="<?php esc_attr_e('Help', 'wp-multisite-waas'); ?>">
<span class="dashicons-wu-help-with-circle wu-align-baseline"></span>
<?php _e('Read More', 'wp-ultimo'); ?>
<?php esc_html_e('Read More', 'wp-multisite-waas'); ?>
</a>
<?php endif; ?>
@ -87,7 +87,7 @@
<?php if (\WP_Ultimo\Requirements::met() === false) : ?>
<div class="wu-mt-4 wu-p-4 wu-bg-red-100 wu-border wu-border-solid wu-border-red-200 wu-rounded-sm wu-text-red-500">
<?php _e('It looks like your hosting environment does not support the current version of WP Multisite WaaS. Visit the <strong>Read More</strong> links on each item to see what steps you need to take to bring your environment up to the WP Multisite WaaS current requirements.', 'wp-ultimo'); ?>
<?php esc_html_e('It looks like your hosting environment does not support the current version of WP Multisite WaaS. Visit the <strong>Read More</strong> links on each item to see what steps you need to take to bring your environment up to the WP Multisite WaaS current requirements.', 'wp-multisite-waas'); ?>
</div>
<?php endif; ?>