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

@ -64,7 +64,7 @@ class Validator {
public function __construct() {
// translators: %s is the field name.
$field_required_message = sprintf(__('The %s field is required', 'wp-ultimo'), ':attribute');
$field_required_message = sprintf(__('The %s field is required', 'wp-multisite-waas'), ':attribute');
$validation_error_messages = apply_filters(
'wu_validator_error_messages',
@ -73,17 +73,17 @@ class Validator {
'required_without' => $field_required_message,
'required_with' => $field_required_message,
// translators: %s is the email field identifier
'email' => sprintf(__('The %s is not valid email', 'wp-ultimo'), ':attribute'),
'email' => sprintf(__('The %s is not valid email', 'wp-multisite-waas'), ':attribute'),
// translators: 1st %s is the field name; 2nd is the allowed value
'min' => sprintf(__('The %1$s minimum is %2$s', 'wp-ultimo'), ':attribute', ':min'),
'min' => sprintf(__('The %1$s minimum is %2$s', 'wp-multisite-waas'), ':attribute', ':min'),
// translators: 1st %s is the field name; 2nd is the allowed value
'max' => sprintf(__('The %1$s maximum is %2$s', 'wp-ultimo'), ':attribute', ':max'),
'max' => sprintf(__('The %1$s maximum is %2$s', 'wp-multisite-waas'), ':attribute', ':max'),
// translators: %s is the field identifier
'alpha_dash' => sprintf(__('The %s only allows a-z, 0-9, _ and -', 'wp-ultimo'), ':attribute'),
'alpha_dash' => sprintf(__('The %s only allows a-z, 0-9, _ and -', 'wp-multisite-waas'), ':attribute'),
// translators: %s is the field identifier
'lowercase' => sprintf(__('The %s must be lowercase', 'wp-ultimo'), ':attribute'),
'lowercase' => sprintf(__('The %s must be lowercase', 'wp-multisite-waas'), ':attribute'),
// translators: %s is the field identifier
'integer' => sprintf(__('The %s must be integer', 'wp-ultimo'), ':attribute'),
'integer' => sprintf(__('The %s must be integer', 'wp-multisite-waas'), ':attribute'),
],
$this
);
@ -92,8 +92,8 @@ class Validator {
$this->validator->setTranslations(
[
'and' => __('and', 'wp-ultimo'),
'or' => __('or', 'wp-ultimo'),
'and' => __('and', 'wp-multisite-waas'),
'or' => __('or', 'wp-multisite-waas'),
]
);