← All changes
|
classes/controllers/FrmOnboardingWizardController.php
+105
-147
6.25
→
6.13
View file →
| @@ -45,9 +45,8 @@ | ||
| 45 | 45 | const TRANSIENT_NAME = 'frm_activation_redirect'; |
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | 48 | * Transient value associated with the redirection to the Onboarding Wizard page. |
| 49 | - * Used when activating a single plugin. | |
| 50 | 49 | * |
| 51 | 50 | * @var string |
| 52 | 51 | */ |
| 53 | 52 | const TRANSIENT_VALUE = 'formidable-welcome'; |
| @@ -52,16 +51,8 @@ | ||
| 52 | 51 | */ |
| 53 | 52 | const TRANSIENT_VALUE = 'formidable-welcome'; |
| 54 | 53 | |
| 55 | 54 | /** |
| 56 | - * Transient value associated with the redirection to the Onboarding Wizard page. | |
| 57 | - * Used when activating multiple plugins at once. | |
| 58 | - * | |
| 59 | - * @var string | |
| 60 | - */ | |
| 61 | - const TRANSIENT_MULTI_VALUE = 'formidable-welcome-multi'; | |
| 62 | - | |
| 63 | - /** | |
| 64 | 55 | * Option name for storing the redirect status for the Onboarding Wizard page. |
| 65 | 56 | * |
| 66 | 57 | * @var string |
| 67 | 58 | */ |
| @@ -78,9 +69,9 @@ | ||
| 78 | 69 | * Defines the initial step for redirection within the application flow. |
| 79 | 70 | * |
| 80 | 71 | * @var string |
| 81 | 72 | */ |
| 82 | - const INITIAL_STEP = 'consent-tracking'; | |
| 73 | + const INITIAL_STEP = 'welcome'; | |
| 83 | 74 | |
| 84 | 75 | /** |
| 85 | 76 | * Option name to store usage data. |
| 86 | 77 | * |
| @@ -122,12 +113,12 @@ | ||
| 122 | 113 | * @since 6.9 |
| 123 | 114 | */ |
| 124 | 115 | public static function load_admin_hooks() { |
| 125 | 116 | self::set_page_url(); |
| 126 | - add_action( 'admin_init', self::class . '::do_admin_redirects' ); | |
| 117 | + add_action( 'admin_init', __CLASS__ . '::do_admin_redirects' ); | |
| 127 | 118 | |
| 128 | 119 | if ( self::has_onboarding_been_skipped() ) { |
| 129 | - add_filter( 'option_frm_inbox', self::class . '::add_wizard_to_floating_links' ); | |
| 120 | + add_filter( 'option_frm_inbox', __CLASS__ . '::add_wizard_to_floating_links' ); | |
| 130 | 121 | } |
| 131 | 122 | |
| 132 | 123 | // Load page if admin page is Onboarding Wizard. |
| 133 | 124 | self::maybe_load_page(); |
| @@ -134,10 +125,8 @@ | ||
| 134 | 125 | } |
| 135 | 126 | |
| 136 | 127 | /** |
| 137 | 128 | * Performs a safe redirect to the welcome screen when the plugin is activated. |
| 138 | - * On single activation, we will redirect immediately. | |
| 139 | - * When activating multiple plugins, the redirect is delayed until a Formidable page is loaded. | |
| 140 | 129 | * |
| 141 | 130 | * @return void |
| 142 | 131 | */ |
| 143 | 132 | public static function do_admin_redirects() { |
| @@ -153,31 +142,13 @@ | ||
| 153 | 142 | self::mark_onboarding_as_skipped(); |
| 154 | 143 | return; |
| 155 | 144 | } |
| 156 | 145 | |
| 157 | - if ( self::has_onboarding_been_skipped() || FrmAppHelper::pro_is_connected() ) { | |
| 146 | + // Check if we should consider redirection. | |
| 147 | + if ( ! FrmAppHelper::is_formidable_admin() || ! self::is_onboarding_wizard_displayed() || self::has_onboarding_been_skipped() || FrmAppHelper::pro_is_connected() ) { | |
| 158 | 148 | return; |
| 159 | 149 | } |
| 160 | 150 | |
| 161 | - $transient_value = get_transient( self::TRANSIENT_NAME ); | |
| 162 | - if ( ! in_array( $transient_value, array( self::TRANSIENT_VALUE, self::TRANSIENT_MULTI_VALUE ), true ) ) { | |
| 163 | - return; | |
| 164 | - } | |
| 165 | - | |
| 166 | - if ( isset( $_GET['activate-multi'] ) ) { | |
| 167 | - /** | |
| 168 | - * $_GET['activate-multi'] is set after activating multiple plugins. | |
| 169 | - * In this case, change the transient value so we know for future checks. | |
| 170 | - */ | |
| 171 | - set_transient( self::TRANSIENT_NAME, self::TRANSIENT_MULTI_VALUE, 60 ); | |
| 172 | - return; | |
| 173 | - } | |
| 174 | - | |
| 175 | - if ( self::TRANSIENT_MULTI_VALUE === $transient_value && ! FrmAppHelper::is_formidable_admin() ) { | |
| 176 | - // For multi-activations we want to only redirect when a user loads a Formidable page. | |
| 177 | - return; | |
| 178 | - } | |
| 179 | - | |
| 180 | 151 | set_transient( self::TRANSIENT_NAME, 'no', 60 ); |
| 181 | 152 | |
| 182 | 153 | // Prevent redirect with every activation. |
| 183 | 154 | if ( self::has_already_redirected() ) { |
| @@ -199,18 +170,14 @@ | ||
| 199 | 170 | * @return void |
| 200 | 171 | */ |
| 201 | 172 | public static function maybe_load_page() { |
| 202 | 173 | if ( self::is_onboarding_wizard_page() ) { |
| 203 | - // Dismiss the onboarding wizard message so it stops appearing after it is clicked. | |
| 204 | - $message = new FrmInbox(); | |
| 205 | - $message->dismiss( 'onboarding_wizard' ); | |
| 174 | + add_action( 'admin_menu', __CLASS__ . '::menu', 99 ); | |
| 175 | + add_action( 'admin_init', __CLASS__ . '::assign_properties' ); | |
| 176 | + add_action( 'admin_enqueue_scripts', __CLASS__ . '::enqueue_assets', 15 ); | |
| 177 | + add_action( 'admin_head', __CLASS__ . '::remove_menu' ); | |
| 206 | 178 | |
| 207 | - add_action( 'admin_menu', self::class . '::menu', 99 ); | |
| 208 | - add_action( 'admin_init', self::class . '::assign_properties' ); | |
| 209 | - add_action( 'admin_enqueue_scripts', self::class . '::enqueue_assets', 15 ); | |
| 210 | - add_action( 'admin_head', self::class . '::remove_menu' ); | |
| 211 | - | |
| 212 | - add_filter( 'admin_body_class', self::class . '::add_admin_body_classes', 999 ); | |
| 179 | + add_filter( 'admin_body_class', __CLASS__ . '::add_admin_body_classes', 999 ); | |
| 213 | 180 | add_filter( 'frm_show_footer_links', '__return_false' ); |
| 214 | 181 | } |
| 215 | 182 | } |
| 216 | 183 | |
| @@ -253,9 +220,9 @@ | ||
| 253 | 220 | 'Formidable | ' . $label, |
| 254 | 221 | $label, |
| 255 | 222 | self::REQUIRED_CAPABILITY, |
| 256 | 223 | self::PAGE_SLUG, |
| 257 | - array( self::class, 'render' ) | |
| 224 | + array( __CLASS__, 'render' ) | |
| 258 | 225 | ); |
| 259 | 226 | } |
| 260 | 227 | |
| 261 | 228 | /** |
| @@ -282,12 +249,14 @@ | ||
| 282 | 249 | $pro_is_installed = FrmAppHelper::pro_is_installed(); |
| 283 | 250 | |
| 284 | 251 | // Note: Add step parts in order. |
| 285 | 252 | $step_parts = array( |
| 286 | - 'consent-tracking' => 'steps/consent-tracking-step.php', | |
| 287 | - 'install-addons' => 'steps/install-addons-step.php', | |
| 288 | - 'success' => 'steps/success-step.php', | |
| 289 | - 'unsuccessful' => 'steps/unsuccessful-step.php', | |
| 253 | + 'welcome' => 'steps/welcome-step.php', | |
| 254 | + 'install-formidable-pro' => 'steps/install-formidable-pro-step.php', | |
| 255 | + 'license-management' => 'steps/license-management-step.php', | |
| 256 | + 'default-email-address' => 'steps/default-email-address-step.php', | |
| 257 | + 'install-addons' => 'steps/install-addons-step.php', | |
| 258 | + 'success' => 'steps/success-step.php', | |
| 290 | 259 | ); |
| 291 | 260 | |
| 292 | 261 | include $view_path . 'index.php'; |
| 293 | 262 | } |
| @@ -292,34 +261,37 @@ | ||
| 292 | 261 | include $view_path . 'index.php'; |
| 293 | 262 | } |
| 294 | 263 | |
| 295 | 264 | /** |
| 296 | - * Handle AJAX request to setup the "Never miss an important update" step. | |
| 265 | + * Handle AJAX request to setup the "Default Email Address" step. | |
| 297 | 266 | * |
| 298 | 267 | * @since 6.9 |
| 299 | 268 | * |
| 300 | 269 | * @return void |
| 301 | 270 | */ |
| 302 | - public static function ajax_consent_tracking() { | |
| 271 | + public static function ajax_setup_email_step() { | |
| 303 | 272 | // Check permission and nonce. |
| 304 | 273 | FrmAppHelper::permission_check( self::REQUIRED_CAPABILITY ); |
| 305 | 274 | check_ajax_referer( 'frm_ajax', 'nonce' ); |
| 306 | 275 | |
| 276 | + // Get posted data. | |
| 277 | + $default_email = FrmAppHelper::get_post_param( 'default_email', '', 'sanitize_text_field' ); | |
| 278 | + $allows_tracking = FrmAppHelper::get_post_param( 'allows_tracking', '', 'rest_sanitize_boolean' ); | |
| 279 | + $summary_emails = FrmAppHelper::get_post_param( 'summary_emails', '', 'rest_sanitize_boolean' ); | |
| 280 | + | |
| 307 | 281 | // Update Settings. |
| 308 | 282 | $frm_settings = FrmAppHelper::get_settings(); |
| 309 | - $frm_settings->update_setting( 'tracking', true, 'rest_sanitize_boolean' ); | |
| 310 | - | |
| 283 | + $frm_settings->update_setting( 'default_email', $default_email, 'sanitize_text_field' ); | |
| 284 | + $frm_settings->update_setting( 'tracking', $allows_tracking, 'rest_sanitize_boolean' ); | |
| 285 | + $frm_settings->update_setting( 'summary_emails', $summary_emails, 'rest_sanitize_boolean' ); | |
| 311 | 286 | // Remove the 'FrmProSettingsController::store' action to avoid PHP errors during AJAX call. |
| 312 | 287 | remove_action( 'frm_store_settings', 'FrmProSettingsController::store' ); |
| 313 | 288 | $frm_settings->store(); |
| 314 | 289 | |
| 315 | - FrmEmailCollectionHelper::subscribe_to_active_campaign(); | |
| 316 | - | |
| 317 | 290 | // Send response. |
| 318 | 291 | wp_send_json_success(); |
| 319 | 292 | } |
| 320 | 293 | |
| 321 | - | |
| 322 | 294 | /** |
| 323 | 295 | * Handle AJAX request to set up usage data for the Onboarding Wizard. |
| 324 | 296 | * |
| 325 | 297 | * @since 6.9 |
| @@ -334,9 +306,12 @@ | ||
| 334 | 306 | // Retrieve the current usage data. |
| 335 | 307 | $usage_data = self::get_usage_data(); |
| 336 | 308 | |
| 337 | 309 | $fields_to_update = array( |
| 310 | + 'default_email' => 'sanitize_email', | |
| 311 | + 'is_subscribed' => 'rest_sanitize_boolean', | |
| 338 | 312 | 'allows_tracking' => 'rest_sanitize_boolean', |
| 313 | + 'summary_emails' => 'rest_sanitize_boolean', | |
| 339 | 314 | 'installed_addons' => 'sanitize_text_field', |
| 340 | 315 | 'processed_steps' => 'sanitize_text_field', |
| 341 | 316 | 'completed_steps' => 'rest_sanitize_boolean', |
| 342 | 317 | ); |
| @@ -399,9 +374,10 @@ | ||
| 399 | 374 | * @return array |
| 400 | 375 | */ |
| 401 | 376 | private static function get_js_variables() { |
| 402 | 377 | return array( |
| 403 | - 'INITIAL_STEP' => self::INITIAL_STEP, | |
| 378 | + 'INITIAL_STEP' => self::INITIAL_STEP, | |
| 379 | + 'proIsIncluded' => FrmAppHelper::pro_is_included(), | |
| 404 | 380 | ); |
| 405 | 381 | } |
| 406 | 382 | |
| 407 | 383 | /** |
| @@ -484,8 +460,19 @@ | ||
| 484 | 460 | return FrmAppHelper::is_admin_page( self::PAGE_SLUG ); |
| 485 | 461 | } |
| 486 | 462 | |
| 487 | 463 | /** |
| 464 | + * Validates if the Onboarding Wizard page is being displayed. | |
| 465 | + * | |
| 466 | + * @since 6.9 | |
| 467 | + * | |
| 468 | + * @return bool True if the Onboarding Wizard page is displayed, false otherwise. | |
| 469 | + */ | |
| 470 | + public static function is_onboarding_wizard_displayed() { | |
| 471 | + return get_transient( self::TRANSIENT_NAME ) === self::TRANSIENT_VALUE; | |
| 472 | + } | |
| 473 | + | |
| 474 | + /** | |
| 488 | 475 | * Checks if the plugin has already performed a redirect to avoid repeated redirections. |
| 489 | 476 | * |
| 490 | 477 | * @return bool Returns true if already redirected, otherwise false. |
| 491 | 478 | */ |
| @@ -537,11 +524,9 @@ | ||
| 537 | 524 | * @return void |
| 538 | 525 | */ |
| 539 | 526 | private static function set_available_addons() { |
| 540 | 527 | $pro_is_installed = FrmAppHelper::pro_is_installed(); |
| 541 | - $plugins = get_plugins(); | |
| 542 | 528 | |
| 543 | - // Base add-ons always included. | |
| 544 | 529 | self::$available_addons['spam-protection'] = array( |
| 545 | 530 | 'title' => esc_html__( 'Spam Protection', 'formidable' ), |
| 546 | 531 | 'is-checked' => true, |
| 547 | 532 | 'is-disabled' => true, |
| @@ -552,10 +537,8 @@ | ||
| 552 | 537 | 'is-checked' => true, |
| 553 | 538 | 'is-disabled' => true, |
| 554 | 539 | 'help-text' => esc_html__( 'Collect donations and payments with your forms. Offer physical products, digital goods, services, and more.', 'formidable' ), |
| 555 | 540 | ); |
| 556 | - | |
| 557 | - // Add-ons included when Pro is not installed. | |
| 558 | 541 | if ( ! $pro_is_installed ) { |
| 559 | 542 | self::$available_addons['visual-styler'] = array( |
| 560 | 543 | 'title' => esc_html__( 'Visual Styler', 'formidable' ), |
| 561 | 544 | 'is-checked' => true, |
| @@ -568,93 +551,81 @@ | ||
| 568 | 551 | 'is-disabled' => true, |
| 569 | 552 | 'help-text' => esc_html__( 'Save form submissions to your database for future reference and analysis.', 'formidable' ), |
| 570 | 553 | ); |
| 571 | 554 | } |
| 572 | - | |
| 573 | - // SMTP add-on if wp_mail_smtp is not installed. | |
| 574 | 555 | if ( ! function_exists( 'wp_mail_smtp' ) ) { |
| 575 | - $wp_mail_smtp_plugin = 'wp-mail-smtp/wp_mail_smtp.php'; | |
| 576 | - $is_installed_wp_mail_smtp = array_key_exists( $wp_mail_smtp_plugin, $plugins ); | |
| 577 | - | |
| 578 | 556 | self::$available_addons['wp-mail-smtp'] = array( |
| 579 | - 'title' => esc_html__( 'SMTP', 'formidable' ), | |
| 580 | - 'rel' => $is_installed_wp_mail_smtp ? $wp_mail_smtp_plugin : 'wp-mail-smtp', | |
| 581 | - 'is-checked' => false, | |
| 582 | - 'is-vendor' => true, | |
| 583 | - 'is-installed' => $is_installed_wp_mail_smtp, | |
| 584 | - 'help-text' => esc_html__( 'Improve email deliverability by routing WordPress emails through SMTP.', 'formidable' ), | |
| 557 | + 'title' => esc_html__( 'SMTP', 'formidable' ), | |
| 558 | + 'rel' => 'wp-mail-smtp', | |
| 559 | + 'is-checked' => false, | |
| 560 | + 'is-vendor' => true, | |
| 561 | + 'help-text' => esc_html__( 'Improve email deliverability by routing WordPress emails through SMTP.', 'formidable' ), | |
| 585 | 562 | ); |
| 586 | 563 | } |
| 587 | - | |
| 588 | - // Add-ons available when Pro is installed. | |
| 589 | 564 | if ( $pro_is_installed ) { |
| 590 | - $available_pro_addons = array( | |
| 591 | - 'formidable-views' => array( | |
| 592 | - 'addon_key' => 'views', | |
| 593 | - 'title' => __( 'Views', 'formidable' ), | |
| 594 | - 'plugin_file' => 'formidable-views/formidable-views.php', | |
| 595 | - ), | |
| 596 | - 'formidable-mailchimp' => array( | |
| 597 | - 'addon_key' => 'mailchimp', | |
| 598 | - 'title' => __( 'Mailchimp', 'formidable' ), | |
| 599 | - 'plugin_file' => 'formidable-mailchimp/formidable-mailchimp.php', | |
| 600 | - ), | |
| 601 | - 'formidable-registration' => array( | |
| 602 | - 'addon_key' => 'registration', | |
| 603 | - 'title' => __( 'User Registration', 'formidable' ), | |
| 604 | - 'plugin_file' => 'formidable-registration/formidable-registration.php', | |
| 605 | - ), | |
| 606 | - 'formidable-api' => array( | |
| 607 | - 'addon_key' => 'api', | |
| 608 | - 'title' => __( 'Form Rest API', 'formidable' ), | |
| 609 | - 'plugin_file' => 'formidable-api/formidable-api.php', | |
| 610 | - ), | |
| 611 | - 'formidable-signature' => array( | |
| 612 | - 'addon_key' => 'signature', | |
| 613 | - 'title' => __( 'Signature Forms', 'formidable' ), | |
| 614 | - 'plugin_file' => 'formidable-signature/signature.php', | |
| 615 | - ), | |
| 616 | - ); | |
| 565 | + $views_addon = FrmAddonsController::get_addon( 'views' ); | |
| 566 | + $mailchimp_addon = FrmAddonsController::get_addon( 'mailchimp' ); | |
| 567 | + $registration_addon = FrmAddonsController::get_addon( 'registration' ); | |
| 568 | + $api_addon = FrmAddonsController::get_addon( 'api' ); | |
| 569 | + $acf_addon = FrmAddonsController::get_addon( 'acf' ); | |
| 570 | + $signature_addon = FrmAddonsController::get_addon( 'signature' ); | |
| 617 | 571 | |
| 618 | - // Include ACF Forms add-on if ACF is installed. | |
| 619 | - if ( class_exists( 'ACF' ) ) { | |
| 620 | - $available_pro_addons['formidable-acf'] = array( | |
| 621 | - 'addon_key' => 'acf', | |
| 622 | - 'title' => __( 'ACF Forms', 'formidable' ), | |
| 623 | - 'plugin_file' => 'formidable-acf/formidable-acf.php', | |
| 572 | + if ( ! is_plugin_active( 'formidable-views/formidable-views.php' ) && isset( $views_addon['url'] ) ) { | |
| 573 | + self::$available_addons['formidable-views'] = array( | |
| 574 | + 'title' => esc_html__( 'Views', 'formidable' ), | |
| 575 | + 'rel' => $views_addon['url'], | |
| 576 | + 'is-checked' => false, | |
| 577 | + 'help-text' => $views_addon['excerpt'], | |
| 624 | 578 | ); |
| 625 | 579 | } |
| 626 | - | |
| 627 | - foreach ( $available_pro_addons as $key => $data ) { | |
| 628 | - $addon = FrmAddonsController::get_addon( $data['addon_key'] ); | |
| 629 | - $plugin_file = $data['plugin_file']; | |
| 630 | - | |
| 631 | - if ( ! is_plugin_active( $plugin_file ) && isset( $addon['url'] ) ) { | |
| 632 | - $is_installed = array_key_exists( $plugin_file, $plugins ); | |
| 633 | - | |
| 634 | - self::$available_addons[ $key ] = array( | |
| 635 | - 'title' => $data['title'], | |
| 636 | - 'rel' => $is_installed ? $plugin_file : $addon['url'], | |
| 637 | - 'is-checked' => false, | |
| 638 | - 'is-installed' => $is_installed, | |
| 639 | - 'help-text' => $addon['excerpt'], | |
| 640 | - ); | |
| 641 | - } | |
| 580 | + if ( ! is_plugin_active( 'formidable-mailchimp/formidable-mailchimp.php' ) && isset( $mailchimp_addon['url'] ) ) { | |
| 581 | + self::$available_addons['formidable-mailchimp'] = array( | |
| 582 | + 'title' => esc_html__( 'Mailchimp', 'formidable' ), | |
| 583 | + 'rel' => $mailchimp_addon['url'], | |
| 584 | + 'is-checked' => false, | |
| 585 | + 'help-text' => $mailchimp_addon['excerpt'], | |
| 586 | + ); | |
| 642 | 587 | } |
| 588 | + if ( ! is_plugin_active( 'formidable-registration/formidable-registration.php' ) && isset( $registration_addon['url'] ) ) { | |
| 589 | + self::$available_addons['formidable-registration'] = array( | |
| 590 | + 'title' => esc_html__( 'User Registration', 'formidable' ), | |
| 591 | + 'rel' => $registration_addon['url'], | |
| 592 | + 'is-checked' => false, | |
| 593 | + 'help-text' => $registration_addon['excerpt'], | |
| 594 | + ); | |
| 595 | + } | |
| 596 | + if ( ! is_plugin_active( 'formidable-api/formidable-api.php' ) && isset( $api_addon['url'] ) ) { | |
| 597 | + self::$available_addons['formidable-api'] = array( | |
| 598 | + 'title' => esc_html__( 'Form Rest API', 'formidable' ), | |
| 599 | + 'rel' => $api_addon['url'], | |
| 600 | + 'is-checked' => false, | |
| 601 | + 'help-text' => $api_addon['excerpt'], | |
| 602 | + ); | |
| 603 | + } | |
| 604 | + if ( class_exists( 'ACF' ) && ! is_plugin_active( 'formidable-acf/formidable-acf.php' ) && isset( $acf_addon['url'] ) ) { | |
| 605 | + self::$available_addons['formidable-acf'] = array( | |
| 606 | + 'title' => esc_html__( 'ACF Forms', 'formidable' ), | |
| 607 | + 'rel' => $acf_addon['url'], | |
| 608 | + 'is-checked' => false, | |
| 609 | + 'help-text' => $acf_addon['excerpt'], | |
| 610 | + ); | |
| 611 | + } | |
| 612 | + if ( ! is_plugin_active( 'formidable-signature/signature.php' ) && isset( $signature_addon['url'] ) ) { | |
| 613 | + self::$available_addons['formidable-signature'] = array( | |
| 614 | + 'title' => esc_html__( 'Signature Forms', 'formidable' ), | |
| 615 | + 'rel' => $signature_addon['url'], | |
| 616 | + 'is-checked' => false, | |
| 617 | + 'help-text' => $signature_addon['excerpt'], | |
| 618 | + ); | |
| 619 | + } | |
| 643 | 620 | }//end if |
| 644 | - | |
| 645 | - // Gravity Forms Migrator add-on. | |
| 646 | - $gravity_forms_plugin = 'formidable-gravity-forms-importer/formidable-gravity-forms-importer.php'; | |
| 647 | - if ( class_exists( 'GFForms' ) && ! is_plugin_active( $gravity_forms_plugin ) ) { | |
| 648 | - $is_installed_gravity_forms = array_key_exists( $gravity_forms_plugin, $plugins ); | |
| 649 | - | |
| 621 | + if ( class_exists( 'GFForms' ) && ! is_plugin_active( 'formidable-gravity-forms-importer/formidable-gravity-forms-importer.php' ) ) { | |
| 650 | 622 | self::$available_addons['formidable-gravity-forms-importer'] = array( |
| 651 | - 'title' => esc_html__( 'Gravity Forms Migrator', 'formidable' ), | |
| 652 | - 'rel' => $is_installed_gravity_forms ? $gravity_forms_plugin : 'formidable-gravity-forms-importer', | |
| 653 | - 'is-checked' => false, | |
| 654 | - 'is-vendor' => true, | |
| 655 | - 'is-installed' => $is_installed_gravity_forms, | |
| 656 | - 'help-text' => esc_html__( 'Easily migrate your forms from Gravity Forms to Formidable.', 'formidable' ), | |
| 623 | + 'title' => esc_html__( 'Gravity Forms Migrator', 'formidable' ), | |
| 624 | + 'rel' => 'formidable-gravity-forms-importer', | |
| 625 | + 'is-checked' => false, | |
| 626 | + 'is-vendor' => true, | |
| 627 | + 'help-text' => esc_html__( 'Easily migrate your forms from Gravity Forms to Formidable.', 'formidable' ), | |
| 657 | 628 | ); |
| 658 | 629 | } |
| 659 | 630 | } |
| 660 | 631 | |
| @@ -688,19 +659,6 @@ | ||
| 688 | 659 | * @return array Current usage data. |
| 689 | 660 | */ |
| 690 | 661 | public static function get_usage_data() { |
| 691 | 662 | return get_option( self::USAGE_DATA_OPTION, array() ); |
| 692 | - } | |
| 693 | - | |
| 694 | - /** | |
| 695 | - * Validates if the Onboarding Wizard page is being displayed. | |
| 696 | - * | |
| 697 | - * @since 6.9 | |
| 698 | - * @deprecated 6.16 | |
| 699 | - * | |
| 700 | - * @return bool True if the Onboarding Wizard page is displayed, false otherwise. | |
| 701 | - */ | |
| 702 | - public static function is_onboarding_wizard_displayed() { | |
| 703 | - _deprecated_function( __METHOD__, '6.16' ); | |
| 704 | - return get_transient( self::TRANSIENT_NAME ) === self::TRANSIENT_VALUE; | |
| 705 | 663 | } |
| 706 | 664 | } |