| @@ -29,13 +29,14 @@ | ||
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * Render the page for native global settings components |
| 32 | 32 | * |
| 33 | + * @param string $defaultComponent | |
| 33 | 34 | * @throws \Exception |
| 34 | 35 | */ |
| 35 | - public function render() | |
| 36 | + public function render($defaultComponent = 'settings') | |
| 36 | 37 | { |
| 37 | - $this->enqueue(); | |
| 38 | + $this->enqueue($defaultComponent); | |
| 38 | 39 | |
| 39 | 40 | $this->app->view->render('admin.globalSettings.settings'); |
| 40 | 41 | } |
| 41 | 42 | |
| @@ -41,11 +42,12 @@ | ||
| 41 | 42 | |
| 42 | 43 | /** |
| 43 | 44 | * Enqueue necessary resources. |
| 44 | 45 | * |
| 46 | + * @param string $defaultComponent | |
| 45 | 47 | * @throws \Exception |
| 46 | 48 | */ |
| 47 | - public function enqueue() | |
| 49 | + public function enqueue($defaultComponent = 'settings') | |
| 48 | 50 | { |
| 49 | 51 | wp_enqueue_script('fluentform-global-settings-js'); |
| 50 | 52 | |
| 51 | 53 | $globalSettingAppData = [ |
| @@ -52,9 +54,11 @@ | ||
| 52 | 54 | 'plugin' => $this->app->config->get('app.slug'), |
| 53 | 55 | 'akismet_activated' => AkismetHandler::isPluginEnabled(), |
| 54 | 56 | 'cleantalk_activated' => CleanTalkHandler::isPluginEnabled(), |
| 55 | 57 | 'has_pro' => Helper::hasPro(), |
| 58 | + 'upgrade_url' => fluentform_upgrade_url(), | |
| 56 | 59 | 'is_payment_compatible' => Helper::isPaymentCompatible(), |
| 60 | + 'default_component' => sanitize_key($defaultComponent), | |
| 57 | 61 | 'form_settings_str' => TranslationString::getGlobalSettingsI18n(), |
| 58 | 62 | 'ace_path_url' => fluentformMix('libs/ace'), |
| 59 | 63 | ]; |
| 60 | 64 | if (Helper::isPaymentCompatible()) { |