* 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
47 lines
1.2 KiB
PHP
47 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* Text field view.
|
|
*
|
|
* @since 2.0.0
|
|
*/
|
|
?>
|
|
<div class="wu-my-6">
|
|
|
|
<div class="wu-flex">
|
|
|
|
<div class="wu-w-1/3">
|
|
|
|
<label for="<?php echo esc_attr($field->id); ?>">
|
|
|
|
<?php echo esc_html($field->title); ?>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="wu-w-2/3">
|
|
|
|
<input <?php echo $field->html_attr ? $field->get_html_attributes() : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> <?php echo $field->disabled ? 'disabled="disabled"' : ''; ?> name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" id="<?php echo esc_attr($field->id); ?>" class="regular-text" value="<?php echo esc_attr(wu_get_setting($field->id)); ?>" placeholder="<?php echo esc_attr($field->placeholder ?: ''); ?>">
|
|
|
|
<?php if (isset($field->append) && ! empty($field->append)) : ?>
|
|
|
|
<?php echo $field->append; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php if ($field->desc) : ?>
|
|
|
|
<p class="description" id="<?php echo esc_attr($field->id); ?>-desc">
|
|
|
|
<?php echo $field->desc; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
|
|
|
</p>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|