| @@ -223,9 +223,9 @@ | ||
| 223 | 223 | if ( preg_match( '/^[+-]/', $tz_string ) ) { |
| 224 | 224 | $tz_string = 'UTC' . $tz_string; |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | - return array( | |
| 227 | + $data = array( | |
| 228 | 228 | 'defenderUrl' => network_admin_url( 'admin.php?page=wp-defender' ), |
| 229 | 229 | 'pluginUrl' => WP_DEFENDER_BASE_URL, |
| 230 | 230 | 'adminUrl' => network_admin_url(), |
| 231 | 231 | 'siteUrl' => network_site_url(), |
| @@ -233,10 +233,8 @@ | ||
| 233 | 233 | 'timeZoneOffset' => (int) round( wp_timezone()->getOffset( new \DateTime( 'now' ) ) / 60 ), |
| 234 | 234 | 'startOfWeek' => (int) get_option( 'start_of_week', 1 ), |
| 235 | 235 | 'profileData' => $profile_data, |
| 236 | 236 | 'hubConnector' => wd_di()->get( \WP_Defender\Controller\Hub_Connector::class )->data_frontend(), |
| 237 | - 'isPro' => $wpmudev->is_pro(), | |
| 238 | - 'isWpOrg' => defender_is_wp_org_version(), | |
| 239 | 237 | 'pluginUpdate' => $this->get_plugin_update_notice_data(), |
| 240 | 238 | 'whiteLabel' => defender_whitelabel_data(), |
| 241 | 239 | 'activityLog' => wd_di()->get( \WP_Defender\Controller\Activity_Log::class )->data_frontend(), |
| 242 | 240 | 'hubApiKey' => array( |
| @@ -241,8 +239,10 @@ | ||
| 241 | 239 | 'activityLog' => wd_di()->get( \WP_Defender\Controller\Activity_Log::class )->data_frontend(), |
| 242 | 240 | 'hubApiKey' => array( |
| 243 | 241 | 'available' => $wpmudev->is_apikey_available(), |
| 244 | 242 | ), |
| 243 | + 'isWpOrg' => defender_is_wp_org_version(), | |
| 244 | + 'isPro' => $wpmudev->is_pro(), | |
| 245 | 245 | 'hosted' => $wpmudev->is_wpmu_hosting(), |
| 246 | 246 | 'highContrastMode' => defender_high_contrast(), |
| 247 | 247 | 'isUnlimitedHosting' => defender_is_unlimited_hosting(), |
| 248 | 248 | 'scanApi' => array( |
| @@ -249,8 +249,10 @@ | ||
| 249 | 249 | 'routes' => $scan_api['routes'] ?? array(), |
| 250 | 250 | 'nonces' => $scan_api['nonces'] ?? array(), |
| 251 | 251 | ), |
| 252 | 252 | ); |
| 253 | + | |
| 254 | + return $data; | |
| 253 | 255 | } |
| 254 | 256 | |
| 255 | 257 | /** |
| 256 | 258 | * Page-specific data for a concrete controller. |