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:
@ -147,51 +147,51 @@ class Default_Content_Installer extends Base_Installer {
|
||||
|
||||
$steps['create_template_site'] = [
|
||||
'done' => $this->done_creating_template_site(),
|
||||
'title' => __('Create Example Template Site', 'wp-ultimo'),
|
||||
'description' => __('This will create a template site on your network that you can use as a starting point.', 'wp-ultimo'),
|
||||
'pending' => __('Pending', 'wp-ultimo'),
|
||||
'installing' => __('Creating Template Site...', 'wp-ultimo'),
|
||||
'success' => __('Success!', 'wp-ultimo'),
|
||||
'title' => __('Create Example Template Site', 'wp-multisite-waas'),
|
||||
'description' => __('This will create a template site on your network that you can use as a starting point.', 'wp-multisite-waas'),
|
||||
'pending' => __('Pending', 'wp-multisite-waas'),
|
||||
'installing' => __('Creating Template Site...', 'wp-multisite-waas'),
|
||||
'success' => __('Success!', 'wp-multisite-waas'),
|
||||
'help' => wu_get_documentation_url('installation-errors'),
|
||||
];
|
||||
|
||||
$steps['create_products'] = [
|
||||
'done' => $this->done_creating_products(),
|
||||
'title' => __('Create Example Products', 'wp-ultimo'),
|
||||
'description' => __('This action will create example products (plans, packages, and services), so you have an starting point.', 'wp-ultimo'),
|
||||
'pending' => __('Pending', 'wp-ultimo'),
|
||||
'installing' => __('Creating Products...', 'wp-ultimo'),
|
||||
'success' => __('Success!', 'wp-ultimo'),
|
||||
'title' => __('Create Example Products', 'wp-multisite-waas'),
|
||||
'description' => __('This action will create example products (plans, packages, and services), so you have an starting point.', 'wp-multisite-waas'),
|
||||
'pending' => __('Pending', 'wp-multisite-waas'),
|
||||
'installing' => __('Creating Products...', 'wp-multisite-waas'),
|
||||
'success' => __('Success!', 'wp-multisite-waas'),
|
||||
'help' => wu_get_documentation_url('installation-errors'),
|
||||
];
|
||||
|
||||
$steps['create_checkout'] = [
|
||||
'done' => $this->done_creating_checkout_forms(),
|
||||
'title' => __('Create a Checkout Form', 'wp-ultimo'),
|
||||
'description' => __('This action will create a single-step checkout form that your customers will use to place purchases, as well as the page that goes with it.', 'wp-ultimo'),
|
||||
'pending' => __('Pending', 'wp-ultimo'),
|
||||
'installing' => __('Creating Checkout Form and Registration Page...', 'wp-ultimo'),
|
||||
'success' => __('Success!', 'wp-ultimo'),
|
||||
'title' => __('Create a Checkout Form', 'wp-multisite-waas'),
|
||||
'description' => __('This action will create a single-step checkout form that your customers will use to place purchases, as well as the page that goes with it.', 'wp-multisite-waas'),
|
||||
'pending' => __('Pending', 'wp-multisite-waas'),
|
||||
'installing' => __('Creating Checkout Form and Registration Page...', 'wp-multisite-waas'),
|
||||
'success' => __('Success!', 'wp-multisite-waas'),
|
||||
'help' => wu_get_documentation_url('installation-errors'),
|
||||
];
|
||||
|
||||
$steps['create_emails'] = [
|
||||
'done' => $this->done_creating_emails(),
|
||||
'title' => __('Create the System Emails', 'wp-ultimo'),
|
||||
'description' => __('This action will create all emails sent by WP Multisite WaaS.', 'wp-ultimo'),
|
||||
'pending' => __('Pending', 'wp-ultimo'),
|
||||
'installing' => __('Creating System Emails...', 'wp-ultimo'),
|
||||
'success' => __('Success!', 'wp-ultimo'),
|
||||
'title' => __('Create the System Emails', 'wp-multisite-waas'),
|
||||
'description' => __('This action will create all emails sent by WP Multisite WaaS.', 'wp-multisite-waas'),
|
||||
'pending' => __('Pending', 'wp-multisite-waas'),
|
||||
'installing' => __('Creating System Emails...', 'wp-multisite-waas'),
|
||||
'success' => __('Success!', 'wp-multisite-waas'),
|
||||
'help' => wu_get_documentation_url('installation-errors'),
|
||||
];
|
||||
|
||||
$steps['create_login_page'] = [
|
||||
'done' => $this->done_creating_login_page(),
|
||||
'title' => __('Create Custom Login Page', 'wp-ultimo'),
|
||||
'description' => __('This action will create a custom login page and replace the default one.', 'wp-ultimo'),
|
||||
'pending' => __('Pending', 'wp-ultimo'),
|
||||
'installing' => __('Creating Custom Login Page...', 'wp-ultimo'),
|
||||
'success' => __('Success!', 'wp-ultimo'),
|
||||
'title' => __('Create Custom Login Page', 'wp-multisite-waas'),
|
||||
'description' => __('This action will create a custom login page and replace the default one.', 'wp-multisite-waas'),
|
||||
'pending' => __('Pending', 'wp-multisite-waas'),
|
||||
'installing' => __('Creating Custom Login Page...', 'wp-multisite-waas'),
|
||||
'success' => __('Success!', 'wp-multisite-waas'),
|
||||
'help' => wu_get_documentation_url('installation-errors'),
|
||||
];
|
||||
|
||||
@ -214,7 +214,7 @@ class Default_Content_Installer extends Base_Installer {
|
||||
$template_site = [
|
||||
'domain' => $d->domain,
|
||||
'path' => $d->path,
|
||||
'title' => __('Template Site', 'wp-ultimo'),
|
||||
'title' => __('Template Site', 'wp-multisite-waas'),
|
||||
'type' => 'site_template',
|
||||
];
|
||||
|
||||
@ -225,7 +225,7 @@ class Default_Content_Installer extends Base_Installer {
|
||||
}
|
||||
|
||||
if ( ! $status) {
|
||||
$error_message = __('Template Site was not created. Maybe a site with the /template path already exists?', 'wp-ultimo');
|
||||
$error_message = __('Template Site was not created. Maybe a site with the /template path already exists?', 'wp-multisite-waas');
|
||||
|
||||
throw new \Exception($error_message);
|
||||
}
|
||||
@ -256,8 +256,8 @@ class Default_Content_Installer extends Base_Installer {
|
||||
* Free Plan
|
||||
*/
|
||||
$products[] = [
|
||||
'name' => __('Free', 'wp-ultimo'),
|
||||
'description' => __('This is an example of a free plan.', 'wp-ultimo'),
|
||||
'name' => __('Free', 'wp-multisite-waas'),
|
||||
'description' => __('This is an example of a free plan.', 'wp-multisite-waas'),
|
||||
'currency' => wu_get_setting('currency_symbol', 'USD'),
|
||||
'pricing_type' => 'free',
|
||||
'duration' => 1,
|
||||
@ -276,8 +276,8 @@ class Default_Content_Installer extends Base_Installer {
|
||||
* Premium Plan
|
||||
*/
|
||||
$products[] = [
|
||||
'name' => __('Premium', 'wp-ultimo'),
|
||||
'description' => __('This is an example of a paid plan.', 'wp-ultimo'),
|
||||
'name' => __('Premium', 'wp-multisite-waas'),
|
||||
'description' => __('This is an example of a paid plan.', 'wp-multisite-waas'),
|
||||
'currency' => wu_get_setting('currency_symbol', 'USD'),
|
||||
'pricing_type' => 'paid',
|
||||
'type' => 'plan',
|
||||
@ -296,8 +296,8 @@ class Default_Content_Installer extends Base_Installer {
|
||||
* Service
|
||||
*/
|
||||
$products[] = [
|
||||
'name' => __('SEO Consulting', 'wp-ultimo'),
|
||||
'description' => __('This is an example of a service that you can create and charge customers for.', 'wp-ultimo'),
|
||||
'name' => __('SEO Consulting', 'wp-multisite-waas'),
|
||||
'description' => __('This is an example of a service that you can create and charge customers for.', 'wp-multisite-waas'),
|
||||
'currency' => wu_get_setting('currency_symbol', 'USD'),
|
||||
'pricing_type' => 'paid',
|
||||
'type' => 'service',
|
||||
@ -335,7 +335,7 @@ class Default_Content_Installer extends Base_Installer {
|
||||
public function _install_create_checkout(): void {
|
||||
|
||||
$checkout_form = [
|
||||
'name' => __('Registration Form', 'wp-ultimo'),
|
||||
'name' => __('Registration Form', 'wp-multisite-waas'),
|
||||
'slug' => 'main-form',
|
||||
'settings' => [],
|
||||
];
|
||||
@ -361,7 +361,7 @@ class Default_Content_Installer extends Base_Installer {
|
||||
*/
|
||||
$post_details = [
|
||||
'post_name' => 'register',
|
||||
'post_title' => __('Register', 'wp-ultimo'),
|
||||
'post_title' => __('Register', 'wp-multisite-waas'),
|
||||
'post_content' => sprintf($post_content, $status->get_slug()),
|
||||
'post_status' => 'publish',
|
||||
'post_type' => 'page',
|
||||
@ -408,7 +408,7 @@ class Default_Content_Installer extends Base_Installer {
|
||||
';
|
||||
|
||||
$page_args = [
|
||||
'post_title' => __('Login', 'wp-ultimo'),
|
||||
'post_title' => __('Login', 'wp-multisite-waas'),
|
||||
'post_content' => $page_content,
|
||||
'post_status' => 'publish',
|
||||
'post_author' => get_current_user_id(),
|
||||
|
Reference in New Issue
Block a user