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:
@ -8,7 +8,7 @@
|
||||
$active_gateways = wu_get_active_gateway_as_options();
|
||||
|
||||
?>
|
||||
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" v-cloak v-show="order && order.should_collect_payment" <?php echo $field->get_wrapper_html_attributes(); ?>>
|
||||
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" v-cloak v-show="order && order.should_collect_payment" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
|
||||
|
||||
<?php
|
||||
|
||||
@ -30,35 +30,35 @@ $active_gateways = wu_get_active_gateway_as_options();
|
||||
|
||||
<?php if (count($active_gateways) === 1) : ?>
|
||||
|
||||
<input
|
||||
id="field-gateway"
|
||||
type="hidden"
|
||||
name="gateway"
|
||||
value="<?php echo esc_attr($option_value); ?>"
|
||||
v-model="gateway"
|
||||
<?php echo $field->get_html_attributes(); ?>
|
||||
>
|
||||
<input
|
||||
id="field-gateway"
|
||||
type="hidden"
|
||||
name="gateway"
|
||||
value="<?php echo esc_attr($option_value); ?>"
|
||||
v-model="gateway"
|
||||
<?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
>
|
||||
|
||||
<?php else : ?>
|
||||
<?php else : ?>
|
||||
|
||||
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option_value); ?>">
|
||||
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option_value); ?>">
|
||||
|
||||
<input
|
||||
id="field-gateway-<?php echo esc_attr($option_value); ?>"
|
||||
type="radio"
|
||||
name="gateway"
|
||||
value="<?php echo esc_attr($option_value); ?>"
|
||||
v-model="gateway"
|
||||
class="<?php echo trim($field->classes); ?>"
|
||||
<?php echo $field->get_html_attributes(); ?>
|
||||
<?php checked($field->value == $option_value); ?>
|
||||
>
|
||||
<input
|
||||
id="field-gateway-<?php echo esc_attr($option_value); ?>"
|
||||
type="radio"
|
||||
name="gateway"
|
||||
value="<?php echo esc_attr($option_value); ?>"
|
||||
v-model="gateway"
|
||||
class="<?php echo esc_attr(trim($field->classes)); ?>"
|
||||
<?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php checked((string) $field->value === (string) $option_value, true); ?>
|
||||
>
|
||||
|
||||
<?php echo $option_name; ?>
|
||||
<?php echo esc_html($option_name); ?>
|
||||
|
||||
</label>
|
||||
</label>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
@ -78,7 +78,7 @@ $active_gateways = wu_get_active_gateway_as_options();
|
||||
|
||||
/**
|
||||
* Load Gateway fields
|
||||
*
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
do_action('wu_checkout_gateway_fields');
|
||||
|
Reference in New Issue
Block a user