Use new code style

This commit is contained in:
David Stone
2025-02-07 19:02:33 -07:00
parent 0181024ae1
commit 8433379d90
672 changed files with 37107 additions and 45249 deletions

View File

@ -7,12 +7,12 @@
?>
<div class="wu-styling">
<div class="wu-widget-inset">
<div class="wu-widget-inset">
<?php
<?php
$data = array();
$slug = 'taxes_by_day';
$data = array();
$slug = 'taxes_by_day';
$headers = array(
__('Day', 'wp-ultimo'),
__('Orders', 'wp-ultimo'),
@ -22,79 +22,79 @@
);
foreach ($taxes_by_day as $day => $tax_line) {
$line = array(
date_i18n(get_option('date_format'), strtotime($day)),
$tax_line['order_count'],
wu_format_currency($tax_line['total']),
wu_format_currency($tax_line['tax_total']),
wu_format_currency($tax_line['net_profit'])
wu_format_currency($tax_line['net_profit']),
);
$data[] = $line;
$data[] = $line;
} // end foreach;
$page->render_csv_button(array(
'headers' => $headers,
'data' => $data,
'slug' => $slug
));
$page->render_csv_button(
array(
'headers' => $headers,
'data' => $data,
'slug' => $slug,
)
);
?>
<table class="wp-list-table widefat fixed striped wu-border-none">
<table class="wp-list-table widefat fixed striped wu-border-none">
<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>
</tr>
</thead>
<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>
</tr>
</thead>
<tbody>
<tbody>
<?php if ($taxes_by_day) : ?>
<?php if ($taxes_by_day) : ?>
<?php foreach ($taxes_by_day as $day => $tax_line) : ?>
<?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>
</tr>
<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>
</tr>
<?php endforeach; ?>
<?php endforeach; ?>
<?php else : ?>
<?php else : ?>
<tr>
<td colspan="4">
<?php _e('No Taxes found.', 'wp-ultimo'); ?>
</td>
</tr>
<tr>
<td colspan="4">
<?php _e('No Taxes found.', 'wp-ultimo'); ?>
</td>
</tr>
<?php endif; ?>
<?php endif; ?>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
</div>