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

@ -5,10 +5,9 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php
/**
* Adds the partial title template.
*
@ -20,23 +19,16 @@
'field' => $field,
]
);
?>
<?php foreach ($field->options as $option_value => $option_name) : ?>
<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="checkbox" name="<?php echo esc_attr($field->id); ?>[]" value="<?php echo esc_attr($option_value); ?>" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value == $option_value); ?>>
<?php echo $option_name; ?>
</label>
<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="checkbox" name="<?php echo esc_attr($field->id); ?>[]" value="<?php echo esc_attr($option_value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> <?php checked(in_array($option_value, (array) $field->value, true)); ?>>
<?php echo esc_html($option_name); ?>
</label>
<?php endforeach; ?>
<?php
/**
* Adds the partial error template.
*
@ -48,7 +40,6 @@
'field' => $field,
]
);
?>
</div>

View File

@ -5,22 +5,18 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<label class="wu-block wu-my-4" for="field-<?php echo esc_attr($field->id); ?>">
<input id="field-<?php echo esc_attr($field->id); ?>" type="checkbox" name="<?php echo esc_attr($field->id); ?>" value="1" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value); ?>>
<?php echo $field->title; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo $field->title; ?>
<?php echo wu_tooltip($field->tooltip); ?>
<?php echo $field->desc; ?>
<?php echo wu_tooltip($field->tooltip); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo $field->desc; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</label>
<?php
/**
* Adds the partial error template.
*
@ -32,7 +28,5 @@
'field' => $field,
]
);
?>
</div>

View File

@ -5,72 +5,57 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<span class="wu-block wu-w-full <?php echo esc_attr($field->classes); ?>">
<?php
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-title',
[
'field' => $field,
]
);
?>
<?php
/**
* Instantiate the form for the order details.
*
* @since 2.0.0
*/
$form = new \WP_Ultimo\UI\Form(
$field->id,
$field->fields,
[
'views' => 'checkout/fields',
'classes' => 'wu-flex wu-my-1',
'field_wrapper_classes' => 'wu-bg-transparent',
'wrap_tag' => 'span',
'step' => (object) [
'classes' => '',
],
]
);
$form->render();
/**
* Adds the partial error template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
[
'field' => $field,
]
);
?>
<?php if ($field->desc) : ?>
<span class="wu-mt-2 wu-block wu-bg-gray-100 wu-rounded wu-border-solid wu-border-gray-400 wu-border-t wu-border-l wu-border-b wu-border-r wu-text-2xs wu-py-2 wu-p-2">
<?php echo $field->desc; ?>
</span>
<?php
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-title',
[
'field' => $field,
]
);
?>
<?php
/**
* Instantiate the form for the order details.
*
* @since 2.0.0
*/
$form = new \WP_Ultimo\UI\Form(
$field->id,
$field->fields,
[
'views' => 'checkout/fields',
'classes' => 'wu-flex wu-my-1',
'field_wrapper_classes' => 'wu-bg-transparent',
'wrap_tag' => 'span',
'step' => (object) [
'classes' => '',
],
]
);
$form->render();
/**
* Adds the partial error template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
[
'field' => $field,
]
);
?>
<?php if ($field->desc) : ?>
<span class="wu-mt-2 wu-block wu-bg-gray-100 wu-rounded wu-border-solid wu-border-gray-400 wu-border-t wu-border-l wu-border-b wu-border-r wu-text-2xs wu-py-2 wu-p-2">
<?php echo esc_html($field->desc); ?>
</span>
<?php endif; ?>
</span>
</div>

View File

@ -1,27 +1,12 @@
<?php
/**
* Hidden field view.
*
* @since 2.0.0
*/
?>
<?php if (is_array($field->value)) : ?>
<?php foreach ($field->value as $index => $value) : ?>
<input id="field-<?php echo esc_attr($field->id) . '-' . esc_attr($index); ?>" name="<?php echo esc_attr($field->id); ?>[]" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input id="field-<?php echo esc_attr($field->id . '-' . $index); ?>" name="<?php echo esc_attr($field->id); ?>[]" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php endforeach; ?>
<?php else : ?>
<input id="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input id="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php endif; ?>
<?php
/**
* Adds the partial error template.
*
@ -33,5 +18,4 @@ wu_get_template(
'field' => $field,
]
);
?>

View File

@ -6,7 +6,7 @@
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="wu-block wu-w-full">
@ -24,41 +24,31 @@
]
);
/**
* Adds the partial description template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-description',
[
'field' => $field,
]
);
/**
* Adds the partial description template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-description',
[
'field' => $field,
]
);
?>
/**
* Adds the partial errors template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
[
'field' => $field,
]
);
<div class="wu-block wu-w-full wu-mt-4">
<?php echo $field->content; ?>
</div>
<?php
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
[
'field' => $field,
]
);
?>
?>
</div>

View File

@ -6,8 +6,8 @@
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php echo $field->desc; ?>
<?php echo $field->desc; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>

View File

@ -5,10 +5,9 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php
/**
* Adds the partial title template.
*
@ -20,27 +19,24 @@
'field' => $field,
]
);
?>
<input class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>" id="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>"
id="field-<?php echo esc_attr($field->id); ?>"
name="<?php echo esc_attr($field->id); ?>"
type="<?php echo esc_attr($field->type); ?>"
placeholder="<?php echo esc_attr($field->placeholder); ?>"
value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php if ($field->meter) : ?>
<span class="wu-block">
<span id="pass-strength-result" class="wu-py-2 wu-px-4 wu-bg-gray-100 wu-block wu-text-sm">
<?php _e('Strength Meter', 'wp-ultimo'); ?>
<span class="wu-block">
<span id="pass-strength-result" class="wu-py-2 wu-px-4 wu-bg-gray-100 wu-block wu-text-sm">
<?php esc_html_e('Strength Meter', 'wp-multisite-waas'); ?>
</span>
</span>
</span>
<?php endif; ?>
<?php
/**
* Adds the partial error template.
*
@ -52,12 +48,6 @@
'field' => $field,
]
);
?>
<!--
<div class="wu-border-red-300"></div>
<div class="wu-border-yellow-300"></div>
-->
</div>

View File

@ -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');

View File

@ -5,10 +5,9 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php
/**
* Adds the partial title template.
*
@ -20,23 +19,16 @@
'field' => $field,
]
);
?>
<?php foreach (wu_get_plans() as $option) : ?>
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option->get_id()); ?>">
<input id="field-products-<?php echo esc_attr($option->get_id()); ?>" type="checkbox" name="products[]" value="<?php echo esc_attr($option->get_id()); ?>" <?php echo $field->get_html_attributes(); ?> <?php checked($option->get_id() == $field->value); ?> v-model="products">
<?php echo $option->get_name(); ?>
</label>
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option->get_id()); ?>">
<input id="field-products-<?php echo esc_attr($option->get_id()); ?>" type="checkbox" name="products[]" value="<?php echo esc_attr($option->get_id()); ?>" <?php checked($option->get_id() == $field->value); ?> v-model="products">
<?php echo esc_html($option->get_name()); ?>
</label>
<?php endforeach; ?>
<?php
/**
* Adds the partial error template.
*
@ -48,7 +40,5 @@
'field' => $field,
]
);
?>
</div>

View File

@ -5,10 +5,9 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php
/**
* Adds the partial title template.
*
@ -20,23 +19,16 @@
'field' => $field,
]
);
?>
<?php foreach ($field->options as $option_value => $option_name) : ?>
<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="<?php echo esc_attr($field->id); ?>" value="<?php echo esc_attr($option_value); ?>" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value == $option_value); ?>>
<?php echo $option_name; ?>
</label>
<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="<?php echo esc_attr($field->id); ?>" value="<?php echo esc_attr($option_value); ?>" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value == $option_value); ?>>
<?php echo esc_html($option_name); ?>
</label>
<?php endforeach; ?>
<?php
/**
* Adds the partial title template.
*
@ -48,7 +40,6 @@
'field' => $field,
]
);
?>
</div>

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php
@ -28,12 +28,12 @@
id="field-<?php echo esc_attr($field->id); ?>"
name="<?php echo esc_attr($field->id); ?>"
value="<?php echo esc_attr($field->value); ?>"
<?php echo $field->get_html_attributes(); ?>
<?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
>
<?php if ($field->placeholder) : ?>
<option <?php checked(! $field->value); ?> class="wu-opacity-75"><?php echo $field->placeholder; ?></option>
<option <?php checked(! $field->value); ?> class="wu-opacity-75"><?php echo esc_html($field->placeholder); ?></option>
<?php endif; ?>
@ -43,14 +43,14 @@
value="<?php echo esc_attr($key); ?>"
<?php checked($key, $field->value); ?>
>
<?php echo $label; ?>
<?php echo esc_html($label); ?>
</option>
<?php endforeach; ?>
<?php if ($field->options_template) : ?>
<?php echo $field->options_template; ?>
<?php echo $field->options_template; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php endif; ?>

View File

@ -5,12 +5,8 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<button id="<?php echo esc_attr($field->id); ?>-btn" type="submit" name="<?php echo esc_attr($field->id); ?>-btn" <?php echo $field->get_html_attributes(); ?> class="button <?php echo esc_attr(trim($field->classes)); ?>">
<?php echo $field->title; ?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<button id="<?php echo esc_attr($field->id); ?>-btn" type="submit" name="<?php echo esc_attr($field->id); ?>-btn" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> class="button <?php echo esc_attr(trim($field->classes)); ?>">
<?php echo $field->title; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</button>
</div>

View File

@ -5,7 +5,7 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php
@ -27,27 +27,27 @@
<div class="sm:wu-flex wu-items-stretch wu-content-center">
<div <?php echo wu_array_to_html_attrs($field->prefix_html_attr ?? []); ?>>
<?php echo $field->prefix; ?>
<div <?php echo wu_array_to_html_attrs($field->prefix_html_attr ?? []); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php echo $field->prefix; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
<?php endif; ?>
<?php endif; ?>
<input class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>" id="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>" id="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php if ($field->suffix) : ?>
<?php if ($field->suffix) : ?>
<div <?php echo wu_array_to_html_attrs($field->suffix_html_attr ?? []); ?>>
<?php echo $field->suffix; ?>
</div>
<div <?php echo wu_array_to_html_attrs($field->suffix_html_attr ?? []); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php echo $field->suffix; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($field->prefix || $field->suffix) : ?>
<?php if ($field->prefix || $field->suffix) : ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php

View File

@ -5,22 +5,18 @@
* @since 2.0.0
*/
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<label class="wu-block wu-my-4" for="field-<?php echo esc_attr($field->id); ?>">
<input id="field-<?php echo esc_attr($field->id); ?>" type="checkbox" name="<?php echo esc_attr($field->id); ?>" value="1" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value); ?>>
<?php echo $field->title; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo $field->title; ?>
<?php echo wu_tooltip($field->tooltip); ?>
<?php echo $field->desc; ?>
<?php echo wu_tooltip($field->tooltip); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo $field->desc; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</label>
<?php
/**
* Adds the partial error template.
*
@ -32,7 +28,5 @@
'field' => $field,
]
);
?>
</div>

View File

@ -7,21 +7,21 @@
?>
<?php if ($form->wrap_in_form_tag) : ?>
<form id="<?php echo esc_attr($form_slug); ?>" method="<?php echo esc_attr($form->method); ?>" <?php echo $form->get_html_attributes(); ?>>
<form id="<?php echo esc_attr($form_slug); ?>" method="<?php echo esc_attr($form->method); ?>" <?php echo $form->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php else : ?>
<<?php echo $form->wrap_tag; ?> class="<?php echo esc_attr(trim($form->classes ? $form->classes . ' ' . $step->classes . ' wu-mt-2' : $step->classes . ' wu-mt-2')); ?>" <?php echo $form->get_html_attributes(); ?>>
<<?php echo $form->wrap_tag; ?> class="<?php echo esc_attr(trim($form->classes ? $form->classes . ' ' . $step->classes . ' wu-mt-2' : $step->classes . ' wu-mt-2')); ?>" <?php echo $form->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php endif; ?>
<?php if ($form->title) : ?>
<h3 class="wu-checkout-section-title"><?php echo $form->title; ?></h3>
<h3 class="wu-checkout-section-title"><?php echo esc_html($form->title); ?></h3>
<?php endif; ?>
<?php echo $rendered_fields; ?>
<?php echo $rendered_fields; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php if ($form->wrap_in_form_tag) : ?>
@ -29,6 +29,6 @@
<?php else : ?>
</<?php echo $form->wrap_tag; ?>>
</<?php echo $form->wrap_tag; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php endif; ?>