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

@ -28,7 +28,7 @@ foreach ($sites as $site_visits) {
];
$data[] = $line;
} // end foreach;
}
$page->render_csv_button(
[
@ -52,8 +52,8 @@ $page->render_csv_button(
<thead>
<tr>
<th class="wu-w-8/12"><?php _e('Site', 'wp-multisite-waas'); ?></th>
<th class="wu-text-right"><?php _e('Visits', 'wp-multisite-waas'); ?></th>
<th class="wu-w-8/12"><?php esc_html_e('Site', 'wp-multisite-waas'); ?></th>
<th class="wu-text-right"><?php esc_html_e('Visits', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
@ -64,22 +64,22 @@ $page->render_csv_button(
<tr>
<td class="wu-align-middle">
<span class="wu-uppercase wu-text-xs wu-text-gray-700 wu-font-bold">
<?php echo $site_visits->site->get_title(); ?>
<?php echo esc_html($site_visits->site->get_title()); ?>
</span>
<div class="sm:wu-flex">
<a title="<?php _e('Homepage', 'wp-multisite-waas'); ?>" href="<?php echo esc_attr(get_home_url($site_visits->site->get_id())); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight">
<a title="<?php esc_html_e('Homepage', 'wp-multisite-waas'); ?>" href="<?php echo esc_attr(get_home_url($site_visits->site->get_id())); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight">
<span class="dashicons-wu-link1 wu-align-middle wu-mr-1"></span>
<?php _e('Homepage', 'wp-multisite-waas'); ?>
<?php esc_html_e('Homepage', 'wp-multisite-waas'); ?>
</a>
<a title="<?php _e('Dashboard', 'wp-multisite-waas'); ?>" href="<?php echo esc_attr(get_admin_url($site_visits->site->get_id())); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight sm:wu-mt-0 sm:wu-ml-6">
<a title="<?php esc_html_e('Dashboard', 'wp-multisite-waas'); ?>" href="<?php echo esc_attr(get_admin_url($site_visits->site->get_id())); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight sm:wu-mt-0 sm:wu-ml-6">
<span class="dashicons-wu-browser wu-align-middle wu-mr-1"></span>
<?php _e('Dashboard', 'wp-multisite-waas'); ?>
<?php esc_html_e('Dashboard', 'wp-multisite-waas'); ?>
</a>
@ -102,7 +102,7 @@ $page->render_csv_button(
<div class="wu-bg-gray-100 wu-p-4 wu-rounded wu-mt-6">
<?php _e('No visits registered in this period.', 'wp-multisite-waas'); ?>
<?php esc_html_e('No visits registered in this period.', 'wp-multisite-waas'); ?>
</div>