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:
@ -15,8 +15,8 @@
|
||||
$data = [];
|
||||
$slug = 'most_visited_sites';
|
||||
$headers = [
|
||||
__('Site', 'wp-ultimo'),
|
||||
__('Visits', 'wp-ultimo'),
|
||||
__('Site', 'wp-multisite-waas'),
|
||||
__('Visits', 'wp-multisite-waas'),
|
||||
];
|
||||
|
||||
foreach ($sites as $site_visits) {
|
||||
@ -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-ultimo'); ?></th>
|
||||
<th class="wu-text-right"><?php _e('Visits', 'wp-ultimo'); ?></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,29 +64,29 @@ $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-ultimo'); ?>" 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-ultimo'); ?>
|
||||
<?php esc_html_e('Homepage', 'wp-multisite-waas'); ?>
|
||||
|
||||
</a>
|
||||
|
||||
<a title="<?php _e('Dashboard', 'wp-ultimo'); ?>" 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-ultimo'); ?>
|
||||
<?php esc_html_e('Dashboard', 'wp-multisite-waas'); ?>
|
||||
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td class="wu-align-middle wu-text-right">
|
||||
<?php printf(_n('%d visit', '%d visits', $site_visits->count, 'wp-ultimo'), $site_visits->count); ?>
|
||||
<?php printf(_n('%d visit', '%d visits', $site_visits->count, 'wp-multisite-waas'), $site_visits->count); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -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-ultimo'); ?>
|
||||
<?php esc_html_e('No visits registered in this period.', 'wp-multisite-waas'); ?>
|
||||
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user