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

@ -26,15 +26,15 @@ class Domain_Stage extends Enum {
*/
const __default = 'checking-dns'; // phpcs:ignore
const FAILED = 'failed';
const FAILED = 'failed';
const CHECKING_DNS = 'checking-dns';
const CHECKING_DNS = 'checking-dns';
const CHECKING_SSL = 'checking-ssl-cert';
const CHECKING_SSL = 'checking-ssl-cert';
const DONE_WITHOUT_SSL = 'done-without-ssl';
const DONE = 'done';
const DONE = 'done';
/**
* Returns an array with values => CSS Classes.
@ -62,11 +62,11 @@ class Domain_Stage extends Enum {
protected function labels() {
return [
static::FAILED => __('DNS Failed', 'wp-ultimo'),
static::CHECKING_DNS => __('Checking DNS', 'wp-ultimo'),
static::CHECKING_SSL => __('Checking SSL', 'wp-ultimo'),
static::DONE => __('Ready', 'wp-ultimo'),
static::DONE_WITHOUT_SSL => __('Ready (without SSL)', 'wp-ultimo'),
static::FAILED => __('DNS Failed', 'wp-multisite-waas'),
static::CHECKING_DNS => __('Checking DNS', 'wp-multisite-waas'),
static::CHECKING_SSL => __('Checking SSL', 'wp-multisite-waas'),
static::DONE => __('Ready', 'wp-multisite-waas'),
static::DONE_WITHOUT_SSL => __('Ready (without SSL)', 'wp-multisite-waas'),
];
}
}

View File

@ -51,7 +51,7 @@ abstract class Table extends \BerlinDB\Database\Table {
return false;
}
return (bool) is_main_site();
return (bool) is_main_site();
}
/**

View File

@ -26,15 +26,15 @@ class Membership_Status extends Enum {
*/
const __default = 'pending'; // phpcs:ignore
const PENDING = 'pending';
const PENDING = 'pending';
const ACTIVE = 'active';
const ACTIVE = 'active';
const TRIALING = 'trialing';
const TRIALING = 'trialing';
const EXPIRED = 'expired';
const EXPIRED = 'expired';
const ON_HOLD = 'on-hold';
const ON_HOLD = 'on-hold';
const CANCELLED = 'cancelled';
@ -65,12 +65,12 @@ class Membership_Status extends Enum {
protected function labels() {
return [
static::PENDING => __('Pending', 'wp-ultimo'),
static::ACTIVE => __('Active', 'wp-ultimo'),
static::TRIALING => __('Trialing', 'wp-ultimo'),
static::ON_HOLD => __('On Hold', 'wp-ultimo'),
static::EXPIRED => __('Expired', 'wp-ultimo'),
static::CANCELLED => __('Cancelled', 'wp-ultimo'),
static::PENDING => __('Pending', 'wp-multisite-waas'),
static::ACTIVE => __('Active', 'wp-multisite-waas'),
static::TRIALING => __('Trialing', 'wp-multisite-waas'),
static::ON_HOLD => __('On Hold', 'wp-multisite-waas'),
static::EXPIRED => __('Expired', 'wp-multisite-waas'),
static::CANCELLED => __('Cancelled', 'wp-multisite-waas'),
];
}
}

View File

@ -26,19 +26,19 @@ class Payment_Status extends Enum {
*/
const __default = 'pending'; // phpcs:ignore
const PENDING = 'pending';
const PENDING = 'pending';
const COMPLETED = 'completed';
const COMPLETED = 'completed';
const REFUND = 'refunded';
const REFUND = 'refunded';
const PARTIAL_REFUND = 'partially-refunded';
const PARTIAL = 'partially-paid';
const PARTIAL = 'partially-paid';
const FAILED = 'failed';
const FAILED = 'failed';
const CANCELLED = 'cancelled';
const CANCELLED = 'cancelled';
/**
* Returns an array with values => CSS Classes.
@ -87,13 +87,13 @@ class Payment_Status extends Enum {
protected function labels() {
return [
static::PENDING => __('Pending', 'wp-ultimo'),
static::COMPLETED => __('Completed', 'wp-ultimo'),
static::REFUND => __('Refunded', 'wp-ultimo'),
static::PARTIAL_REFUND => __('Partially Refunded', 'wp-ultimo'),
static::PARTIAL => __('Partially Paid', 'wp-ultimo'),
static::FAILED => __('Failed', 'wp-ultimo'),
static::CANCELLED => __('Cancelled', 'wp-ultimo'),
static::PENDING => __('Pending', 'wp-multisite-waas'),
static::COMPLETED => __('Completed', 'wp-multisite-waas'),
static::REFUND => __('Refunded', 'wp-multisite-waas'),
static::PARTIAL_REFUND => __('Partially Refunded', 'wp-multisite-waas'),
static::PARTIAL => __('Partially Paid', 'wp-multisite-waas'),
static::FAILED => __('Failed', 'wp-multisite-waas'),
static::CANCELLED => __('Cancelled', 'wp-multisite-waas'),
];
}
}

View File

@ -26,7 +26,7 @@ class Product_Type extends Enum {
*/
const __default = 'plan'; // phpcs:ignore
const PLAN = 'plan';
const PLAN = 'plan';
const PACKAGE = 'package';
@ -56,9 +56,9 @@ class Product_Type extends Enum {
protected function labels() {
return [
static::PLAN => __('Plan', 'wp-ultimo'),
static::PACKAGE => __('Package', 'wp-ultimo'),
static::SERVICE => __('Service', 'wp-ultimo'),
static::PLAN => __('Plan', 'wp-multisite-waas'),
static::PACKAGE => __('Package', 'wp-multisite-waas'),
static::SERVICE => __('Service', 'wp-multisite-waas'),
];
}
}

View File

@ -26,17 +26,17 @@ class Site_Type extends Enum {
*/
const __default = 'default'; // phpcs:ignore
const REGULAR = 'default';
const REGULAR = 'default';
const SITE_TEMPLATE = 'site_template';
const SITE_TEMPLATE = 'site_template';
const CUSTOMER_OWNED = 'customer_owned';
const PENDING = 'pending';
const PENDING = 'pending';
const EXTERNAL = 'external';
const EXTERNAL = 'external';
const MAIN = 'main';
const MAIN = 'main';
/**
* Returns an array with values => CSS Classes.
@ -65,11 +65,11 @@ class Site_Type extends Enum {
protected function labels() {
return [
static::REGULAR => __('Regular Site', 'wp-ultimo'),
static::SITE_TEMPLATE => __('Site Template', 'wp-ultimo'),
static::CUSTOMER_OWNED => __('Customer-Owned', 'wp-ultimo'),
static::PENDING => __('Pending', 'wp-ultimo'),
static::MAIN => __('Main Site', 'wp-ultimo'),
static::REGULAR => __('Regular Site', 'wp-multisite-waas'),
static::SITE_TEMPLATE => __('Site Template', 'wp-multisite-waas'),
static::CUSTOMER_OWNED => __('Customer-Owned', 'wp-multisite-waas'),
static::PENDING => __('Pending', 'wp-multisite-waas'),
static::MAIN => __('Main Site', 'wp-multisite-waas'),
];
}
}