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

@@ -8,37 +8,35 @@
<div class="wu-styling">
<div class="wu-widget-inset">
<div class="wu-widget-inset">
<?php
<?php
$data = [];
$slug = 'signup_forms';
$headers = [
__('Checkout Form', 'wp-multisite-waas'),
__('Signups', 'wp-multisite-waas'),
];
$data = [];
$slug = 'signup_forms';
$headers = [
__('Checkout Form', 'wp-multisite-waas'),
__('Signups', 'wp-multisite-waas'),
];
foreach ($forms as $form) {
$line = [
esc_html($form->signup_form),
intval($form->count), // Ensure count is an integer and properly escaped
];
foreach ($forms as $form) {
$line = [
$form->signup_form,
$form->count,
];
$data[] = $line;
}
$data[] = $line;
} // end foreach;
$page->render_csv_button(
[
'headers' => $headers,
'data' => $data,
'slug' => $slug,
]
);
?>
$page->render_csv_button(
[
'headers' => $headers,
'data' => $data,
'slug' => $slug,
]
);
?>
</div>
</div>
</div>
@@ -46,34 +44,34 @@ $page->render_csv_button(
<div class="wu-advanced-filters wu--mx-3 wu--mb-3 wu-mt-3">
<table class="wp-list-table widefat fixed striped wu-border-t-0 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<th><?php _e('Checkout Form', 'wp-multisite-waas'); ?></th>
<th class="wu-text-right"><?php _e('Signups', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($forms as $form) : ?>
<table class="wp-list-table widefat fixed striped wu-border-t-0 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<td>
<?php echo $form->signup_form; ?>
<?php if ('by-admin' === $form->signup_form) : ?>
<?php echo wu_tooltip(__('Customers created via the admin panel, by super admins.', 'wp-multisite-waas')); ?>
<?php endif; ?>
</td>
<td class="wu-text-right"><?php echo $form->count; ?></td>
<th><?php esc_html_e('Checkout Form', 'wp-multisite-waas'); ?></th>
<th class="wu-text-right"><?php esc_html_e('Signups', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
<?php endforeach; ?>
<tbody>
</tbody>
<?php foreach ($forms as $form) : ?>
</table>
<tr>
<td>
<?php echo esc_html($form->signup_form); ?>
<?php if ('by-admin' === $form->signup_form) : ?>
<?php echo wp_kses_post(wu_tooltip(__('Customers created via the admin panel, by super admins.', 'wp-multisite-waas'))); ?>
<?php endif; ?>
</td>
<td class="wu-text-right"><?php echo intval($form->count); ?></td> <!-- Ensure count is an integer and properly escaped -->
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
@@ -81,7 +79,7 @@ $page->render_csv_button(
<div class="wu-bg-gray-100 wu-p-4 wu-rounded wu-mt-6">
<?php _e('No data yet.', 'wp-multisite-waas'); ?>
<?php esc_html_e('No data yet.', 'wp-multisite-waas'); ?>
</div>