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

@ -20,11 +20,11 @@ $content_wrapper_classes = $field->content_wrapper_classes
?>
<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="<?php echo $mq; ?>md:wu-flex wu-items-center wu-w-full">
<div class="<?php echo esc_attr($mq); ?>md:wu-flex wu-items-center wu-w-full">
<div class="<?php echo $mq; ?>md:wu-w-10/12">
<div class="<?php echo esc_attr($mq); ?>md:wu-w-10/12">
<?php
@ -42,7 +42,7 @@ $content_wrapper_classes = $field->content_wrapper_classes
?>
<div class="<?php echo $mq; ?>md:wu-w-9/12">
<div class="<?php echo esc_attr($mq); ?>md:wu-w-9/12">
<?php
@ -70,24 +70,24 @@ $content_wrapper_classes = $field->content_wrapper_classes
<div class="wu-relative wu-w-full wu-overflow-hidden">
<div class="wu-self-center wu-rounded wu-flex <?php echo $mq; ?>md:wu-max-w-full wu-min-w-full <?php echo $mq; ?>md:wu-max-h-20 wu-overflow-hidden">
<div class="wu-self-center wu-rounded wu-flex <?php echo esc_attr($mq); ?>md:wu-max-w-full wu-min-w-full <?php echo esc_attr($mq); ?>md:wu-max-h-20 wu-overflow-hidden">
<img
class="<?php echo $field->img ? '' : 'wu-absolute'; ?> wu-self-center wu-rounded sm:wu-max-w-full wu-min-w-full"
src="<?php echo $field->img; ?>"
src="<?php echo esc_url($field->img); ?>"
>
</div>
<div class="wu-wrapper-image-field-upload-actions wu-absolute wu-top-4 wu-right-4 <?php echo $mq; ?>md:wu-top-2 <?php echo $mq; ?>md:wu-right-2 wu-scale-150 <?php echo $mq; ?>md:wu-scale-100">
<div class="wu-wrapper-image-field-upload-actions wu-absolute wu-top-4 wu-right-4 <?php echo esc_attr($mq); ?>md:wu-top-2 <?php echo esc_attr($mq); ?>md:wu-right-2 wu-scale-150 <?php echo esc_attr($mq); ?>md:wu-scale-100">
<a title="<?php _e('Preview Image', 'wp-ultimo'); ?>" href="<?php echo $field->img; ?>" class="wubox wu-no-underline wu-text-center wu-inline-block wu-bg-black wu-opacity-60 wu-rounded-full wu-text-white wu-w-5 wu-h-5 wu-shadow-sm">
<a title="<?php esc_attr_e('Preview Image', 'wp-multisite-waas'); ?>" href="<?php echo esc_url($field->img); ?>" class="wubox wu-no-underline wu-text-center wu-inline-block wu-bg-black wu-opacity-60 wu-rounded-full wu-text-white wu-w-5 wu-h-5 wu-shadow-sm">
<span class="dashicons-wu-eye1 wu-align-middle" style="top: -2px;"></span>
</a>
<a title="<?php _e('Remove Image', 'wp-ultimo'); ?>" href="#" class="wu-remove-image wu-no-underline wu-text-center wu-inline-block wu-bg-black wu-opacity-60 wu-rounded-full wu-text-white wu-w-5 wu-h-5 wu-shadow-sm">
<a title="<?php esc_attr_e('Remove Image', 'wp-multisite-waas'); ?>" href="#" class="wu-remove-image wu-no-underline wu-text-center wu-inline-block wu-bg-black wu-opacity-60 wu-rounded-full wu-text-white wu-w-5 wu-h-5 wu-shadow-sm">
<span class="dashicons-wu-cross wu-align-middle"></span>
@ -97,13 +97,13 @@ $content_wrapper_classes = $field->content_wrapper_classes
</div>
<input name="<?php echo esc_attr($field_slug); ?>" type="hidden" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?> />
<input name="<?php echo esc_attr($field_slug); ?>" type="hidden" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> />
<div class="wu-add-image-wrapper <?php echo $mq; ?>md:wu-mt-0 wu-w-full" style="display: none;">
<div class="wu-add-image-wrapper <?php echo esc_attr($mq); ?>md:wu-mt-0 wu-w-full" style="display: none;">
<a class="button wu-w-full wu-text-center wu-add-image">
<span class="dashicons-wu-upload"></span> <?php _e('Upload Image', 'wp-ultimo'); ?>
<span class="dashicons-wu-upload"></span> <?php esc_html_e('Upload Image', 'wp-multisite-waas'); ?>
</a>