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:
@ -9,60 +9,33 @@
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @param array $products List of product objects.
|
||||
* @param string $name ID of the field.
|
||||
* @param string $label The field label.
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php if (empty($products)) : ?>
|
||||
|
||||
<div class="wu-text-center wu-bg-gray-100 wu-rounded wu-uppercase wu-font-semibold wu-text-xs wu-text-gray-700 wu-p-4">
|
||||
|
||||
<?php _e('No Products Found.', 'wp-multisite-waas'); ?>
|
||||
|
||||
<?php esc_html_e('No Products Found.', 'wp-multisite-waas'); ?>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="wu-flex wu-mb-4 wu--mx-2">
|
||||
|
||||
<?php foreach ($products as $product) : ?>
|
||||
|
||||
<div
|
||||
class="<?php echo "wu-product-{$product->get_id()}"; ?> wu-bg-gray-100 wu-m-2 wu-px-4 wu-py-4 wu-border wu-border-solid wu-rounded wu-border-gray-400 wu-box-border wu-flex-1 wu-flex wu-flex-col wu-justify-end"
|
||||
>
|
||||
|
||||
<div class="wu-self-start">
|
||||
|
||||
<span class="wu-font-bold wu-block wu-text-xl"><?php echo $product->get_name(); ?></span>
|
||||
<span class="wu-block wu-font-semibold"><?php echo $product->get_price_description(false); ?></span>
|
||||
|
||||
<div class="<?php echo esc_attr('wu-product-' . $product->get_id()); ?> wu-bg-gray-100 wu-m-2 wu-px-4 wu-py-4 wu-border wu-border-solid wu-rounded wu-border-gray-400 wu-box-border wu-flex-1 wu-flex wu-flex-col wu-justify-end">
|
||||
<div class="wu-self-start">
|
||||
<span class="wu-font-bold wu-block wu-text-xl"><?php echo esc_html($product->get_name()); ?></span>
|
||||
<span class="wu-block wu-font-semibold"><?php echo esc_html($product->get_price_description(false)); ?></span>
|
||||
</div>
|
||||
<div class="wu-my-4">
|
||||
<ul class="wu-m-0 wu-list-none">
|
||||
<?php foreach ($product->get_pricing_table_lines() as $key => $line) : ?>
|
||||
<li class="<?php echo esc_attr(str_replace('_', '-', $key)); ?>"><?php echo esc_html($line); ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="wu-relative">
|
||||
<a href="#wu-checkout-add-<?php echo esc_attr($product->get_slug()); ?>" class="button btn wu-w-full wu-text-center wu-inline-block"><?php esc_html_e('Select', 'wp-multisite-waas'); ?></a>
|
||||
</div>
|
||||
<input type="checkbox" style="display: none;" name="products[]" value="<?php echo esc_attr($product->get_slug()); ?>" v-model="products">
|
||||
</div>
|
||||
|
||||
<div class="wu-my-4">
|
||||
|
||||
<ul class="wu-m-0 wu-list-none">
|
||||
<?php foreach ($product->get_pricing_table_lines() as $key => $line) : ?>
|
||||
|
||||
<li class="<?php echo str_replace('_', '-', $key); ?>"><?php echo $line; ?></li>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="wu-relative">
|
||||
|
||||
<a href="#wu-checkout-add-<?php echo $product->get_slug(); ?>" class="button btn wu-w-full wu-text-center wu-inline-block">
|
||||
<?php _e('Select', 'wp-multisite-waas'); ?>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<input type="checkbox" style="display: none;" name="products[]" value="<?php echo $product->get_slug(); ?>" v-model="products">
|
||||
|
||||
</div>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user