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:
@ -5,7 +5,7 @@
|
||||
* @since 2.0.0
|
||||
*/
|
||||
?>
|
||||
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
|
||||
<li 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">
|
||||
|
||||
@ -25,13 +25,13 @@
|
||||
|
||||
?>
|
||||
|
||||
<select class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?><?php echo isset($field->html_attr['multiple']) && $field->html_attr['multiple'] ? '[]' : ''; ?>" <?php echo $field->get_html_attributes(); ?> placeholder="<?php echo $field->placeholder; ?>">
|
||||
<select class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?><?php echo isset($field->html_attr['multiple']) && $field->html_attr['multiple'] ? '[]' : ''; ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> placeholder="<?php echo esc_attr($field->placeholder); ?>">
|
||||
|
||||
<?php foreach ($field->options as $option_value => $option_label) : ?>
|
||||
|
||||
<option <?php selected($field->value === $option_value || (is_array($field->value) && in_array($option_value, $field->value))); ?> value="<?php echo esc_attr($option_value); ?>">
|
||||
<option <?php selected($field->value === $option_value || (is_array($field->value) && in_array($option_value, $field->value, true))); ?> value="<?php echo esc_attr($option_value); ?>">
|
||||
|
||||
<?php echo $option_label; ?>
|
||||
<?php echo esc_html($option_label); ?>
|
||||
|
||||
</option>
|
||||
|
||||
@ -39,7 +39,17 @@
|
||||
|
||||
<?php if ($field->options_template) : ?>
|
||||
|
||||
<?php echo $field->options_template; ?>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
$field->options_template,
|
||||
array(
|
||||
'option' => array(
|
||||
'value' => array(),
|
||||
'selected' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
|
Reference in New Issue
Block a user