Update tranlation text domain
This commit is contained in:
@ -56,7 +56,7 @@ class Block_Manager extends Base_Manager {
|
||||
[
|
||||
[
|
||||
'slug' => 'wp-ultimo',
|
||||
'title' => __('Multisite WaaS', 'wp-ultimo'),
|
||||
'title' => __('Multisite WaaS', 'wp-multisite-waas'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
@ -127,7 +127,7 @@ class Broadcast_Manager extends Base_Manager {
|
||||
$target_products = wu_request('target_products', '');
|
||||
|
||||
if ( ! $target_customers && ! $target_products) {
|
||||
wp_send_json_error(new \WP_Error('error', __('No product or customer target was selected.', 'wp-ultimo')));
|
||||
wp_send_json_error(new \WP_Error('error', __('No product or customer target was selected.', 'wp-multisite-waas')));
|
||||
}
|
||||
|
||||
$broadcast_type = wu_request('type', 'broadcast_notice');
|
||||
@ -248,7 +248,7 @@ class Broadcast_Manager extends Base_Manager {
|
||||
}
|
||||
}
|
||||
|
||||
$error = new \WP_Error('mail-error', __('Something wrong happened.', 'wp-ultimo'));
|
||||
$error = new \WP_Error('mail-error', __('Something wrong happened.', 'wp-multisite-waas'));
|
||||
|
||||
wp_send_json_error($error);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ class Customer_Manager extends Base_Manager {
|
||||
function () {
|
||||
Event_Manager::register_model_events(
|
||||
'customer',
|
||||
__('Customer', 'wp-ultimo'),
|
||||
__('Customer', 'wp-multisite-waas'),
|
||||
['created', 'updated']
|
||||
);
|
||||
}
|
||||
@ -89,7 +89,7 @@ class Customer_Manager extends Base_Manager {
|
||||
public function handle_resend_verification_email(): void {
|
||||
|
||||
if ( ! check_ajax_referer('wu_resend_verification_email_nonce', false, false)) {
|
||||
wp_send_json_error(new \WP_Error('not-allowed', __('Error: you are not allowed to perform this action.', 'wp-ultimo')));
|
||||
wp_send_json_error(new \WP_Error('not-allowed', __('Error: you are not allowed to perform this action.', 'wp-multisite-waas')));
|
||||
|
||||
exit;
|
||||
}
|
||||
@ -97,7 +97,7 @@ class Customer_Manager extends Base_Manager {
|
||||
$customer = wu_get_current_customer();
|
||||
|
||||
if ( ! $customer) {
|
||||
wp_send_json_error(new \WP_Error('customer-not-found', __('Error: customer not found.', 'wp-ultimo')));
|
||||
wp_send_json_error(new \WP_Error('customer-not-found', __('Error: customer not found.', 'wp-multisite-waas')));
|
||||
|
||||
exit;
|
||||
}
|
||||
@ -200,7 +200,7 @@ class Customer_Manager extends Base_Manager {
|
||||
wp_die(
|
||||
sprintf(
|
||||
/* translators: the placeholder is the login URL */
|
||||
__('You must be authenticated in order to verify your email address. <a href=%s>Click here</a> to access your account.', 'wp-ultimo'),
|
||||
__('You must be authenticated in order to verify your email address. <a href=%s>Click here</a> to access your account.', 'wp-multisite-waas'),
|
||||
wp_login_url(
|
||||
add_query_arg(
|
||||
[
|
||||
@ -214,31 +214,31 @@ class Customer_Manager extends Base_Manager {
|
||||
}
|
||||
|
||||
if ( ! $customer_to_verify) {
|
||||
wp_die(__('Invalid verification key.', 'wp-ultimo'));
|
||||
wp_die(__('Invalid verification key.', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
$current_customer = wu_get_current_customer();
|
||||
|
||||
if ( ! $current_customer) {
|
||||
wp_die(__('Invalid verification key.', 'wp-ultimo'));
|
||||
wp_die(__('Invalid verification key.', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
if ($current_customer->get_id() !== $customer_to_verify->get_id()) {
|
||||
wp_die(__('Invalid verification key.', 'wp-ultimo'));
|
||||
wp_die(__('Invalid verification key.', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
if ($customer_to_verify->get_email_verification() !== 'pending') {
|
||||
wp_die(__('Invalid verification key.', 'wp-ultimo'));
|
||||
wp_die(__('Invalid verification key.', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
$key = $customer_to_verify->get_verification_key();
|
||||
|
||||
if ( ! $key) {
|
||||
wp_die(__('Invalid verification key.', 'wp-ultimo'));
|
||||
wp_die(__('Invalid verification key.', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
if ($key !== $email_verify_key) {
|
||||
wp_die(__('Invalid verification key.', 'wp-ultimo'));
|
||||
wp_die(__('Invalid verification key.', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -255,8 +255,8 @@ class Domain_Manager extends Base_Manager {
|
||||
'domain-mapping',
|
||||
'domain_mapping_header',
|
||||
[
|
||||
'title' => __('Domain Mapping Settings', 'wp-ultimo'),
|
||||
'desc' => __('Define the domain mapping settings for your network.', 'wp-ultimo'),
|
||||
'title' => __('Domain Mapping Settings', 'wp-multisite-waas'),
|
||||
'desc' => __('Define the domain mapping settings for your network.', 'wp-multisite-waas'),
|
||||
'type' => 'header',
|
||||
]
|
||||
);
|
||||
@ -265,8 +265,8 @@ class Domain_Manager extends Base_Manager {
|
||||
'domain-mapping',
|
||||
'enable_domain_mapping',
|
||||
[
|
||||
'title' => __('Enable Domain Mapping?', 'wp-ultimo'),
|
||||
'desc' => __('Do you want to enable domain mapping?', 'wp-ultimo'),
|
||||
'title' => __('Enable Domain Mapping?', 'wp-multisite-waas'),
|
||||
'desc' => __('Do you want to enable domain mapping?', 'wp-multisite-waas'),
|
||||
'type' => 'toggle',
|
||||
'default' => 1,
|
||||
]
|
||||
@ -276,16 +276,16 @@ class Domain_Manager extends Base_Manager {
|
||||
'domain-mapping',
|
||||
'force_admin_redirect',
|
||||
[
|
||||
'title' => __('Force Admin Redirect', 'wp-ultimo'),
|
||||
'desc' => __('Select how you want your users to access the admin panel if they have mapped domains.', 'wp-ultimo') . '<br><br>' . __('Force Redirect to Mapped Domain: your users with mapped domains will be redirected to theirdomain.com/wp-admin, even if they access using yournetworkdomain.com/wp-admin.', 'wp-ultimo') . '<br><br>' . __('Force Redirect to Network Domain: your users with mapped domains will be redirect to yournetworkdomain.com/wp-admin, even if they access using theirdomain.com/wp-admin.', 'wp-ultimo'),
|
||||
'title' => __('Force Admin Redirect', 'wp-multisite-waas'),
|
||||
'desc' => __('Select how you want your users to access the admin panel if they have mapped domains.', 'wp-multisite-waas') . '<br><br>' . __('Force Redirect to Mapped Domain: your users with mapped domains will be redirected to theirdomain.com/wp-admin, even if they access using yournetworkdomain.com/wp-admin.', 'wp-multisite-waas') . '<br><br>' . __('Force Redirect to Network Domain: your users with mapped domains will be redirect to yournetworkdomain.com/wp-admin, even if they access using theirdomain.com/wp-admin.', 'wp-multisite-waas'),
|
||||
'tooltip' => '',
|
||||
'type' => 'select',
|
||||
'default' => 'both',
|
||||
'require' => ['enable_domain_mapping' => 1],
|
||||
'options' => [
|
||||
'both' => __('Allow access to the admin by both mapped domain and network domain', 'wp-ultimo'),
|
||||
'force_map' => __('Force Redirect to Mapped Domain', 'wp-ultimo'),
|
||||
'force_network' => __('Force Redirect to Network Domain', 'wp-ultimo'),
|
||||
'both' => __('Allow access to the admin by both mapped domain and network domain', 'wp-multisite-waas'),
|
||||
'force_map' => __('Force Redirect to Mapped Domain', 'wp-multisite-waas'),
|
||||
'force_network' => __('Force Redirect to Network Domain', 'wp-multisite-waas'),
|
||||
],
|
||||
]
|
||||
);
|
||||
@ -294,8 +294,8 @@ class Domain_Manager extends Base_Manager {
|
||||
'domain-mapping',
|
||||
'custom_domains',
|
||||
[
|
||||
'title' => __('Enable Custom Domains?', 'wp-ultimo'),
|
||||
'desc' => __('Toggle this option if you wish to allow end-customers to add their own domains. This can be controlled on a plan per plan basis.', 'wp-ultimo'),
|
||||
'title' => __('Enable Custom Domains?', 'wp-multisite-waas'),
|
||||
'desc' => __('Toggle this option if you wish to allow end-customers to add their own domains. This can be controlled on a plan per plan basis.', 'wp-multisite-waas'),
|
||||
'type' => 'toggle',
|
||||
'default' => 1,
|
||||
'require' => [
|
||||
@ -308,9 +308,9 @@ class Domain_Manager extends Base_Manager {
|
||||
'domain-mapping',
|
||||
'domain_mapping_instructions',
|
||||
[
|
||||
'title' => __('Add New Domain Instructions', 'wp-ultimo'),
|
||||
'tooltip' => __('Display a customized message with instructions for the mapping and alerting the end-user of the risks of mapping a misconfigured domain.', 'wp-ultimo'),
|
||||
'desc' => __('You can use the placeholder <code>%NETWORK_DOMAIN%</code> and <code>%NETWORK_IP%</code>.', 'wp-ultimo'),
|
||||
'title' => __('Add New Domain Instructions', 'wp-multisite-waas'),
|
||||
'tooltip' => __('Display a customized message with instructions for the mapping and alerting the end-user of the risks of mapping a misconfigured domain.', 'wp-multisite-waas'),
|
||||
'desc' => __('You can use the placeholder <code>%NETWORK_DOMAIN%</code> and <code>%NETWORK_IP%</code>.', 'wp-multisite-waas'),
|
||||
'type' => 'textarea',
|
||||
'default' => [$this, 'default_domain_mapping_instructions'],
|
||||
'html_attr' => [
|
||||
@ -336,8 +336,8 @@ class Domain_Manager extends Base_Manager {
|
||||
'sso',
|
||||
'sso_header',
|
||||
[
|
||||
'title' => __('Single Sign-On Settings', 'wp-ultimo'),
|
||||
'desc' => __('Settings to configure the Single Sign-On functionality of WP Multisite WaaS, responsible for keeping customers and admins logged in across all network domains.', 'wp-ultimo'),
|
||||
'title' => __('Single Sign-On Settings', 'wp-multisite-waas'),
|
||||
'desc' => __('Settings to configure the Single Sign-On functionality of WP Multisite WaaS, responsible for keeping customers and admins logged in across all network domains.', 'wp-multisite-waas'),
|
||||
'type' => 'header',
|
||||
]
|
||||
);
|
||||
@ -346,8 +346,8 @@ class Domain_Manager extends Base_Manager {
|
||||
'sso',
|
||||
'enable_sso',
|
||||
[
|
||||
'title' => __('Enable Single Sign-On', 'wp-ultimo'),
|
||||
'desc' => __('Enables the Single Sign-on functionality.', 'wp-ultimo'),
|
||||
'title' => __('Enable Single Sign-On', 'wp-multisite-waas'),
|
||||
'desc' => __('Enables the Single Sign-on functionality.', 'wp-multisite-waas'),
|
||||
'type' => 'toggle',
|
||||
'default' => 1,
|
||||
]
|
||||
@ -357,8 +357,8 @@ class Domain_Manager extends Base_Manager {
|
||||
'sso',
|
||||
'restrict_sso_to_login_pages',
|
||||
[
|
||||
'title' => __('Restrict SSO Checks to Login Pages', 'wp-ultimo'),
|
||||
'desc' => __('The Single Sign-on feature adds one extra ajax calls to every page load on sites with custom domains active to check if it should perform an auth loopback. You can restrict these extra calls to the login pages of sub-sites using this option. If enabled, SSO will only work on login pages.', 'wp-ultimo'),
|
||||
'title' => __('Restrict SSO Checks to Login Pages', 'wp-multisite-waas'),
|
||||
'desc' => __('The Single Sign-on feature adds one extra ajax calls to every page load on sites with custom domains active to check if it should perform an auth loopback. You can restrict these extra calls to the login pages of sub-sites using this option. If enabled, SSO will only work on login pages.', 'wp-multisite-waas'),
|
||||
'type' => 'toggle',
|
||||
'default' => 0,
|
||||
'require' => [
|
||||
@ -371,8 +371,8 @@ class Domain_Manager extends Base_Manager {
|
||||
'sso',
|
||||
'enable_sso_loading_overlay',
|
||||
[
|
||||
'title' => __('Enable SSO Loading Overlay', 'wp-ultimo'),
|
||||
'desc' => __('When active, a loading overlay will be added on-top of the site currently being viewed while the SSO auth loopback is performed on the background.', 'wp-ultimo'),
|
||||
'title' => __('Enable SSO Loading Overlay', 'wp-multisite-waas'),
|
||||
'desc' => __('When active, a loading overlay will be added on-top of the site currently being viewed while the SSO auth loopback is performed on the background.', 'wp-multisite-waas'),
|
||||
'type' => 'toggle',
|
||||
'default' => 1,
|
||||
'require' => [
|
||||
@ -391,11 +391,11 @@ class Domain_Manager extends Base_Manager {
|
||||
|
||||
$instructions = [];
|
||||
|
||||
$instructions[] = __("Cool! You're about to make this site accessible using your own domain name!", 'wp-ultimo');
|
||||
$instructions[] = __("Cool! You're about to make this site accessible using your own domain name!", 'wp-multisite-waas');
|
||||
|
||||
$instructions[] = __("For that to work, you'll need to create a new CNAME record pointing to <code>%NETWORK_DOMAIN%</code> on your DNS manager.", 'wp-ultimo');
|
||||
$instructions[] = __("For that to work, you'll need to create a new CNAME record pointing to <code>%NETWORK_DOMAIN%</code> on your DNS manager.", 'wp-multisite-waas');
|
||||
|
||||
$instructions[] = __('After you finish that step, come back to this screen and click the button below.', 'wp-ultimo');
|
||||
$instructions[] = __('After you finish that step, come back to this screen and click the button below.', 'wp-multisite-waas');
|
||||
|
||||
return implode(PHP_EOL . PHP_EOL, $instructions);
|
||||
}
|
||||
@ -480,7 +480,7 @@ class Domain_Manager extends Base_Manager {
|
||||
$domain_url = $domain->get_domain();
|
||||
|
||||
// translators: %s is the domain name
|
||||
wu_log_add("domain-{$domain_url}", sprintf(__('Starting Check for %s', 'wp-ultimo'), $domain_url));
|
||||
wu_log_add("domain-{$domain_url}", sprintf(__('Starting Check for %s', 'wp-multisite-waas'), $domain_url));
|
||||
|
||||
if ('checking-dns' === $stage) {
|
||||
if ($domain->has_correct_dns()) {
|
||||
@ -490,7 +490,7 @@ class Domain_Manager extends Base_Manager {
|
||||
|
||||
wu_log_add(
|
||||
"domain-{$domain_url}",
|
||||
__('- DNS propagation finished, advancing domain to next step...', 'wp-ultimo')
|
||||
__('- DNS propagation finished, advancing domain to next step...', 'wp-multisite-waas')
|
||||
);
|
||||
|
||||
wu_enqueue_async_action(
|
||||
@ -517,7 +517,7 @@ class Domain_Manager extends Base_Manager {
|
||||
wu_log_add(
|
||||
"domain-{$domain_url}",
|
||||
// translators: %d is the number of minutes to try again.
|
||||
sprintf(__('- DNS propagation checks tried for the max amount of times (5 times, one every %d minutes). Marking as failed.', 'wp-ultimo'), $try_again_time)
|
||||
sprintf(__('- DNS propagation checks tried for the max amount of times (5 times, one every %d minutes). Marking as failed.', 'wp-multisite-waas'), $try_again_time)
|
||||
);
|
||||
|
||||
return;
|
||||
@ -526,7 +526,7 @@ class Domain_Manager extends Base_Manager {
|
||||
wu_log_add(
|
||||
"domain-{$domain_url}",
|
||||
// translators: %d is the number of minutes before trying again.
|
||||
sprintf(__('- DNS propagation not finished, retrying in %d minutes...', 'wp-ultimo'), $try_again_time)
|
||||
sprintf(__('- DNS propagation not finished, retrying in %d minutes...', 'wp-multisite-waas'), $try_again_time)
|
||||
);
|
||||
|
||||
wu_schedule_single_action(
|
||||
@ -551,7 +551,7 @@ class Domain_Manager extends Base_Manager {
|
||||
|
||||
wu_log_add(
|
||||
"domain-{$domain_url}",
|
||||
__('- Valid SSL cert found. Marking domain as done.', 'wp-ultimo')
|
||||
__('- Valid SSL cert found. Marking domain as done.', 'wp-multisite-waas')
|
||||
);
|
||||
|
||||
return;
|
||||
@ -567,7 +567,7 @@ class Domain_Manager extends Base_Manager {
|
||||
wu_log_add(
|
||||
"domain-{$domain_url}",
|
||||
// translators: %d is the number of minutes to try again.
|
||||
sprintf(__('- SSL checks tried for the max amount of times (5 times, one every %d minutes). Marking as ready without SSL.', 'wp-ultimo'), $try_again_time)
|
||||
sprintf(__('- SSL checks tried for the max amount of times (5 times, one every %d minutes). Marking as ready without SSL.', 'wp-multisite-waas'), $try_again_time)
|
||||
);
|
||||
|
||||
return;
|
||||
@ -576,7 +576,7 @@ class Domain_Manager extends Base_Manager {
|
||||
wu_log_add(
|
||||
"domain-{$domain_url}",
|
||||
// translators: %d is the number of minutes before trying again.
|
||||
sprintf(__('- SSL Cert not found, retrying in %d minute(s)...', 'wp-ultimo'), $try_again_time)
|
||||
sprintf(__('- SSL Cert not found, retrying in %d minute(s)...', 'wp-multisite-waas'), $try_again_time)
|
||||
);
|
||||
|
||||
wu_schedule_single_action(
|
||||
@ -665,7 +665,7 @@ class Domain_Manager extends Base_Manager {
|
||||
$domain = wu_request('domain');
|
||||
|
||||
if ( ! $domain) {
|
||||
wp_send_json_error(new \WP_Error('domain-missing', __('A valid domain was not passed.', 'wp-ultimo')));
|
||||
wp_send_json_error(new \WP_Error('domain-missing', __('A valid domain was not passed.', 'wp-multisite-waas')));
|
||||
}
|
||||
|
||||
$auth_ns = [];
|
||||
@ -678,7 +678,7 @@ class Domain_Manager extends Base_Manager {
|
||||
wp_send_json_error(
|
||||
new \WP_Error(
|
||||
'error',
|
||||
__('Not able to fetch DNS entries.', 'wp-ultimo'),
|
||||
__('Not able to fetch DNS entries.', 'wp-multisite-waas'),
|
||||
[
|
||||
'exception' => $e->getMessage(),
|
||||
]
|
||||
@ -687,7 +687,7 @@ class Domain_Manager extends Base_Manager {
|
||||
}
|
||||
|
||||
if (false === $result) {
|
||||
wp_send_json_error(new \WP_Error('error', __('Not able to fetch DNS entries.', 'wp-ultimo')));
|
||||
wp_send_json_error(new \WP_Error('error', __('Not able to fetch DNS entries.', 'wp-multisite-waas')));
|
||||
}
|
||||
|
||||
wp_send_json_success(
|
||||
@ -738,7 +738,7 @@ class Domain_Manager extends Base_Manager {
|
||||
if ( ! $integration) {
|
||||
wp_send_json_error(
|
||||
[
|
||||
'message' => __('Invalid Integration ID', 'wp-ultimo'),
|
||||
'message' => __('Invalid Integration ID', 'wp-multisite-waas'),
|
||||
]
|
||||
);
|
||||
}
|
||||
@ -750,7 +750,7 @@ class Domain_Manager extends Base_Manager {
|
||||
wp_send_json_error(
|
||||
[
|
||||
'message' => sprintf(
|
||||
__('The necessary constants were not found on your wp-config.php file: %s', 'wp-ultimo'),
|
||||
__('The necessary constants were not found on your wp-config.php file: %s', 'wp-multisite-waas'),
|
||||
implode(', ', $integration->get_missing_constants())
|
||||
),
|
||||
]
|
||||
|
@ -133,7 +133,7 @@ class Email_Manager extends Base_Manager {
|
||||
$to = $email->get_target_list($payload);
|
||||
|
||||
if (empty($to)) {
|
||||
wu_log_add('mailer', __('No targets found.', 'wp-ultimo'));
|
||||
wu_log_add('mailer', __('No targets found.', 'wp-multisite-waas'));
|
||||
|
||||
return;
|
||||
}
|
||||
@ -218,8 +218,8 @@ class Email_Manager extends Base_Manager {
|
||||
'emails',
|
||||
'sender_header',
|
||||
[
|
||||
'title' => __('Sender Settings', 'wp-ultimo'),
|
||||
'desc' => __('Change the settings of the email headers, like from and name.', 'wp-ultimo'),
|
||||
'title' => __('Sender Settings', 'wp-multisite-waas'),
|
||||
'desc' => __('Change the settings of the email headers, like from and name.', 'wp-multisite-waas'),
|
||||
'type' => 'header',
|
||||
]
|
||||
);
|
||||
@ -228,8 +228,8 @@ class Email_Manager extends Base_Manager {
|
||||
'emails',
|
||||
'from_name',
|
||||
[
|
||||
'title' => __('"From" Name', 'wp-ultimo'),
|
||||
'desc' => __('How the sender name will appear in emails sent by WP Multisite WaaS.', 'wp-ultimo'),
|
||||
'title' => __('"From" Name', 'wp-multisite-waas'),
|
||||
'desc' => __('How the sender name will appear in emails sent by WP Multisite WaaS.', 'wp-multisite-waas'),
|
||||
'type' => 'text',
|
||||
'placeholder' => get_network_option(null, 'site_name'),
|
||||
'default' => get_network_option(null, 'site_name'),
|
||||
@ -243,8 +243,8 @@ class Email_Manager extends Base_Manager {
|
||||
'emails',
|
||||
'from_email',
|
||||
[
|
||||
'title' => __('"From" E-mail', 'wp-ultimo'),
|
||||
'desc' => __('How the sender email will appear in emails sent by WP Multisite WaaS.', 'wp-ultimo'),
|
||||
'title' => __('"From" E-mail', 'wp-multisite-waas'),
|
||||
'desc' => __('How the sender email will appear in emails sent by WP Multisite WaaS.', 'wp-multisite-waas'),
|
||||
'type' => 'email',
|
||||
'placeholder' => get_network_option(null, 'admin_email'),
|
||||
'default' => get_network_option(null, 'admin_email'),
|
||||
@ -258,8 +258,8 @@ class Email_Manager extends Base_Manager {
|
||||
'emails',
|
||||
'template_header',
|
||||
[
|
||||
'title' => __('Template Settings', 'wp-ultimo'),
|
||||
'desc' => __('Change the settings of the email templates.', 'wp-ultimo'),
|
||||
'title' => __('Template Settings', 'wp-multisite-waas'),
|
||||
'desc' => __('Change the settings of the email templates.', 'wp-multisite-waas'),
|
||||
'type' => 'header',
|
||||
]
|
||||
);
|
||||
@ -268,13 +268,13 @@ class Email_Manager extends Base_Manager {
|
||||
'emails',
|
||||
'email_template_type',
|
||||
[
|
||||
'title' => __('Email Templates Style', 'wp-ultimo'),
|
||||
'desc' => __('Choose if email body will be sent using the HTML template or in plain text.', 'wp-ultimo'),
|
||||
'title' => __('Email Templates Style', 'wp-multisite-waas'),
|
||||
'desc' => __('Choose if email body will be sent using the HTML template or in plain text.', 'wp-multisite-waas'),
|
||||
'type' => 'select',
|
||||
'default' => 'html',
|
||||
'options' => [
|
||||
'html' => __('HTML Emails', 'wp-ultimo'),
|
||||
'plain' => __('Plain Emails', 'wp-ultimo'),
|
||||
'html' => __('HTML Emails', 'wp-multisite-waas'),
|
||||
'plain' => __('Plain Emails', 'wp-multisite-waas'),
|
||||
],
|
||||
'html_attr' => [
|
||||
'v-model' => 'emails_template',
|
||||
@ -286,8 +286,8 @@ class Email_Manager extends Base_Manager {
|
||||
'emails',
|
||||
'expiring_header',
|
||||
[
|
||||
'title' => __('Expiring Notification Settings', 'wp-ultimo'),
|
||||
'desc' => __('Change the settings for the expiring notification (trials and subscriptions) emails.', 'wp-ultimo'),
|
||||
'title' => __('Expiring Notification Settings', 'wp-multisite-waas'),
|
||||
'desc' => __('Change the settings for the expiring notification (trials and subscriptions) emails.', 'wp-multisite-waas'),
|
||||
'type' => 'header',
|
||||
]
|
||||
);
|
||||
@ -296,10 +296,10 @@ class Email_Manager extends Base_Manager {
|
||||
'emails',
|
||||
'expiring_days',
|
||||
[
|
||||
'title' => __('Days to Expire', 'wp-ultimo'),
|
||||
'desc' => __('Select when we should send the notification email. If you select 3 days, for example, a notification email will be sent to every membership (or trial period) expiring in the next 3 days. Memberships are checked hourly.', 'wp-ultimo'),
|
||||
'title' => __('Days to Expire', 'wp-multisite-waas'),
|
||||
'desc' => __('Select when we should send the notification email. If you select 3 days, for example, a notification email will be sent to every membership (or trial period) expiring in the next 3 days. Memberships are checked hourly.', 'wp-multisite-waas'),
|
||||
'type' => 'number',
|
||||
'placeholder' => __('e.g. 3', 'wp-ultimo'),
|
||||
'placeholder' => __('e.g. 3', 'wp-multisite-waas'),
|
||||
'html_attr' => [
|
||||
'v-model' => 'expiring_days',
|
||||
],
|
||||
@ -391,7 +391,7 @@ class Email_Manager extends Base_Manager {
|
||||
'event' => 'payment_received',
|
||||
'slug' => 'payment_received_admin',
|
||||
'target' => 'admin',
|
||||
'title' => __('You got a new payment!', 'wp-ultimo'),
|
||||
'title' => __('You got a new payment!', 'wp-multisite-waas'),
|
||||
'content' => wu_get_template_contents('emails/admin/payment-received'),
|
||||
]
|
||||
);
|
||||
@ -404,7 +404,7 @@ class Email_Manager extends Base_Manager {
|
||||
'event' => 'payment_received',
|
||||
'slug' => 'payment_received_customer',
|
||||
'target' => 'customer',
|
||||
'title' => __('We got your payment!', 'wp-ultimo'),
|
||||
'title' => __('We got your payment!', 'wp-multisite-waas'),
|
||||
'content' => wu_get_template_contents('emails/customer/payment-received'),
|
||||
]
|
||||
);
|
||||
@ -417,7 +417,7 @@ class Email_Manager extends Base_Manager {
|
||||
'event' => 'site_published',
|
||||
'target' => 'admin',
|
||||
'slug' => 'site_published_admin',
|
||||
'title' => __('A new site was created on your Network!', 'wp-ultimo'),
|
||||
'title' => __('A new site was created on your Network!', 'wp-multisite-waas'),
|
||||
'content' => wu_get_template_contents('emails/admin/site-published'),
|
||||
]
|
||||
);
|
||||
@ -430,7 +430,7 @@ class Email_Manager extends Base_Manager {
|
||||
'event' => 'site_published',
|
||||
'target' => 'customer',
|
||||
'slug' => 'site_published_customer',
|
||||
'title' => __('Your site is ready!', 'wp-ultimo'),
|
||||
'title' => __('Your site is ready!', 'wp-multisite-waas'),
|
||||
'content' => wu_get_template_contents('emails/customer/site-published'),
|
||||
]
|
||||
);
|
||||
@ -443,7 +443,7 @@ class Email_Manager extends Base_Manager {
|
||||
'event' => 'confirm_email_address',
|
||||
'target' => 'customer',
|
||||
'slug' => 'confirm_email_address',
|
||||
'title' => __('Confirm your email address!', 'wp-ultimo'),
|
||||
'title' => __('Confirm your email address!', 'wp-multisite-waas'),
|
||||
'content' => wu_get_template_contents('emails/customer/confirm-email-address'),
|
||||
]
|
||||
);
|
||||
@ -456,7 +456,7 @@ class Email_Manager extends Base_Manager {
|
||||
'event' => 'domain_created',
|
||||
'target' => 'admin',
|
||||
'slug' => 'domain_created_admin',
|
||||
'title' => __('A new domain was added to your Network!', 'wp-ultimo'),
|
||||
'title' => __('A new domain was added to your Network!', 'wp-multisite-waas'),
|
||||
'content' => wu_get_template_contents('emails/admin/domain-created'),
|
||||
]
|
||||
);
|
||||
@ -469,7 +469,7 @@ class Email_Manager extends Base_Manager {
|
||||
'event' => 'renewal_payment_created',
|
||||
'target' => 'customer',
|
||||
'slug' => 'renewal_payment_created',
|
||||
'title' => __('You have a new pending payment!', 'wp-ultimo'),
|
||||
'title' => __('You have a new pending payment!', 'wp-multisite-waas'),
|
||||
'content' => wu_get_template_contents('emails/customer/renewal-payment-created'),
|
||||
]
|
||||
);
|
||||
|
@ -191,19 +191,19 @@ class Event_Manager extends Base_Manager {
|
||||
public function event_payload_preview(): void {
|
||||
|
||||
if ( ! wu_request('event')) {
|
||||
wp_send_json_error(new \WP_Error('error', __('No event was selected.', 'wp-ultimo')));
|
||||
wp_send_json_error(new \WP_Error('error', __('No event was selected.', 'wp-multisite-waas')));
|
||||
}
|
||||
|
||||
$slug = wu_request('event');
|
||||
|
||||
if ( ! $slug) {
|
||||
wp_send_json_error(new \WP_Error('not-found', __('Event was not found.', 'wp-ultimo')));
|
||||
wp_send_json_error(new \WP_Error('not-found', __('Event was not found.', 'wp-multisite-waas')));
|
||||
}
|
||||
|
||||
$event = wu_get_event_type($slug);
|
||||
|
||||
if ( ! $event) {
|
||||
wp_send_json_error(new \WP_Error('not-found', __('Data not found.', 'wp-ultimo')));
|
||||
wp_send_json_error(new \WP_Error('not-found', __('Data not found.', 'wp-multisite-waas')));
|
||||
} else {
|
||||
$payload = isset($event['payload']) ? wu_maybe_lazy_load_payload($event['payload']) : '{}';
|
||||
|
||||
@ -367,8 +367,8 @@ class Event_Manager extends Base_Manager {
|
||||
wu_register_event_type(
|
||||
'payment_received',
|
||||
[
|
||||
'name' => __('Payment Received', 'wp-ultimo'),
|
||||
'desc' => __('This event is fired every time a new payment is received, regardless of the payment status.', 'wp-ultimo'),
|
||||
'name' => __('Payment Received', 'wp-multisite-waas'),
|
||||
'desc' => __('This event is fired every time a new payment is received, regardless of the payment status.', 'wp-multisite-waas'),
|
||||
'payload' => fn() => array_merge(
|
||||
wu_generate_event_payload('payment'),
|
||||
wu_generate_event_payload('membership'),
|
||||
@ -390,8 +390,8 @@ class Event_Manager extends Base_Manager {
|
||||
wu_register_event_type(
|
||||
'site_published',
|
||||
[
|
||||
'name' => __('Site Published', 'wp-ultimo'),
|
||||
'desc' => __('This event is fired every time a new site is created tied to a membership, or transitions from a pending state to a published state.', 'wp-ultimo'),
|
||||
'name' => __('Site Published', 'wp-multisite-waas'),
|
||||
'desc' => __('This event is fired every time a new site is created tied to a membership, or transitions from a pending state to a published state.', 'wp-multisite-waas'),
|
||||
'payload' => fn() => array_merge(
|
||||
wu_generate_event_payload('site'),
|
||||
wu_generate_event_payload('customer'),
|
||||
@ -407,8 +407,8 @@ class Event_Manager extends Base_Manager {
|
||||
wu_register_event_type(
|
||||
'confirm_email_address',
|
||||
[
|
||||
'name' => __('Email Verification Needed', 'wp-ultimo'),
|
||||
'desc' => __('This event is fired every time a new customer is added with an email verification status of pending.', 'wp-ultimo'),
|
||||
'name' => __('Email Verification Needed', 'wp-multisite-waas'),
|
||||
'desc' => __('This event is fired every time a new customer is added with an email verification status of pending.', 'wp-multisite-waas'),
|
||||
'payload' => fn() => array_merge(
|
||||
[
|
||||
'verification_link' => 'https://linktoverifyemail.com',
|
||||
@ -425,8 +425,8 @@ class Event_Manager extends Base_Manager {
|
||||
wu_register_event_type(
|
||||
'domain_created',
|
||||
[
|
||||
'name' => __('New Domain Mapping Added', 'wp-ultimo'),
|
||||
'desc' => __('This event is fired every time a new domain mapping is added by a customer.', 'wp-ultimo'),
|
||||
'name' => __('New Domain Mapping Added', 'wp-multisite-waas'),
|
||||
'desc' => __('This event is fired every time a new domain mapping is added by a customer.', 'wp-multisite-waas'),
|
||||
'payload' => fn() => array_merge(
|
||||
wu_generate_event_payload('domain'),
|
||||
wu_generate_event_payload('site'),
|
||||
@ -449,8 +449,8 @@ class Event_Manager extends Base_Manager {
|
||||
wu_register_event_type(
|
||||
'renewal_payment_created',
|
||||
[
|
||||
'name' => __('New Renewal Payment Created', 'wp-ultimo'),
|
||||
'desc' => __('This event is fired every time a new renewal payment is created by WP Multisite WaaS.', 'wp-ultimo'),
|
||||
'name' => __('New Renewal Payment Created', 'wp-multisite-waas'),
|
||||
'desc' => __('This event is fired every time a new renewal payment is created by WP Multisite WaaS.', 'wp-multisite-waas'),
|
||||
'payload' => fn() => array_merge(
|
||||
[
|
||||
'default_payment_url' => 'https://linktopayment.com',
|
||||
@ -470,8 +470,8 @@ class Event_Manager extends Base_Manager {
|
||||
wu_register_event_type(
|
||||
$model . '_' . $type,
|
||||
[
|
||||
'name' => sprintf(__('%1$s %2$s', 'wp-ultimo'), $params['label'], ucfirst($type)),
|
||||
'desc' => sprintf(__('This event is fired every time a %1$s is %2$s by WP Multisite WaaS.', 'wp-ultimo'), $params['label'], $type),
|
||||
'name' => sprintf(__('%1$s %2$s', 'wp-multisite-waas'), $params['label'], ucfirst($type)),
|
||||
'desc' => sprintf(__('This event is fired every time a %1$s is %2$s by WP Multisite WaaS.', 'wp-multisite-waas'), $params['label'], $type),
|
||||
'deprecated_args' => [],
|
||||
'payload' => fn() => $this->get_model_payload($model),
|
||||
]
|
||||
@ -621,7 +621,7 @@ class Event_Manager extends Base_Manager {
|
||||
}
|
||||
}
|
||||
|
||||
wu_log_add('wu-cron', sprintf(__('Removed %1$d events successfully. Failed to remove %2$d events.', 'wp-ultimo'), $success_count, count($events_to_remove) - $success_count));
|
||||
wu_log_add('wu-cron', sprintf(__('Removed %1$d events successfully. Failed to remove %2$d events.', 'wp-multisite-waas'), $success_count, count($events_to_remove) - $success_count));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ class Field_Templates_Manager extends Base_Manager {
|
||||
$template_class = $this->get_template_class($template_parts[0], $template_parts[1]);
|
||||
|
||||
if ( ! $template_class) {
|
||||
wp_send_json_error(new \WP_Error('template', __('Template not found.', 'wp-ultimo')));
|
||||
wp_send_json_error(new \WP_Error('template', __('Template not found.', 'wp-multisite-waas')));
|
||||
}
|
||||
|
||||
$key = $template_parts[0];
|
||||
|
@ -64,7 +64,7 @@ class Form_Manager extends Base_Manager {
|
||||
*/
|
||||
public function display_form_unavailable($error = false): void {
|
||||
|
||||
$message = __('Form not available', 'wp-ultimo');
|
||||
$message = __('Form not available', 'wp-multisite-waas');
|
||||
|
||||
if (is_wp_error($error)) {
|
||||
$message = $error->get_error_message();
|
||||
@ -352,7 +352,7 @@ class Form_Manager extends Base_Manager {
|
||||
$object = apply_filters("wu_delete_form_get_object_{$model}", $object, $id, $model);
|
||||
|
||||
if ( ! $object) {
|
||||
$this->display_form_unavailable(new \WP_Error('not-found', __('Object not found.', 'wp-ultimo')));
|
||||
$this->display_form_unavailable(new \WP_Error('not-found', __('Object not found.', 'wp-multisite-waas')));
|
||||
|
||||
return;
|
||||
}
|
||||
@ -362,16 +362,16 @@ class Form_Manager extends Base_Manager {
|
||||
[
|
||||
'confirm' => [
|
||||
'type' => 'toggle',
|
||||
'title' => __('Confirm Deletion', 'wp-ultimo'),
|
||||
'desc' => __('This action can not be undone.', 'wp-ultimo'),
|
||||
'title' => __('Confirm Deletion', 'wp-multisite-waas'),
|
||||
'desc' => __('This action can not be undone.', 'wp-multisite-waas'),
|
||||
'html_attr' => [
|
||||
'v-model' => 'confirmed',
|
||||
],
|
||||
],
|
||||
'submit_button' => [
|
||||
'type' => 'submit',
|
||||
'title' => __('Delete', 'wp-ultimo'),
|
||||
'placeholder' => __('Delete', 'wp-ultimo'),
|
||||
'title' => __('Delete', 'wp-multisite-waas'),
|
||||
'placeholder' => __('Delete', 'wp-multisite-waas'),
|
||||
'value' => 'save',
|
||||
'classes' => 'button button-primary wu-w-full',
|
||||
'wrapper_classes' => 'wu-items-end',
|
||||
@ -471,7 +471,7 @@ class Form_Manager extends Base_Manager {
|
||||
$object = apply_filters("wu_delete_form_get_object_{$model}", $object, $id, $model);
|
||||
|
||||
if ( ! $object) {
|
||||
wp_send_json_error(new \WP_Error('not-found', __('Object not found.', 'wp-ultimo')));
|
||||
wp_send_json_error(new \WP_Error('not-found', __('Object not found.', 'wp-multisite-waas')));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -496,7 +496,7 @@ class Form_Manager extends Base_Manager {
|
||||
|
||||
wp_send_json_success($data_json_success);
|
||||
} else {
|
||||
wp_send_json_error(new \WP_Error('model-not-found', __('Something went wrong.', 'wp-ultimo')));
|
||||
wp_send_json_error(new \WP_Error('model-not-found', __('Something went wrong.', 'wp-multisite-waas')));
|
||||
}
|
||||
}
|
||||
|
||||
@ -517,8 +517,8 @@ class Form_Manager extends Base_Manager {
|
||||
[
|
||||
'confirm' => [
|
||||
'type' => 'toggle',
|
||||
'title' => __('Confirm Action', 'wp-ultimo'),
|
||||
'desc' => __('Review this action carefully.', 'wp-ultimo'),
|
||||
'title' => __('Confirm Action', 'wp-multisite-waas'),
|
||||
'desc' => __('Review this action carefully.', 'wp-multisite-waas'),
|
||||
'html_attr' => [
|
||||
'v-model' => 'confirmed',
|
||||
],
|
||||
|
@ -278,11 +278,11 @@ class Gateway_Manager extends Base_Manager {
|
||||
$gateway = wu_get_gateway($gateway_id);
|
||||
|
||||
if ( ! $gateway) {
|
||||
$error = new \WP_Error('missing_gateway', esc_html__('Missing gateway parameter.', 'wp-ultimo'));
|
||||
$error = new \WP_Error('missing_gateway', esc_html__('Missing gateway parameter.', 'wp-multisite-waas'));
|
||||
|
||||
wp_die(
|
||||
$error,
|
||||
esc_html__('Error', 'wp-ultimo'),
|
||||
esc_html__('Error', 'wp-multisite-waas'),
|
||||
[
|
||||
'back_link' => true,
|
||||
'response' => '200',
|
||||
@ -311,7 +311,7 @@ class Gateway_Manager extends Base_Manager {
|
||||
if (is_wp_error($results)) {
|
||||
wp_die(
|
||||
$results,
|
||||
__('Error', 'wp-ultimo'),
|
||||
__('Error', 'wp-multisite-waas'),
|
||||
[
|
||||
'back_link' => true,
|
||||
'response' => '200',
|
||||
@ -323,7 +323,7 @@ class Gateway_Manager extends Base_Manager {
|
||||
|
||||
wp_die(
|
||||
$error,
|
||||
__('Error', 'wp-ultimo'),
|
||||
__('Error', 'wp-multisite-waas'),
|
||||
[
|
||||
'back_link' => true,
|
||||
'response' => '200',
|
||||
@ -354,8 +354,8 @@ class Gateway_Manager extends Base_Manager {
|
||||
'payment-gateways',
|
||||
'active_gateways',
|
||||
[
|
||||
'title' => __('Active Payment Gateways', 'wp-ultimo'),
|
||||
'desc' => __('Payment gateways are what your customers will use to pay.', 'wp-ultimo'),
|
||||
'title' => __('Active Payment Gateways', 'wp-multisite-waas'),
|
||||
'desc' => __('Payment gateways are what your customers will use to pay.', 'wp-multisite-waas'),
|
||||
'type' => 'multiselect',
|
||||
'columns' => 2,
|
||||
'options' => [$this, 'get_gateways_as_options'],
|
||||
@ -393,31 +393,31 @@ class Gateway_Manager extends Base_Manager {
|
||||
/*
|
||||
* Free Payments
|
||||
*/
|
||||
wu_register_gateway('free', __('Free', 'wp-ultimo'), '', Free_Gateway::class, true);
|
||||
wu_register_gateway('free', __('Free', 'wp-multisite-waas'), '', Free_Gateway::class, true);
|
||||
|
||||
/*
|
||||
* Stripe Payments
|
||||
*/
|
||||
$stripe_desc = __('Stripe is a suite of payment APIs that powers commerce for businesses of all sizes, including subscription management.', 'wp-ultimo');
|
||||
wu_register_gateway('stripe', __('Stripe', 'wp-ultimo'), $stripe_desc, Stripe_Gateway::class);
|
||||
$stripe_desc = __('Stripe is a suite of payment APIs that powers commerce for businesses of all sizes, including subscription management.', 'wp-multisite-waas');
|
||||
wu_register_gateway('stripe', __('Stripe', 'wp-multisite-waas'), $stripe_desc, Stripe_Gateway::class);
|
||||
|
||||
/*
|
||||
* Stripe Checkout Payments
|
||||
*/
|
||||
$stripe_checkout_desc = __('Stripe Checkout is the hosted solution for checkouts using Stripe.', 'wp-ultimo');
|
||||
wu_register_gateway('stripe-checkout', __('Stripe Checkout', 'wp-ultimo'), $stripe_checkout_desc, Stripe_Checkout_Gateway::class);
|
||||
$stripe_checkout_desc = __('Stripe Checkout is the hosted solution for checkouts using Stripe.', 'wp-multisite-waas');
|
||||
wu_register_gateway('stripe-checkout', __('Stripe Checkout', 'wp-multisite-waas'), $stripe_checkout_desc, Stripe_Checkout_Gateway::class);
|
||||
|
||||
/*
|
||||
* PayPal Payments
|
||||
*/
|
||||
$paypal_desc = __('PayPal is the leading provider in checkout solutions and it is the easier way to get your network subscriptions going.', 'wp-ultimo');
|
||||
wu_register_gateway('paypal', __('PayPal', 'wp-ultimo'), $paypal_desc, PayPal_Gateway::class);
|
||||
$paypal_desc = __('PayPal is the leading provider in checkout solutions and it is the easier way to get your network subscriptions going.', 'wp-multisite-waas');
|
||||
wu_register_gateway('paypal', __('PayPal', 'wp-multisite-waas'), $paypal_desc, PayPal_Gateway::class);
|
||||
|
||||
/*
|
||||
* Manual Payments
|
||||
*/
|
||||
$manual_desc = __('Use the Manual Gateway to allow users to pay you directly via bank transfers, checks, or other channels.', 'wp-ultimo');
|
||||
wu_register_gateway('manual', __('Manual', 'wp-ultimo'), $manual_desc, Manual_Gateway::class);
|
||||
$manual_desc = __('Use the Manual Gateway to allow users to pay you directly via bank transfers, checks, or other channels.', 'wp-multisite-waas');
|
||||
wu_register_gateway('manual', __('Manual', 'wp-multisite-waas'), $manual_desc, Manual_Gateway::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -138,15 +138,15 @@ class Limitation_Manager {
|
||||
$fields = [
|
||||
'confirm' => [
|
||||
'type' => 'toggle',
|
||||
'title' => __('Confirm Reset', 'wp-ultimo'),
|
||||
'desc' => __('This action can not be undone.', 'wp-ultimo'),
|
||||
'title' => __('Confirm Reset', 'wp-multisite-waas'),
|
||||
'desc' => __('This action can not be undone.', 'wp-multisite-waas'),
|
||||
'html_attr' => [
|
||||
'v-model' => 'confirmed',
|
||||
],
|
||||
],
|
||||
'submit_button' => [
|
||||
'type' => 'submit',
|
||||
'title' => __('Reset Limitations', 'wp-ultimo'),
|
||||
'title' => __('Reset Limitations', 'wp-multisite-waas'),
|
||||
'value' => 'save',
|
||||
'classes' => 'button button-primary wu-w-full',
|
||||
'wrapper_classes' => 'wu-items-end',
|
||||
@ -165,7 +165,7 @@ class Limitation_Manager {
|
||||
];
|
||||
|
||||
$form_attributes = [
|
||||
'title' => __('Reset', 'wp-ultimo'),
|
||||
'title' => __('Reset', 'wp-multisite-waas'),
|
||||
'views' => 'admin-pages/fields',
|
||||
'classes' => 'wu-modal-form wu-widget-list wu-striped wu-m-0 wu-mt-0',
|
||||
'field_wrapper_classes' => 'wu-w-full wu-box-border wu-items-center wu-flex wu-justify-between wu-p-4 wu-m-0 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-300 wu-border-solid',
|
||||
@ -200,7 +200,7 @@ class Limitation_Manager {
|
||||
wp_send_json_error(
|
||||
new \WP_Error(
|
||||
'parameters-not-found',
|
||||
__('Required parameters are missing.', 'wp-ultimo')
|
||||
__('Required parameters are missing.', 'wp-multisite-waas')
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -258,11 +258,11 @@ class Limitation_Manager {
|
||||
public function add_limitation_sections($sections, $object) {
|
||||
|
||||
if ($this->get_object_type($object) === 'site' && $object->get_type() !== Site_Type::CUSTOMER_OWNED) {
|
||||
$html = sprintf('<span class="wu--mt-4 wu-p-2 wu-bg-blue-100 wu-text-blue-600 wu-rounded wu-block">%s</span>', __('Limitations are only available for customer-owned sites. You need to change the type to Customer-owned and save this site before the options are shown.', 'wp-ultimo'));
|
||||
$html = sprintf('<span class="wu--mt-4 wu-p-2 wu-bg-blue-100 wu-text-blue-600 wu-rounded wu-block">%s</span>', __('Limitations are only available for customer-owned sites. You need to change the type to Customer-owned and save this site before the options are shown.', 'wp-multisite-waas'));
|
||||
|
||||
$sections['sites'] = [
|
||||
'title' => __('Limits', 'wp-ultimo'),
|
||||
'desc' => __('Only customer-owned sites have limitations.', 'wp-ultimo'),
|
||||
'title' => __('Limits', 'wp-multisite-waas'),
|
||||
'desc' => __('Only customer-owned sites have limitations.', 'wp-multisite-waas'),
|
||||
'icon' => 'dashicons-wu-browser',
|
||||
'fields' => [
|
||||
'note' => [
|
||||
@ -277,8 +277,8 @@ class Limitation_Manager {
|
||||
|
||||
if ($this->get_object_type($object) !== 'site') {
|
||||
$sections['sites'] = [
|
||||
'title' => __('Sites', 'wp-ultimo'),
|
||||
'desc' => __('Control limitations imposed to the number of sites allowed for memberships attached to this product.', 'wp-ultimo'),
|
||||
'title' => __('Sites', 'wp-multisite-waas'),
|
||||
'desc' => __('Control limitations imposed to the number of sites allowed for memberships attached to this product.', 'wp-multisite-waas'),
|
||||
'icon' => 'dashicons-wu-browser',
|
||||
'fields' => $this->get_sites_fields($object),
|
||||
'v-show' => "get_state_value('product_type', 'none') !== 'service'",
|
||||
@ -293,8 +293,8 @@ class Limitation_Manager {
|
||||
*/
|
||||
if ((bool) wu_get_setting('enable_visits_limiting', true)) {
|
||||
$sections['visits'] = [
|
||||
'title' => __('Visits', 'wp-ultimo'),
|
||||
'desc' => __('Control limitations imposed to the number of unique visitors allowed for memberships attached to this product.', 'wp-ultimo'),
|
||||
'title' => __('Visits', 'wp-multisite-waas'),
|
||||
'desc' => __('Control limitations imposed to the number of unique visitors allowed for memberships attached to this product.', 'wp-multisite-waas'),
|
||||
'icon' => 'dashicons-wu-man',
|
||||
'v-show' => "get_state_value('product_type', 'none') !== 'service'",
|
||||
'state' => [
|
||||
@ -303,8 +303,8 @@ class Limitation_Manager {
|
||||
'fields' => [
|
||||
'modules[visits][enabled]' => [
|
||||
'type' => 'toggle',
|
||||
'title' => __('Limit Unique Visits', 'wp-ultimo'),
|
||||
'desc' => __('Toggle this option to enable unique visits limitation.', 'wp-ultimo'),
|
||||
'title' => __('Limit Unique Visits', 'wp-multisite-waas'),
|
||||
'desc' => __('Toggle this option to enable unique visits limitation.', 'wp-multisite-waas'),
|
||||
'value' => 10,
|
||||
'html_attr' => [
|
||||
'v-model' => 'limit_visits',
|
||||
@ -319,9 +319,9 @@ class Limitation_Manager {
|
||||
|
||||
$sections['visits']['fields']['modules[visits][limit]'] = [
|
||||
'type' => 'number',
|
||||
'title' => __('Unique Visits Quota', 'wp-ultimo'),
|
||||
'desc' => __('Set a top limit for the number of monthly unique visits. Leave empty or 0 to allow for unlimited visits.', 'wp-ultimo'),
|
||||
'placeholder' => __('e.g. 10000', 'wp-ultimo'),
|
||||
'title' => __('Unique Visits Quota', 'wp-multisite-waas'),
|
||||
'desc' => __('Set a top limit for the number of monthly unique visits. Leave empty or 0 to allow for unlimited visits.', 'wp-multisite-waas'),
|
||||
'placeholder' => __('e.g. 10000', 'wp-multisite-waas'),
|
||||
'value' => $object->get_limitations()->visits->get_limit(),
|
||||
'wrapper_html_attr' => [
|
||||
'v-show' => 'limit_visits',
|
||||
@ -343,8 +343,8 @@ class Limitation_Manager {
|
||||
if ($this->get_object_type($object) === 'site') {
|
||||
$sections['visits']['fields']['visits_count'] = [
|
||||
'type' => 'text-display',
|
||||
'title' => __('Current Unique Visits Count this Month', 'wp-ultimo'),
|
||||
'desc' => __('Current visits count for this particular site.', 'wp-ultimo'),
|
||||
'title' => __('Current Unique Visits Count this Month', 'wp-multisite-waas'),
|
||||
'desc' => __('Current visits count for this particular site.', 'wp-multisite-waas'),
|
||||
'display_value' => sprintf('%s visit(s)', $object->get_visits_count()),
|
||||
'wrapper_html_attr' => [
|
||||
'v-show' => 'limit_visits',
|
||||
@ -355,8 +355,8 @@ class Limitation_Manager {
|
||||
}
|
||||
|
||||
$sections['users'] = [
|
||||
'title' => __('Users', 'wp-ultimo'),
|
||||
'desc' => __('Control limitations imposed to the number of user allowed for memberships attached to this product.', 'wp-ultimo'),
|
||||
'title' => __('Users', 'wp-multisite-waas'),
|
||||
'desc' => __('Control limitations imposed to the number of user allowed for memberships attached to this product.', 'wp-multisite-waas'),
|
||||
'icon' => 'dashicons-wu-users',
|
||||
'v-show' => "get_state_value('product_type', 'none') !== 'service'",
|
||||
'state' => [
|
||||
@ -365,8 +365,8 @@ class Limitation_Manager {
|
||||
'fields' => [
|
||||
'modules[users][enabled]' => [
|
||||
'type' => 'toggle',
|
||||
'title' => __('Limit User', 'wp-ultimo'),
|
||||
'desc' => __('Enable user limitations for this product.', 'wp-ultimo'),
|
||||
'title' => __('Limit User', 'wp-multisite-waas'),
|
||||
'desc' => __('Enable user limitations for this product.', 'wp-multisite-waas'),
|
||||
'html_attr' => [
|
||||
'v-model' => 'limit_users',
|
||||
],
|
||||
@ -381,8 +381,8 @@ class Limitation_Manager {
|
||||
$this->register_user_fields($sections, $object);
|
||||
|
||||
$sections['post_types'] = [
|
||||
'title' => __('Post Types', 'wp-ultimo'),
|
||||
'desc' => __('Control limitations imposed to the number of posts allowed for memberships attached to this product.', 'wp-ultimo'),
|
||||
'title' => __('Post Types', 'wp-multisite-waas'),
|
||||
'desc' => __('Control limitations imposed to the number of posts allowed for memberships attached to this product.', 'wp-multisite-waas'),
|
||||
'icon' => 'dashicons-wu-book',
|
||||
'v-show' => "get_state_value('product_type', 'none') !== 'service'",
|
||||
'state' => [
|
||||
@ -391,8 +391,8 @@ class Limitation_Manager {
|
||||
'fields' => [
|
||||
'modules[post_types][enabled]' => [
|
||||
'type' => 'toggle',
|
||||
'title' => __('Limit Post Types', 'wp-ultimo'),
|
||||
'desc' => __('Toggle this option to set limits to each post type.', 'wp-ultimo'),
|
||||
'title' => __('Limit Post Types', 'wp-multisite-waas'),
|
||||
'desc' => __('Toggle this option to set limits to each post type.', 'wp-multisite-waas'),
|
||||
'value' => false,
|
||||
'html_attr' => [
|
||||
'v-model' => 'limit_post_types',
|
||||
@ -407,7 +407,7 @@ class Limitation_Manager {
|
||||
|
||||
$sections['post_types']['post_quota_note'] = [
|
||||
'type' => 'note',
|
||||
'desc' => __('<strong>Note:</strong> Using the fields below you can set a post limit for each of the post types activated. <br>Toggle the switch to <strong>deactivate</strong> the post type altogether. Leave 0 or blank for unlimited posts.', 'wp-ultimo'),
|
||||
'desc' => __('<strong>Note:</strong> Using the fields below you can set a post limit for each of the post types activated. <br>Toggle the switch to <strong>deactivate</strong> the post type altogether. Leave 0 or blank for unlimited posts.', 'wp-multisite-waas'),
|
||||
'wrapper_html_attr' => [
|
||||
'v-show' => 'limit_post_types',
|
||||
'v-cloak' => '1',
|
||||
@ -417,8 +417,8 @@ class Limitation_Manager {
|
||||
$this->register_post_type_fields($sections, $object);
|
||||
|
||||
$sections['limit_disk_space'] = [
|
||||
'title' => __('Disk Space', 'wp-ultimo'),
|
||||
'desc' => __('Control limitations imposed to the disk space allowed for memberships attached to this entity.', 'wp-ultimo'),
|
||||
'title' => __('Disk Space', 'wp-multisite-waas'),
|
||||
'desc' => __('Control limitations imposed to the disk space allowed for memberships attached to this entity.', 'wp-multisite-waas'),
|
||||
'icon' => 'dashicons-wu-drive',
|
||||
'v-show' => "get_state_value('product_type', 'none') !== 'service'",
|
||||
'state' => [
|
||||
@ -427,8 +427,8 @@ class Limitation_Manager {
|
||||
'fields' => [
|
||||
'modules[disk_space][enabled]' => [
|
||||
'type' => 'toggle',
|
||||
'title' => __('Limit Disk Space per Site', 'wp-ultimo'),
|
||||
'desc' => __('Enable disk space limitations for this entity.', 'wp-ultimo'),
|
||||
'title' => __('Limit Disk Space per Site', 'wp-multisite-waas'),
|
||||
'desc' => __('Enable disk space limitations for this entity.', 'wp-multisite-waas'),
|
||||
'value' => true,
|
||||
'html_attr' => [
|
||||
'v-model' => 'limit_disk_space',
|
||||
@ -443,8 +443,8 @@ class Limitation_Manager {
|
||||
|
||||
$sections['limit_disk_space']['fields']['modules[disk_space][limit]'] = [
|
||||
'type' => 'number',
|
||||
'title' => __('Disk Space Allowance', 'wp-ultimo'),
|
||||
'desc' => __('Set a limit in MBs for the disk space for <strong>each</strong> individual site.', 'wp-ultimo'),
|
||||
'title' => __('Disk Space Allowance', 'wp-multisite-waas'),
|
||||
'desc' => __('Set a limit in MBs for the disk space for <strong>each</strong> individual site.', 'wp-multisite-waas'),
|
||||
'min' => 0,
|
||||
'placeholder' => 100,
|
||||
'value' => $object->get_limitations()->disk_space->get_limit(),
|
||||
@ -459,8 +459,8 @@ class Limitation_Manager {
|
||||
}
|
||||
|
||||
$sections['custom_domain'] = [
|
||||
'title' => __('Custom Domains', 'wp-ultimo'),
|
||||
'desc' => __('Limit the number of users on each role, posts, pages, and more.', 'wp-ultimo'),
|
||||
'title' => __('Custom Domains', 'wp-multisite-waas'),
|
||||
'desc' => __('Limit the number of users on each role, posts, pages, and more.', 'wp-multisite-waas'),
|
||||
'icon' => 'dashicons-wu-link1',
|
||||
'v-show' => "get_state_value('product_type', 'none') !== 'service'",
|
||||
'state' => [
|
||||
@ -469,8 +469,8 @@ class Limitation_Manager {
|
||||
'fields' => [
|
||||
'modules[domain_mapping][enabled]' => [
|
||||
'type' => 'toggle',
|
||||
'title' => __('Allow Custom Domains', 'wp-ultimo'),
|
||||
'desc' => __('Toggle this option on to allow this plan to enable custom domains for sign-ups on this plan.', 'wp-ultimo'),
|
||||
'title' => __('Allow Custom Domains', 'wp-multisite-waas'),
|
||||
'desc' => __('Toggle this option on to allow this plan to enable custom domains for sign-ups on this plan.', 'wp-multisite-waas'),
|
||||
'value' => $object->get_limitations()->domain_mapping->is_enabled(),
|
||||
'wrapper_html_attr' => [
|
||||
'v-cloak' => '1',
|
||||
@ -487,8 +487,8 @@ class Limitation_Manager {
|
||||
}
|
||||
|
||||
$sections['allowed_themes'] = [
|
||||
'title' => __('Themes', 'wp-ultimo'),
|
||||
'desc' => __('Limit the number of users on each role, posts, pages, and more.', 'wp-ultimo'),
|
||||
'title' => __('Themes', 'wp-multisite-waas'),
|
||||
'desc' => __('Limit the number of users on each role, posts, pages, and more.', 'wp-multisite-waas'),
|
||||
'icon' => 'dashicons-wu-palette',
|
||||
'v-show' => "get_state_value('product_type', 'none') !== 'service'",
|
||||
'state' => [
|
||||
@ -497,23 +497,23 @@ class Limitation_Manager {
|
||||
'fields' => [
|
||||
'themes' => [
|
||||
'type' => 'html',
|
||||
'title' => __('Themes', 'wp-ultimo'),
|
||||
'desc' => __('Select how the themes installed on the network should behave.', 'wp-ultimo'),
|
||||
'title' => __('Themes', 'wp-multisite-waas'),
|
||||
'desc' => __('Select how the themes installed on the network should behave.', 'wp-multisite-waas'),
|
||||
'content' => fn() => $this->get_theme_selection_list($object, $sections['allowed_themes']),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$sections['allowed_plugins'] = [
|
||||
'title' => __('Plugins', 'wp-ultimo'),
|
||||
'desc' => __('You can choose the behavior of each plugin installed on the platform.', 'wp-ultimo'),
|
||||
'title' => __('Plugins', 'wp-multisite-waas'),
|
||||
'desc' => __('You can choose the behavior of each plugin installed on the platform.', 'wp-multisite-waas'),
|
||||
'icon' => 'dashicons-wu-power-plug',
|
||||
'v-show' => "get_state_value('product_type', 'none') !== 'service'",
|
||||
'fields' => [
|
||||
'plugins' => [
|
||||
'type' => 'html',
|
||||
'title' => __('Plugins', 'wp-ultimo'),
|
||||
'desc' => __('Select how the plugins installed on the network should behave.', 'wp-ultimo'),
|
||||
'title' => __('Plugins', 'wp-multisite-waas'),
|
||||
'desc' => __('Select how the plugins installed on the network should behave.', 'wp-multisite-waas'),
|
||||
'content' => fn() => $this->get_plugin_selection_list($object),
|
||||
],
|
||||
],
|
||||
@ -528,14 +528,14 @@ class Limitation_Manager {
|
||||
);
|
||||
|
||||
$sections['reset_limitations'] = [
|
||||
'title' => __('Reset Limitations', 'wp-ultimo'),
|
||||
'desc' => __('Reset the limitations applied to this element.', 'wp-ultimo'),
|
||||
'title' => __('Reset Limitations', 'wp-multisite-waas'),
|
||||
'desc' => __('Reset the limitations applied to this element.', 'wp-multisite-waas'),
|
||||
'icon' => 'dashicons-wu-back-in-time',
|
||||
'fields' => [
|
||||
'reset_permissions' => [
|
||||
'type' => 'note',
|
||||
'title' => sprintf("%s<span class='wu-normal-case wu-block wu-text-xs wu-font-normal wu-mt-1'>%s</span>", __('Reset Limitations', 'wp-ultimo'), __('Use this option to reset the custom limitations applied to this object.', 'wp-ultimo')),
|
||||
'desc' => sprintf('<a href="%s" title="%s" class="wubox button-primary">%s</a>', $reset_url, __('Reset Limitations', 'wp-ultimo'), __('Reset Limitations', 'wp-ultimo')),
|
||||
'title' => sprintf("%s<span class='wu-normal-case wu-block wu-text-xs wu-font-normal wu-mt-1'>%s</span>", __('Reset Limitations', 'wp-multisite-waas'), __('Use this option to reset the custom limitations applied to this object.', 'wp-multisite-waas')),
|
||||
'desc' => sprintf('<a href="%s" title="%s" class="wubox button-primary">%s</a>', $reset_url, __('Reset Limitations', 'wp-multisite-waas'), __('Reset Limitations', 'wp-multisite-waas')),
|
||||
],
|
||||
],
|
||||
];
|
||||
@ -554,7 +554,7 @@ class Limitation_Manager {
|
||||
*/
|
||||
protected function override_notice($show = false, $additional_checks = []) {
|
||||
|
||||
$text = sprintf('<p class="wu-m-0 wu-p-2 wu-bg-blue-100 wu-text-blue-600 wu-rounded">%s</p>', __('This value is being applied only to this entity. Changes made to the membership or product permissions will not affect this particular value.', 'wp-ultimo'));
|
||||
$text = sprintf('<p class="wu-m-0 wu-p-2 wu-bg-blue-100 wu-text-blue-600 wu-rounded">%s</p>', __('This value is being applied only to this entity. Changes made to the membership or product permissions will not affect this particular value.', 'wp-multisite-waas'));
|
||||
|
||||
return [
|
||||
'desc' => $text,
|
||||
@ -588,8 +588,8 @@ class Limitation_Manager {
|
||||
|
||||
$sections['users']['fields'][ "control_{$user_role_slug}" ] = [
|
||||
'type' => 'group',
|
||||
'title' => sprintf(__('Limit %s Role', 'wp-ultimo'), $user_role['name']),
|
||||
'desc' => sprintf(__('The customer will be able to create %s users(s) of this user role.', 'wp-ultimo'), "{{ roles['{$user_role_slug}'].enabled ? ( parseInt(roles['{$user_role_slug}'].number, 10) ? roles['{$user_role_slug}'].number : '" . __('unlimited', 'wp-ultimo') . "' ) : '" . __('no', 'wp-ultimo') . "' }}"),
|
||||
'title' => sprintf(__('Limit %s Role', 'wp-multisite-waas'), $user_role['name']),
|
||||
'desc' => sprintf(__('The customer will be able to create %s users(s) of this user role.', 'wp-multisite-waas'), "{{ roles['{$user_role_slug}'].enabled ? ( parseInt(roles['{$user_role_slug}'].number, 10) ? roles['{$user_role_slug}'].number : '" . __('unlimited', 'wp-multisite-waas') . "' ) : '" . __('no', 'wp-multisite-waas') . "' }}"),
|
||||
'tooltip' => '',
|
||||
'wrapper_html_attr' => [
|
||||
'v-bind:class' => "!roles['{$user_role_slug}'].enabled ? 'wu-opacity-75' : ''",
|
||||
@ -599,7 +599,7 @@ class Limitation_Manager {
|
||||
'fields' => [
|
||||
"modules[users][limit][{$user_role_slug}][number]" => [
|
||||
'type' => 'number',
|
||||
'placeholder' => sprintf(__('%s Role Quota. e.g. 10', 'wp-ultimo'), $user_role['name']),
|
||||
'placeholder' => sprintf(__('%s Role Quota. e.g. 10', 'wp-multisite-waas'), $user_role['name']),
|
||||
'min' => 0,
|
||||
'wrapper_classes' => 'wu-w-full',
|
||||
'html_attr' => [
|
||||
@ -646,8 +646,8 @@ class Limitation_Manager {
|
||||
|
||||
$sections['post_types']['fields'][ "control_{$post_type_slug}" ] = [
|
||||
'type' => 'group',
|
||||
'title' => sprintf(__('Limit %s', 'wp-ultimo'), $post_type->label),
|
||||
'desc' => sprintf(__('The customer will be able to create %s post(s) of this post type.', 'wp-ultimo'), "{{ types['{$post_type_slug}'].enabled ? ( parseInt(types['{$post_type_slug}'].number, 10) ? types['{$post_type_slug}'].number : '" . __('unlimited', 'wp-ultimo') . "' ) : '" . __('no', 'wp-ultimo') . "' }}"),
|
||||
'title' => sprintf(__('Limit %s', 'wp-multisite-waas'), $post_type->label),
|
||||
'desc' => sprintf(__('The customer will be able to create %s post(s) of this post type.', 'wp-multisite-waas'), "{{ types['{$post_type_slug}'].enabled ? ( parseInt(types['{$post_type_slug}'].number, 10) ? types['{$post_type_slug}'].number : '" . __('unlimited', 'wp-multisite-waas') . "' ) : '" . __('no', 'wp-multisite-waas') . "' }}"),
|
||||
'tooltip' => '',
|
||||
'wrapper_html_attr' => [
|
||||
'v-bind:class' => "!types['{$post_type_slug}'].enabled ? 'wu-opacity-75' : ''",
|
||||
@ -657,7 +657,7 @@ class Limitation_Manager {
|
||||
'fields' => [
|
||||
"modules[post_types][limit][{$post_type_slug}][number]" => [
|
||||
'type' => 'number',
|
||||
'placeholder' => sprintf(__('%s Quota. e.g. 200', 'wp-ultimo'), $post_type->label),
|
||||
'placeholder' => sprintf(__('%s Quota. e.g. 200', 'wp-multisite-waas'), $post_type->label),
|
||||
'min' => 0,
|
||||
'wrapper_classes' => 'wu-w-full',
|
||||
'html_attr' => [
|
||||
@ -702,8 +702,8 @@ class Limitation_Manager {
|
||||
$fields = [
|
||||
'modules[sites][enabled]' => [
|
||||
'type' => 'toggle',
|
||||
'title' => __('Limit Sites', 'wp-ultimo'),
|
||||
'desc' => __('Enable site limitations for this product.', 'wp-ultimo'),
|
||||
'title' => __('Limit Sites', 'wp-multisite-waas'),
|
||||
'desc' => __('Enable site limitations for this product.', 'wp-multisite-waas'),
|
||||
'value' => $object->get_limitations()->sites->is_enabled(),
|
||||
'html_attr' => [
|
||||
'v-model' => 'limit_sites',
|
||||
@ -720,7 +720,7 @@ class Limitation_Manager {
|
||||
*/
|
||||
$fields['site_not_allowed_note'] = [
|
||||
'type' => 'note',
|
||||
'desc' => __('The product type selection does not support allowing for the creating of extra sites.', 'wp-ultimo'),
|
||||
'desc' => __('The product type selection does not support allowing for the creating of extra sites.', 'wp-multisite-waas'),
|
||||
'tooltip' => '',
|
||||
'wrapper_html_attr' => [
|
||||
'v-show' => "get_state_value('product_type', 'none') === 'service' && limit_sites",
|
||||
@ -731,8 +731,8 @@ class Limitation_Manager {
|
||||
$fields['modules[sites][limit]'] = [
|
||||
'type' => 'number',
|
||||
'min' => 1,
|
||||
'title' => __('Site Allowance', 'wp-ultimo'),
|
||||
'desc' => __('This is the number of sites the customer will be able to create under this membership.', 'wp-ultimo'),
|
||||
'title' => __('Site Allowance', 'wp-multisite-waas'),
|
||||
'desc' => __('This is the number of sites the customer will be able to create under this membership.', 'wp-multisite-waas'),
|
||||
'placeholder' => 1,
|
||||
'value' => $object->get_limitations()->sites->get_limit(),
|
||||
'wrapper_html_attr' => [
|
||||
|
@ -60,7 +60,7 @@ class Membership_Manager extends Base_Manager {
|
||||
add_action(
|
||||
'init',
|
||||
function () {
|
||||
Event_Manager::register_model_events('membership', __('Membership', 'wp-ultimo'), ['created', 'updated']);
|
||||
Event_Manager::register_model_events('membership', __('Membership', 'wp-multisite-waas'), ['created', 'updated']);
|
||||
}
|
||||
);
|
||||
|
||||
@ -128,7 +128,7 @@ class Membership_Manager extends Base_Manager {
|
||||
$membership = wu_get_membership($membership_id);
|
||||
|
||||
if ( ! $membership) {
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-ultimo'));
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
$status = $membership->publish_pending_site();
|
||||
@ -152,7 +152,7 @@ class Membership_Manager extends Base_Manager {
|
||||
$membership = wu_get_membership_by_hash($membership_id);
|
||||
|
||||
if ( ! $membership) {
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-ultimo'));
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
$pending_site = $membership->get_pending_site();
|
||||
@ -186,13 +186,13 @@ class Membership_Manager extends Base_Manager {
|
||||
$membership = wu_get_membership($membership_id);
|
||||
|
||||
if ( ! $membership) {
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-ultimo'));
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
$scheduled_swap = $membership->get_scheduled_swap();
|
||||
|
||||
if (empty($scheduled_swap)) {
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-ultimo'));
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
$order = $scheduled_swap->order;
|
||||
@ -207,12 +207,12 @@ class Membership_Manager extends Base_Manager {
|
||||
if (is_wp_error($status)) {
|
||||
$wpdb->query('ROLLBACK');
|
||||
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-ultimo'));
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-multisite-waas'));
|
||||
}
|
||||
} catch (\Throwable $exception) {
|
||||
$wpdb->query('ROLLBACK');
|
||||
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-ultimo'));
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -308,7 +308,7 @@ class Membership_Manager extends Base_Manager {
|
||||
$target_customer = wu_get_customer($target_customer_id);
|
||||
|
||||
if ( ! $membership || ! $target_customer || absint($membership->get_customer_id()) === absint($target_customer->get_id())) {
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-ultimo'));
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
$wpdb->query('START TRANSACTION');
|
||||
@ -380,7 +380,7 @@ class Membership_Manager extends Base_Manager {
|
||||
$membership = wu_get_membership($membership_id);
|
||||
|
||||
if ( ! $membership) {
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-ultimo'));
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
$wpdb->query('START TRANSACTION');
|
||||
|
@ -142,7 +142,7 @@ class Notes_Manager extends Base_Manager {
|
||||
if (current_user_can('delete_notes')) {
|
||||
$fields_buttons['button_clear_notes'] = [
|
||||
'type' => 'link',
|
||||
'display_value' => __('Clear Notes', 'wp-ultimo'),
|
||||
'display_value' => __('Clear Notes', 'wp-multisite-waas'),
|
||||
'wrapper_classes' => 'wu-mb-0',
|
||||
'classes' => 'button wubox',
|
||||
'html_attr' => [
|
||||
@ -153,7 +153,7 @@ class Notes_Manager extends Base_Manager {
|
||||
'model' => $object->model,
|
||||
]
|
||||
),
|
||||
'title' => __('Clear Notes', 'wp-ultimo'),
|
||||
'title' => __('Clear Notes', 'wp-multisite-waas'),
|
||||
],
|
||||
];
|
||||
}
|
||||
@ -161,7 +161,7 @@ class Notes_Manager extends Base_Manager {
|
||||
if (current_user_can('edit_notes')) {
|
||||
$fields_buttons['button_add_note'] = [
|
||||
'type' => 'link',
|
||||
'display_value' => __('Add new Note', 'wp-ultimo'),
|
||||
'display_value' => __('Add new Note', 'wp-multisite-waas'),
|
||||
'wrapper_classes' => 'wu-mb-0',
|
||||
'classes' => 'button button-primary wubox wu-absolute wu-right-5',
|
||||
'html_attr' => [
|
||||
@ -173,7 +173,7 @@ class Notes_Manager extends Base_Manager {
|
||||
'height' => 306,
|
||||
]
|
||||
),
|
||||
'title' => __('Add new Note', 'wp-ultimo'),
|
||||
'title' => __('Add new Note', 'wp-multisite-waas'),
|
||||
],
|
||||
];
|
||||
}
|
||||
@ -185,8 +185,8 @@ class Notes_Manager extends Base_Manager {
|
||||
];
|
||||
|
||||
$sections['notes'] = [
|
||||
'title' => __('Notes', 'wp-ultimo'),
|
||||
'desc' => __('Add notes to this model.', 'wp-ultimo'),
|
||||
'title' => __('Notes', 'wp-multisite-waas'),
|
||||
'desc' => __('Add notes to this model.', 'wp-multisite-waas'),
|
||||
'icon' => 'dashicons-wu-text-document',
|
||||
'order' => 1001,
|
||||
'fields' => $fields,
|
||||
@ -207,8 +207,8 @@ class Notes_Manager extends Base_Manager {
|
||||
'content' => [
|
||||
'id' => 'content',
|
||||
'type' => 'wp-editor',
|
||||
'title' => __('Note Content', 'wp-ultimo'),
|
||||
'desc' => __('Basic formatting is supported.', 'wp-ultimo'),
|
||||
'title' => __('Note Content', 'wp-multisite-waas'),
|
||||
'desc' => __('Basic formatting is supported.', 'wp-multisite-waas'),
|
||||
'settings' => [
|
||||
'tinymce' => [
|
||||
'toolbar1' => 'bold,italic,strikethrough,link,unlink,undo,redo,pastetext',
|
||||
@ -220,8 +220,8 @@ class Notes_Manager extends Base_Manager {
|
||||
],
|
||||
'submit_add_note' => [
|
||||
'type' => 'submit',
|
||||
'title' => __('Add Note', 'wp-ultimo'),
|
||||
'placeholder' => __('Add Note', 'wp-ultimo'),
|
||||
'title' => __('Add Note', 'wp-multisite-waas'),
|
||||
'placeholder' => __('Add Note', 'wp-multisite-waas'),
|
||||
'value' => 'save',
|
||||
'classes' => 'wu-w-full button button-primary',
|
||||
'wrapper_classes' => 'wu-items-end',
|
||||
@ -308,16 +308,16 @@ class Notes_Manager extends Base_Manager {
|
||||
$fields = [
|
||||
'confirm_clear_notes' => [
|
||||
'type' => 'toggle',
|
||||
'title' => __('Confirm clear all notes?', 'wp-ultimo'),
|
||||
'desc' => __('This action can not be undone.', 'wp-ultimo'),
|
||||
'title' => __('Confirm clear all notes?', 'wp-multisite-waas'),
|
||||
'desc' => __('This action can not be undone.', 'wp-multisite-waas'),
|
||||
'html_attr' => [
|
||||
'v-model' => 'confirmed',
|
||||
],
|
||||
],
|
||||
'submit_clear_notes' => [
|
||||
'type' => 'submit',
|
||||
'title' => __('Clear Notes', 'wp-ultimo'),
|
||||
'placeholder' => __('Clear Notes', 'wp-ultimo'),
|
||||
'title' => __('Clear Notes', 'wp-multisite-waas'),
|
||||
'placeholder' => __('Clear Notes', 'wp-multisite-waas'),
|
||||
'value' => 'save',
|
||||
'classes' => 'wu-w-full button button-primary',
|
||||
'wrapper_classes' => 'wu-items-end',
|
||||
@ -403,16 +403,16 @@ class Notes_Manager extends Base_Manager {
|
||||
$fields = [
|
||||
'confirm_delete_note' => [
|
||||
'type' => 'toggle',
|
||||
'title' => __('Confirm clear the note?', 'wp-ultimo'),
|
||||
'desc' => __('This action can not be undone.', 'wp-ultimo'),
|
||||
'title' => __('Confirm clear the note?', 'wp-multisite-waas'),
|
||||
'desc' => __('This action can not be undone.', 'wp-multisite-waas'),
|
||||
'html_attr' => [
|
||||
'v-model' => 'confirmed',
|
||||
],
|
||||
],
|
||||
'submit_delete_note' => [
|
||||
'type' => 'submit',
|
||||
'title' => __('Clear Note', 'wp-ultimo'),
|
||||
'placeholder' => __('Clear Note', 'wp-ultimo'),
|
||||
'title' => __('Clear Note', 'wp-multisite-waas'),
|
||||
'placeholder' => __('Clear Note', 'wp-multisite-waas'),
|
||||
'value' => 'save',
|
||||
'classes' => 'wu-w-full button button-primary',
|
||||
'wrapper_classes' => 'wu-items-end',
|
||||
@ -475,7 +475,7 @@ class Notes_Manager extends Base_Manager {
|
||||
$status = $object->delete_note($note_id);
|
||||
|
||||
if (is_wp_error($status) || false === $status) {
|
||||
wp_send_json_error(new \WP_Error('not-found', __('Note not found', 'wp-ultimo')));
|
||||
wp_send_json_error(new \WP_Error('not-found', __('Note not found', 'wp-multisite-waas')));
|
||||
}
|
||||
|
||||
wp_send_json_success(
|
||||
|
@ -121,8 +121,8 @@ class Notification_Manager {
|
||||
'sites',
|
||||
'hide_notifications_subsites',
|
||||
[
|
||||
'title' => __('Hide Admin Notices on Sites', 'wp-ultimo'),
|
||||
'desc' => __('Hide all admin notices on network sites, except for WP Multisite WaaS broadcasts.', 'wp-ultimo'),
|
||||
'title' => __('Hide Admin Notices on Sites', 'wp-multisite-waas'),
|
||||
'desc' => __('Hide all admin notices on network sites, except for WP Multisite WaaS broadcasts.', 'wp-multisite-waas'),
|
||||
'type' => 'toggle',
|
||||
'default' => 0,
|
||||
'order' => 25,
|
||||
|
@ -66,7 +66,7 @@ class Payment_Manager extends Base_Manager {
|
||||
function () {
|
||||
Event_Manager::register_model_events(
|
||||
'payment',
|
||||
__('Payment', 'wp-ultimo'),
|
||||
__('Payment', 'wp-multisite-waas'),
|
||||
['created', 'updated']
|
||||
);
|
||||
}
|
||||
@ -169,7 +169,7 @@ class Payment_Manager extends Base_Manager {
|
||||
wp_enqueue_style('wu-admin');
|
||||
add_wubox();
|
||||
|
||||
$form_title = __('Pending Payments', 'wp-ultimo');
|
||||
$form_title = __('Pending Payments', 'wp-multisite-waas');
|
||||
$form_url = wu_get_form_url('pending_payments');
|
||||
|
||||
wp_add_inline_script('wubox', "document.addEventListener('DOMContentLoaded', function(){wubox.show('$form_title', '$form_url');});");
|
||||
@ -225,7 +225,7 @@ class Payment_Manager extends Base_Manager {
|
||||
}
|
||||
}
|
||||
|
||||
$message = ! empty($pending_payments) ? __('You have pending payments on your account!', 'wp-ultimo') : __('You do not have pending payments on your account!', 'wp-ultimo');
|
||||
$message = ! empty($pending_payments) ? __('You have pending payments on your account!', 'wp-multisite-waas') : __('You do not have pending payments on your account!', 'wp-multisite-waas');
|
||||
|
||||
/**
|
||||
* Allow user to change the message about the pending payments.
|
||||
@ -252,7 +252,7 @@ class Payment_Manager extends Base_Manager {
|
||||
|
||||
$url = $payment->get_payment_url();
|
||||
|
||||
$html = sprintf('<a href="%s" class="button-primary">%s</a>', $url, __('Pay Now', 'wp-ultimo'));
|
||||
$html = sprintf('<a href="%s" class="button-primary">%s</a>', $url, __('Pay Now', 'wp-multisite-waas'));
|
||||
|
||||
$title = $slug;
|
||||
|
||||
@ -291,13 +291,13 @@ class Payment_Manager extends Base_Manager {
|
||||
*/
|
||||
if ( ! wp_verify_nonce(wu_request('key'), 'see_invoice')) {
|
||||
|
||||
// wp_die(__('You do not have permissions to access this file.', 'wp-ultimo'));
|
||||
// wp_die(__('You do not have permissions to access this file.', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
$payment = wu_get_payment_by_hash(wu_request('reference'));
|
||||
|
||||
if ( ! $payment) {
|
||||
wp_die(__('This invoice does not exist.', 'wp-ultimo'));
|
||||
wp_die(__('This invoice does not exist.', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
$invoice = new Invoice($payment);
|
||||
@ -329,7 +329,7 @@ class Payment_Manager extends Base_Manager {
|
||||
$target_customer = wu_get_customer($target_customer_id);
|
||||
|
||||
if ( ! $payment || ! $target_customer || $payment->get_customer_id() === $target_customer->get_id()) {
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-ultimo'));
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
$wpdb->query('START TRANSACTION');
|
||||
@ -374,7 +374,7 @@ class Payment_Manager extends Base_Manager {
|
||||
$payment = wu_get_payment($payment_id);
|
||||
|
||||
if ( ! $payment) {
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-ultimo'));
|
||||
return new \WP_Error('error', __('An unexpected error happened.', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
$wpdb->query('START TRANSACTION');
|
||||
|
@ -132,7 +132,7 @@ class Site_Manager extends Base_Manager {
|
||||
}
|
||||
|
||||
if (preg_match('/[^a-z0-9-]+/', (string) $result['blogname'])) {
|
||||
$result['errors']->add('blogname', __('Site names can only contain lowercase letters (a-z), numbers, and hyphens.', 'wp-ultimo'));
|
||||
$result['errors']->add('blogname', __('Site names can only contain lowercase letters (a-z), numbers, and hyphens.', 'wp-multisite-waas'));
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,7 +165,7 @@ class Site_Manager extends Base_Manager {
|
||||
$customer = wu_get_current_customer();
|
||||
|
||||
if ( ! $customer || ! $membership || $customer->get_id() !== $membership->get_customer_id()) {
|
||||
$errors->add('not-owner', __('You do not have the necessary permissions to create a site to this membership', 'wp-ultimo'));
|
||||
$errors->add('not-owner', __('You do not have the necessary permissions to create a site to this membership', 'wp-multisite-waas'));
|
||||
}
|
||||
|
||||
if ($errors->has_errors() === false) {
|
||||
@ -316,9 +316,9 @@ class Site_Manager extends Base_Manager {
|
||||
new \WP_Error(
|
||||
'not-available',
|
||||
// phpcs:ignore
|
||||
sprintf( __('This site is not available at the moment.<br><small>If you are the site admin, click <a href="%s">here</a> to login.</small>', 'wp-ultimo'), wp_login_url()),
|
||||
sprintf( __('This site is not available at the moment.<br><small>If you are the site admin, click <a href="%s">here</a> to login.</small>', 'wp-multisite-waas'), wp_login_url()),
|
||||
[
|
||||
'title' => __('Site not available', 'wp-ultimo'),
|
||||
'title' => __('Site not available', 'wp-multisite-waas'),
|
||||
]
|
||||
),
|
||||
'',
|
||||
@ -370,7 +370,7 @@ class Site_Manager extends Base_Manager {
|
||||
|
||||
if ( ! $site) {
|
||||
wp_send_json_error(
|
||||
new \WP_Error('missing-site', __('Site not found.', 'wp-ultimo'))
|
||||
new \WP_Error('missing-site', __('Site not found.', 'wp-multisite-waas'))
|
||||
);
|
||||
}
|
||||
|
||||
@ -380,7 +380,7 @@ class Site_Manager extends Base_Manager {
|
||||
|
||||
if ( ! $attachment_id) {
|
||||
wp_send_json_error(
|
||||
new \WP_Error('error', __('We were not able to fetch the screenshot.', 'wp-ultimo'))
|
||||
new \WP_Error('error', __('We were not able to fetch the screenshot.', 'wp-multisite-waas'))
|
||||
);
|
||||
}
|
||||
|
||||
@ -421,7 +421,7 @@ class Site_Manager extends Base_Manager {
|
||||
public function add_no_index_warning(): void {
|
||||
|
||||
if (wu_get_setting('stop_template_indexing', false)) {
|
||||
add_meta_box('wu-warnings', __('WP Multisite WaaS - Search Engines', 'wp-ultimo'), [$this, 'render_no_index_warning'], 'dashboard-network', 'normal', 'high');
|
||||
add_meta_box('wu-warnings', __('WP Multisite WaaS - Search Engines', 'wp-multisite-waas'), [$this, 'render_no_index_warning'], 'dashboard-network', 'normal', 'high');
|
||||
}
|
||||
}
|
||||
|
||||
@ -437,9 +437,9 @@ class Site_Manager extends Base_Manager {
|
||||
|
||||
<div class="wu-border-l-4 wu-border-yellow-500 wu-border-solid wu-border-0 wu-px-4 wu-py-2 wu--m-3">
|
||||
|
||||
<p><?php _e('Your WP Multisite WaaS settings are configured to <strong>prevent search engines such as Google from indexing your template sites</strong>.', 'wp-ultimo'); ?></p>
|
||||
<p><?php _e('Your WP Multisite WaaS settings are configured to <strong>prevent search engines such as Google from indexing your template sites</strong>.', 'wp-multisite-waas'); ?></p>
|
||||
|
||||
<p><?php printf(__('If you are experiencing negative SEO impacts on other sites in your network, consider disabling this setting <a href="%s">here</a>.', 'wp-ultimo'), wu_network_admin_url('wp-ultimo-settings', ['tab' => 'sites'])); ?></p>
|
||||
<p><?php printf(__('If you are experiencing negative SEO impacts on other sites in your network, consider disabling this setting <a href="%s">here</a>.', 'wp-multisite-waas'), wu_network_admin_url('wp-ultimo-settings', ['tab' => 'sites'])); ?></p>
|
||||
|
||||
</div>
|
||||
|
||||
@ -540,7 +540,7 @@ class Site_Manager extends Base_Manager {
|
||||
*/
|
||||
public function add_notices_to_default_site_page(): void {
|
||||
|
||||
$notice = __('Hey there! We highly recommend managing your network sites using the WP Multisite WaaS → Sites page. <br>If you want to avoid confusion, you can also hide this page from the admin panel completely on the WP Multisite WaaS → Settings → Whitelabel options.', 'wp-ultimo');
|
||||
$notice = __('Hey there! We highly recommend managing your network sites using the WP Multisite WaaS → Sites page. <br>If you want to avoid confusion, you can also hide this page from the admin panel completely on the WP Multisite WaaS → Settings → Whitelabel options.', 'wp-multisite-waas');
|
||||
|
||||
WP_Ultimo()->notices->add(
|
||||
$notice,
|
||||
@ -549,11 +549,11 @@ class Site_Manager extends Base_Manager {
|
||||
'wu-sites-use-wp-ultimo',
|
||||
[
|
||||
[
|
||||
'title' => __('Go to the WP Multisite WaaS Sites page →', 'wp-ultimo'),
|
||||
'title' => __('Go to the WP Multisite WaaS Sites page →', 'wp-multisite-waas'),
|
||||
'url' => wu_network_admin_url('wp-ultimo-sites'),
|
||||
],
|
||||
[
|
||||
'title' => __('Go to the Whitelabel Settings →', 'wp-ultimo'),
|
||||
'title' => __('Go to the Whitelabel Settings →', 'wp-multisite-waas'),
|
||||
'url' => wu_network_admin_url(
|
||||
'wp-ultimo-settings',
|
||||
[
|
||||
|
@ -69,7 +69,7 @@ class Visits_Manager {
|
||||
}
|
||||
|
||||
if ($site->has_limitations() && $site->get_visits_count() > $site->get_limitations()->visits->get_limit()) {
|
||||
wp_die(__('This site is not available at this time.', 'wp-ultimo'), __('Not available', 'wp-ultimo'), 404);
|
||||
wp_die(__('This site is not available at this time.', 'wp-multisite-waas'), __('Not available', 'wp-multisite-waas'), 404);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ class Webhook_Manager extends Base_Manager {
|
||||
if ( ! current_user_can('manage_network')) {
|
||||
wp_send_json(
|
||||
[
|
||||
'response' => __('You do not have enough permissions to send a test event.', 'wp-ultimo'),
|
||||
'response' => __('You do not have enough permissions to send a test event.', 'wp-multisite-waas'),
|
||||
'webhooks' => Webhook::get_items_as_array(),
|
||||
]
|
||||
);
|
||||
@ -249,7 +249,7 @@ class Webhook_Manager extends Base_Manager {
|
||||
';
|
||||
|
||||
if ( ! current_user_can('manage_network')) {
|
||||
echo __('You do not have enough permissions to read the logs of this webhook.', 'wp-ultimo');
|
||||
echo __('You do not have enough permissions to read the logs of this webhook.', 'wp-multisite-waas');
|
||||
|
||||
exit;
|
||||
}
|
||||
|
Reference in New Issue
Block a user