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

@ -14,11 +14,11 @@
$data = [];
$slug = 'taxes_by_day';
$headers = [
__('Day', 'wp-ultimo'),
__('Orders', 'wp-ultimo'),
__('Total Sales', 'wp-ultimo'),
__('Tax Total', 'wp-ultimo'),
__('Net Profit', 'wp-ultimo'),
__('Day', 'wp-multisite-waas'),
__('Orders', 'wp-multisite-waas'),
__('Total Sales', 'wp-multisite-waas'),
__('Tax Total', 'wp-multisite-waas'),
__('Net Profit', 'wp-multisite-waas'),
];
foreach ($taxes_by_day as $day => $tax_line) {
@ -31,7 +31,7 @@
];
$data[] = $line;
} // end foreach;
}
$page->render_csv_button(
[
@ -47,11 +47,11 @@
<thead>
<tr>
<th class="wu-w-1/3"><?php _e('Day', 'wp-ultimo'); ?></th>
<th><?php _e('Orders', 'wp-ultimo'); ?></th>
<th><?php _e('Total Sales', 'wp-ultimo'); ?></th>
<th><?php _e('Tax Total', 'wp-ultimo'); ?></th>
<th><?php _e('Net Profit', 'wp-ultimo'); ?></th>
<th class="wu-w-1/3"><?php esc_html_e('Day', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Orders', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Total Sales', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Tax Total', 'wp-multisite-waas'); ?></th>
<th><?php esc_html_e('Net Profit', 'wp-multisite-waas'); ?></th>
</tr>
</thead>
@ -62,21 +62,11 @@
<?php foreach ($taxes_by_day as $day => $tax_line) : ?>
<tr>
<td>
<?php echo date_i18n(get_option('date_format'), strtotime($day)); ?>
</td>
<td>
<?php echo $tax_line['order_count']; ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['total']); ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['tax_total']); ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['net_profit']); ?>
</td>
<td><?php echo esc_html(date_i18n(get_option('date_format'), strtotime($day))); ?></td>
<td><?php echo intval($tax_line['order_count']); ?></td>
<td><?php echo esc_html(wu_format_currency($tax_line['total'])); ?></td>
<td><?php echo esc_html(wu_format_currency($tax_line['tax_total'])); ?></td>
<td><?php echo esc_html(wu_format_currency($tax_line['net_profit'])); ?></td>
</tr>
<?php endforeach; ?>
@ -85,7 +75,7 @@
<tr>
<td colspan="4">
<?php _e('No Taxes found.', 'wp-ultimo'); ?>
<?php esc_html_e('No Taxes found.', 'wp-multisite-waas'); ?>
</td>
</tr>