Prep Plugin for release on WordPress.org

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.
This commit is contained in:
David Stone
2025-04-07 09:15:21 -06:00
parent f05ab77418
commit a815fdf179
290 changed files with 2999 additions and 3269 deletions

View File

@ -5,9 +5,6 @@
* @since 2.0.0
*/
$text_yes = '<span class="dashicons dashicons-yes wu-text-green-400"></span>';
$text_no = '<span class="dashicons dashicons-no-alt wu-text-red-600"></span>';
?>
<table class='wu-table-auto striped wu-w-full'>
@ -15,7 +12,7 @@ $text_no = '<span class="dashicons dashicons-no-alt wu-text-red-600"></span>';
<tr>
<td colspan="2" class="wu-px-4 wu-py-2">
<?php _e('No items found.', 'wp-multisite-waas'); ?>
<?php esc_html_e('No items found.', 'wp-multisite-waas'); ?>
</td>
</tr>
@ -25,25 +22,29 @@ $text_no = '<span class="dashicons dashicons-no-alt wu-text-red-600"></span>';
<tr>
<td class='wu-px-4 wu-py-2 wu-w-4/12'> <?php echo $value['title']; ?> </td>
<td class='wu-px-4 wu-py-2 wu-w-4/12'> <?php echo esc_html($value['title']); ?> </td>
<td class='wu-px-4 wu-py-2 wu-text-center wu-w-5'>
<?php echo wu_tooltip($value['tooltip']); ?>
<?php echo wu_tooltip($value['tooltip']); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</td>
<?php if ('Yes' === $value['value'] || 'Enabled' === $value['value']) : ?>
<td class='wu-px-4 wu-py-2'> <?php echo $text_yes; ?> </td>
<td class='wu-px-4 wu-py-2'>
<span class="dashicons dashicons-yes wu-text-green-400"></span>
</td>
<?php elseif ('No' === $value['value'] || 'Disabled' === $value['value']) : ?>
<td class='wu-px-4 wu-py-2'> <?php echo $text_no; ?> </td>
<td class='wu-px-4 wu-py-2'>
<span class="dashicons dashicons-no-alt wu-text-red-600"></span>
</td>
<?php else : ?>
<td class='wu-px-4 wu-py-2'> <?php echo $value['value']; ?> </td>
<td class='wu-px-4 wu-py-2'> <?php echo esc_html($value['value']); ?> </td>
<?php endif; ?>

View File

@ -10,14 +10,14 @@
<div id="wp-ultimo-wrap" class="<?php wu_wrap_use_container(); ?> wrap">
<h1 class="wp-heading-inline"><?php _e('System Info', 'wp-multisite-waas'); ?></h1>
<h1 class="wp-heading-inline"><?php esc_html_e('System Info', 'wp-multisite-waas'); ?></h1>
<textarea cols="100" rows="40" aria-hidden="true" class="screen-reader-text" id="hidden_textarea">
<?php foreach ($data as $name_type => $type) : ?>
<?php echo "\n" . $name_type . "\n"; ?>
<?php echo "\n" . esc_html($name_type) . "\n"; ?>
<?php foreach ($type as $key => $value) : ?>
<?php echo $value['title'] . ': ' . $value['value'] . "\n"; ?>
<?php echo esc_html($value['title'] . ': ' . $value['value']) . "\n"; ?>
<?php endforeach; ?>
<?php endforeach; ?>
@ -27,15 +27,15 @@
<span class="dashicons dashicons-admin-page wu-text-sm wu-align-middle wu-h-4 wu-w-4">&nbsp;</span>
<?php _e('Copy Data to Clipboard', 'wp-multisite-waas'); ?>
<?php esc_html_e('Copy Data to Clipboard', 'wp-multisite-waas'); ?>
</button>
<a href="<?php echo admin_url('admin-ajax.php?action=wu_generate_text_file_system_info'); ?>" class="page-title-action">
<a href="<?php echo esc_attr(admin_url('admin-ajax.php?action=wu_generate_text_file_system_info')); ?>" class="page-title-action">
<span class="dashicons dashicons-download wu-text-sm wu-align-middle wu-h-4 wu-w-4">&nbsp;</span>
<?php _e('Download File', 'wp-multisite-waas'); ?>
<?php esc_html_e('Download File', 'wp-multisite-waas'); ?>
</a>