diff --git a/src/Admin/GeneralOptionsPage.php b/src/Admin/GeneralOptionsPage.php index 4ea6474..dea80c3 100644 --- a/src/Admin/GeneralOptionsPage.php +++ b/src/Admin/GeneralOptionsPage.php @@ -129,7 +129,7 @@ public function localize_script( string $page_slug, string $script_handle ): voi 'nonce' => \wp_create_nonce( 'wp_rest' ), 'tutorials' => $this->get_tutorials(), 'integrations' => Integrations::get_integrations(), - 'adminURL' => $this->util->get_admin_page_url(), + 'adminPageUrl' => $this->util->get_admin_page_url(), 'settings' => $this->options->get_all_raw(), 'site_data' => $this->util->get_site_data( $this->options->get_all_raw() ), 'user_roles' => $this->get_user_roles(), diff --git a/src/Admin/HelpOptionsPage.php b/src/Admin/HelpOptionsPage.php index 3f5b602..dc8aaeb 100644 --- a/src/Admin/HelpOptionsPage.php +++ b/src/Admin/HelpOptionsPage.php @@ -87,15 +87,15 @@ public function localize_script( string $page_slug, string $script_handle ): voi 'gtmkit-' . $script_handle . '-script', 'gtmkitSettings', [ - 'rootId' => 'gtmkit-settings', - 'currentPage' => $page_slug, - 'root' => \esc_url_raw( rest_url() ), - 'nonce' => \wp_create_nonce( 'wp_rest' ), - 'tutorials' => $this->get_tutorials(), - 'adminURL' => $this->util->get_admin_page_url(), - 'settings' => $this->options->get_all_raw(), - 'site_data' => [ 'gtmkit_version' => GTMKIT_VERSION ], - 'isPremium' => ( new PremiumConditional() )->is_met(), + 'rootId' => 'gtmkit-settings', + 'currentPage' => $page_slug, + 'root' => \esc_url_raw( rest_url() ), + 'nonce' => \wp_create_nonce( 'wp_rest' ), + 'tutorials' => $this->get_tutorials(), + 'adminPageUrl' => $this->util->get_admin_page_url(), + 'settings' => $this->options->get_all_raw(), + 'site_data' => [ 'gtmkit_version' => GTMKIT_VERSION ], + 'isPremium' => ( new PremiumConditional() )->is_met(), ] ); } diff --git a/src/Admin/SetupWizard.php b/src/Admin/SetupWizard.php index ef068c0..6cfc1b1 100644 --- a/src/Admin/SetupWizard.php +++ b/src/Admin/SetupWizard.php @@ -146,10 +146,7 @@ public function enqueue_assets( string $hook ): void { 'currentPage' => 'wizard', 'root' => esc_url_raw( rest_url() ), 'nonce' => wp_create_nonce( 'wp_rest' ), - 'adminURL' => $this->util->get_admin_page_url(), - 'dashboardUrl' => menu_page_url( 'gtmkit_general', false ), - 'templatesUrl' => menu_page_url( 'gtmkit_templates', false ), - 'helpUrl' => menu_page_url( 'gtmkit_help', false ), + 'adminPageUrl' => $this->util->get_admin_page_url(), 'settings' => $this->options->get_all_raw(), 'site_data' => $this->util->get_site_data( $this->options->get_all_raw() ), 'install_data' => ( new PluginDataImport() )->get_all(), diff --git a/src/Admin/TemplatesOptionsPage.php b/src/Admin/TemplatesOptionsPage.php index da0d6c4..25ebb53 100644 --- a/src/Admin/TemplatesOptionsPage.php +++ b/src/Admin/TemplatesOptionsPage.php @@ -85,13 +85,13 @@ public function localize_script( string $page_slug, string $script_handle ): voi 'gtmkit-' . $script_handle . '-script', 'gtmkitSettings', [ - 'rootId' => 'gtmkit-settings', - 'currentPage' => $page_slug, - 'root' => \esc_url_raw( rest_url() ), - 'nonce' => \wp_create_nonce( 'wp_rest' ), - 'templates' => $this->get_templates(), - 'adminURL' => $this->util->get_admin_page_url(), - 'settings' => $this->options->get_all_raw(), + 'rootId' => 'gtmkit-settings', + 'currentPage' => $page_slug, + 'root' => \esc_url_raw( rest_url() ), + 'nonce' => \wp_create_nonce( 'wp_rest' ), + 'templates' => $this->get_templates(), + 'adminPageUrl' => $this->util->get_admin_page_url(), + 'settings' => $this->options->get_all_raw(), ] ); } diff --git a/src/Admin/UpgradesOptionsPage.php b/src/Admin/UpgradesOptionsPage.php index 74ad09f..76ea55f 100644 --- a/src/Admin/UpgradesOptionsPage.php +++ b/src/Admin/UpgradesOptionsPage.php @@ -92,7 +92,7 @@ public function localize_script( string $page_slug, string $script_handle ): voi 'root' => \esc_url_raw( rest_url() ), 'nonce' => \wp_create_nonce( 'wp_rest' ), 'opportunities' => $this->get_upgrade_opportunities(), - 'adminURL' => $this->util->get_admin_page_url(), + 'adminPageUrl' => $this->util->get_admin_page_url(), 'settings' => $this->options->get_all_raw(), ] );