diff --git a/inc/admin-pages/class-hosting-integration-wizard-admin-page.php b/inc/admin-pages/class-hosting-integration-wizard-admin-page.php index c84ba6993..f978c282f 100644 --- a/inc/admin-pages/class-hosting-integration-wizard-admin-page.php +++ b/inc/admin-pages/class-hosting-integration-wizard-admin-page.php @@ -367,4 +367,32 @@ public function section_test(): void { ] ); } + + /** + * Register the script for the test page. + * + * @return void + */ + public function register_scripts() { + parent::register_scripts(); + + wp_enqueue_script( + 'wu-integration-test', + wu_get_asset('integration-test.js', 'js'), + [ + 'jquery', + 'wu-vue', + ], + wu_get_version(), + true + ); + wp_add_inline_script( + 'wu-integration-test', + 'var wu_integration_test_data = { + integration_id: "' . esc_js($this->integration->get_id()) . '", + waiting_message: "' . esc_js(__('Waiting for results...', 'ultimate-multisite')) . '" + };', + 'before' + ); + } } diff --git a/inc/checkout/class-checkout-pages.php b/inc/checkout/class-checkout-pages.php index d89b53463..a23c60b02 100644 --- a/inc/checkout/class-checkout-pages.php +++ b/inc/checkout/class-checkout-pages.php @@ -475,7 +475,12 @@ public function maybe_obfuscate_login_url(): void { $wp_query->set_404(); - include get_404_template(); + $four_oh_four = get_404_template(); + + // Apparently not all themes have a 404 template. + if ($four_oh_four) { + include $four_oh_four; + } die; } else { diff --git a/inc/installers/class-base-installer.php b/inc/installers/class-base-installer.php index ad8863a00..f47a3eb3f 100644 --- a/inc/installers/class-base-installer.php +++ b/inc/installers/class-base-installer.php @@ -93,7 +93,7 @@ public function handle($status, $installer, $wizard) { // phpcs:ignore Generic.C } catch (\Throwable $e) { $wpdb->query('ROLLBACK'); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching - return new \WP_Error(esc_html($installer), esc_html($e->getMessage())); + return new \WP_Error(esc_html($installer), wp_kses_post($e->getMessage())); } $wpdb->query('COMMIT'); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching diff --git a/inc/integrations/host-providers/class-base-host-provider.php b/inc/integrations/host-providers/class-base-host-provider.php index 300f1ff4f..22d9b40fd 100644 --- a/inc/integrations/host-providers/class-base-host-provider.php +++ b/inc/integrations/host-providers/class-base-host-provider.php @@ -81,7 +81,6 @@ public function init(): void { * Adds an admin notice telling the admin that they should probably enable this integration. */ $this->alert_provider_detected(); - return; } /* @@ -96,7 +95,6 @@ public function init(): void { * Adds an admin notice telling the admin that the provider is not correctly setup. */ $this->alert_provider_not_setup(); - return; } /* diff --git a/inc/models/class-domain.php b/inc/models/class-domain.php index 1bde5da85..ce9ccf32d 100644 --- a/inc/models/class-domain.php +++ b/inc/models/class-domain.php @@ -452,7 +452,7 @@ public function has_valid_ssl_certificate() { * * @since 2.0.0 * - * @return bool + * @return bool|\WP_Error */ public function save() { @@ -473,8 +473,7 @@ public function save() { * Deprecated: Mercator created domain. * * @since 2.0.0 - * @param self The domain object after saving. - * @param self The domain object before the changes. + * @param self $domain The domain object after saving. * @return void. */ do_action_deprecated('mercator.mapping.created', $deprecated_args, '2.0.0', 'wu_domain_post_save'); @@ -489,8 +488,8 @@ public function save() { * Deprecated: Mercator updated domain. * * @since 2.0.0 - * @param self The domain object after saving. - * @param self The domain object before the changes. + * @param self $domain The domain object after saving. + * @param self $before_changes The domain object before the changes. * @return void. */ do_action_deprecated('mercator.mapping.updated', $deprecated_args, '2.0.0', 'wu_domain_post_save'); diff --git a/views/wizards/host-integrations/test.php b/views/wizards/host-integrations/test.php index 81d412847..7af497f76 100644 --- a/views/wizards/host-integrations/test.php +++ b/views/wizards/host-integrations/test.php @@ -77,15 +77,3 @@ - -get_id()) . '", - waiting_message: "' . esc_js(__('Waiting for results...', 'ultimate-multisite')) . '" -};', - 'before' -); -?>