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,7 +20,7 @@ defined('ABSPATH') || exit;
*/
return [
'style' => [
'description' => __("The email style. Can be 'html' or 'plain-text'.", 'wp-ultimo'),
'description' => __("The email style. Can be 'html' or 'plain-text'.", 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
'enum' => [
@ -29,32 +29,32 @@ return [
],
],
'schedule' => [
'description' => __('Whether or not this is a scheduled email.', 'wp-ultimo'),
'description' => __('Whether or not this is a scheduled email.', 'wp-multisite-waas'),
'type' => 'boolean',
'required' => false,
],
'type' => [
'description' => __('The type being set.', 'wp-ultimo'),
'description' => __('The type being set.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'event' => [
'description' => __('The event that needs to be fired for this email to be sent.', 'wp-ultimo'),
'description' => __('The event that needs to be fired for this email to be sent.', 'wp-multisite-waas'),
'type' => 'string',
'required' => true,
],
'send_hours' => [
'description' => __('The amount of hours that the email will wait before is sent.', 'wp-ultimo'),
'description' => __('The amount of hours that the email will wait before is sent.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'send_days' => [
'description' => __('The amount of days that the email will wait before is sent.', 'wp-ultimo'),
'description' => __('The amount of days that the email will wait before is sent.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'schedule_type' => [
'description' => __("The type of schedule. Can be 'days' or 'hours'.", 'wp-ultimo'),
'description' => __("The type of schedule. Can be 'days' or 'hours'.", 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
'enum' => [
@ -63,27 +63,27 @@ return [
],
],
'name' => [
'description' => __('The name being set as title.', 'wp-ultimo'),
'description' => __('The name being set as title.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'custom_sender' => [
'description' => __('If has a custom sender.', 'wp-ultimo'),
'description' => __('If has a custom sender.', 'wp-multisite-waas'),
'type' => 'boolean',
'required' => false,
],
'custom_sender_name' => [
'description' => __('The name of the custom sender. E.g. From: John Doe.', 'wp-ultimo'),
'description' => __('The name of the custom sender. E.g. From: John Doe.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'custom_sender_email' => [
'description' => __('The email of the custom sender. E.g. From: johndoe@gmail.com.', 'wp-ultimo'),
'description' => __('The email of the custom sender. E.g. From: johndoe@gmail.com.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'target' => [
'description' => __("If we should send this to a customer or to the network admin. Can be 'customer' or 'admin'.", 'wp-ultimo'),
'description' => __("If we should send this to a customer or to the network admin. Can be 'customer' or 'admin'.", 'wp-multisite-waas'),
'type' => 'string',
'required' => true,
'enum' => [
@ -92,52 +92,52 @@ return [
],
],
'send_copy_to_admin' => [
'description' => __('Checks if we should send a copy of the email to the admin.', 'wp-ultimo'),
'description' => __('Checks if we should send a copy of the email to the admin.', 'wp-multisite-waas'),
'type' => 'boolean',
'required' => false,
],
'active' => [
'description' => __('Set this email as active (true), which means available will fire when the event occur, or inactive (false).', 'wp-ultimo'),
'description' => __('Set this email as active (true), which means available will fire when the event occur, or inactive (false).', 'wp-multisite-waas'),
'type' => 'boolean',
'required' => false,
],
'legacy' => [
'description' => __('Whether or not this is a legacy email.', 'wp-ultimo'),
'description' => __('Whether or not this is a legacy email.', 'wp-multisite-waas'),
'type' => 'boolean',
'required' => false,
],
'title' => [
'description' => __('Post title.', 'wp-ultimo'),
'description' => __('Post title.', 'wp-multisite-waas'),
'type' => 'string',
'required' => true,
],
'content' => [
'description' => __('Post content.', 'wp-ultimo'),
'description' => __('Post content.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'excerpt' => [
'description' => __('Post excerpt.', 'wp-ultimo'),
'description' => __('Post excerpt.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'date_created' => [
'description' => __('Post creation date.', 'wp-ultimo'),
'description' => __('Post creation date.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'date_modified' => [
'description' => __('Post last modification date.', 'wp-ultimo'),
'description' => __('Post last modification date.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'migrated_from_id' => [
'description' => __('The ID of the original 1.X model that was used to generate this item on migration.', 'wp-ultimo'),
'description' => __('The ID of the original 1.X model that was used to generate this item on migration.', 'wp-multisite-waas'),
'type' => 'integer',
'required' => false,
],
'skip_validation' => [
'description' => __('Set true to have field information validation bypassed when saving this event.', 'wp-ultimo'),
'description' => __('Set true to have field information validation bypassed when saving this event.', 'wp-multisite-waas'),
'type' => 'boolean',
'required' => false,
],