PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.2.3
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.2.3
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/controllers/FrmAppController.php +9 -113 6.56.2.3 View file →
@@ -135,14 +135,8 @@
135 135 'formidable-welcome',
136 136 'formidable-applications',
137 137 );
138 138
139 - if ( ! class_exists( 'FrmTransHooksController', false ) ) {
140 - // Only consider the payments page as a "white page" when the Payments submodule is off.
141 - // Otherwise this causes a lot of styling issues when the Stripe add-on (or Authorize.Net) is active.
142 - $white_pages[] = 'formidable-payments';
143 - }
144 -
145 139 $get_page = FrmAppHelper::simple_get( 'page', 'sanitize_title' );
146 140 $is_white_page = in_array( $get_page, $white_pages, true );
147 141
148 142 if ( ! $is_white_page ) {
@@ -292,9 +286,9 @@
292 286 public static function settings_link( $links ) {
293 287 $settings = array();
294 288
295 289 if ( ! FrmAppHelper::pro_is_installed() ) {
296 - $settings[] = '<a href="' . esc_url( FrmAppHelper::admin_upgrade_link( 'plugin-row' ) ) . '" target="_blank" rel="noopener"><b style="color:#1da867;font-weight:700;">' . esc_html__( 'Upgrade to Pro', 'formidable' ) . '</b></a>';
290 + $settings[] = '<a href="' . esc_url( FrmAppHelper::admin_upgrade_link( 'plugin-row' ) ) . '" target="_blank" rel="noopener"><b>' . esc_html__( 'Upgrade to Pro', 'formidable' ) . '</b></a>';
297 291 }
298 292
299 293 $settings[] = '<a href="' . esc_url( admin_url( 'admin.php?page=formidable' ) ) . '">' . __( 'Build a Form', 'formidable' ) . '</a>';
300 294
@@ -576,9 +570,9 @@
576 570 return;
577 571 }
578 572
579 573 if ( ! self::is_behind_proxy() ) {
580 - // This message is only applicable when using a reverse proxy.
574 + // This message is only applicable when where is a reverse proxy.
581 575 return;
582 576 }
583 577
584 578 if ( FrmAppHelper::get_post_param( 'frm_action', '', 'sanitize_text_field' ) ) {
@@ -585,16 +579,16 @@
585 579 // Avoid the message on a POST action. We don't want to show the message if we're saving global settings.
586 580 return;
587 581 }
588 582
589 - $global_settings_link = admin_url( 'admin.php?page=formidable-settings' ) . '#frm_custom_header_ip';
590 - $message = sprintf(
591 - // Translators: 1: Global Settings Link
592 - __( 'IP addresses in form submissions may no longer be accurate! If you are experiencing issues, we recommend going to %1$s and enabling the "Use custom headers when retrieving IPs with form submissions." setting.', 'formidable' ),
593 - '<a href="' . esc_url( $global_settings_link ) . '">Global Settings</a>'
583 + add_filter(
584 + 'frm_message_list',
585 + function( $show_messages ) {
586 + $global_settings_link = admin_url( 'admin.php?page=formidable-settings' ) . '#frm_custom_header_ip';
587 + $show_messages['ip_msg'] = 'IP addresses in form submissions may no longer be accurate! If you are experiencing issues, we recommend going to <a href="' . esc_url( $global_settings_link ) . '">Global Settings</a> and enabling the "Use custom headers when retrieving IPs with form submissions." setting.';
588 + return $show_messages;
589 + }
594 590 );
595 - $option_name = 'frm_dismiss_ip_address_notice';
596 - FrmAppHelper::add_dismissable_warning_message( $message, $option_name );
597 591 }
598 592
599 593 /**
600 594 * Check if any reverse proxy headers are set.
@@ -643,19 +637,8 @@
643 637 wp_register_script( 'formidable_settings', $plugin_url . '/js/admin/settings.js', array(), $version, true );
644 638
645 639 $page = FrmAppHelper::simple_get( 'page', 'sanitize_title' );
646 640
647 - // Enqueue Floating Links.
648 - $is_valid_page =
649 - FrmAppHelper::is_formidable_admin() &&
650 - ! FrmAppHelper::is_style_editor_page() &&
651 - ! FrmAppHelper::is_admin_page( 'formidable-views-editor' ) &&
652 - ! FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' );
653 - if ( $is_valid_page && FrmAppHelper::is_formidable_branding() ) {
654 - self::enqueue_floating_links( $plugin_url, $version );
655 - }
656 - unset( $is_valid_page );
657 -
658 641 if ( 'formidable-applications' === $page ) {
659 642 FrmApplicationsController::load_assets();
660 643 return;
661 644 }
@@ -733,17 +716,8 @@
733 716 self::enqueue_legacy_views_assets();
734 717 }
735 718 }
736 719
737 - }
738 -
739 - /**
740 - * @since 6.3.2
741 - *
742 - * @return void
743 - */
744 - public static function admin_enqueue_scripts() {
745 - self::load_wp_admin_style();
746 720 self::maybe_force_formidable_block_on_gutenberg_page();
747 721 }
748 722
749 723 /**
@@ -1033,33 +1007,8 @@
1033 1007 delete_site_option( 'frmpro-authorized' );
1034 1008 wp_die();
1035 1009 }
1036 1010
1037 - /**
1038 - * This is triggered when Formidable is activated.
1039 - *
1040 - * @return void
1041 - */
1042 - public static function handle_activation() {
1043 - self::maybe_activate_payment_cron();
1044 - }
1045 -
1046 - /**
1047 - * The payment cron is unscheduled when Formidable is deactivated.
1048 - * We need to add it back again on activation if Stripe is configured.
1049 - *
1050 - * @since 6.5
1051 - *
1052 - * @return void
1053 - */
1054 - private static function maybe_activate_payment_cron() {
1055 - if ( ! FrmStrpLiteConnectHelper::stripe_connect_is_setup() ) {
1056 - return;
1057 - }
1058 -
1059 - FrmTransLiteAppController::maybe_schedule_cron();
1060 - }
1061 -
1062 1011 public static function set_footer_text( $text ) {
1063 1012 if ( FrmAppHelper::is_formidable_admin() ) {
1064 1013 $text = '';
1065 1014 }
@@ -1067,31 +1016,8 @@
1067 1016 return $text;
1068 1017 }
1069 1018
1070 1019 /**
1071 - * Add admin footer links.
1072 - *
1073 - * @since 6.4.1
1074 - *
1075 - * @return void
1076 - */
1077 - public static function add_admin_footer_links() {
1078 - $post_type = FrmAppHelper::simple_get( 'post_type', 'sanitize_title' );
1079 -
1080 - // Check admin privileges, screen mode, and branding
1081 - $is_not_admin = ! FrmAppHelper::is_formidable_admin() && $post_type !== 'frm_logs';
1082 - $is_full_screen = FrmAppHelper::is_full_screen();
1083 - $is_not_formidable_branding = ! FrmAppHelper::is_formidable_branding();
1084 -
1085 - // Exit if any of the above conditions are met
1086 - if ( $is_not_admin || $is_full_screen || $is_not_formidable_branding ) {
1087 - return;
1088 - }
1089 -
1090 - include FrmAppHelper::plugin_path() . '/classes/views/shared/admin-footer-links.php';
1091 - }
1092 -
1093 - /**
1094 1020 * @deprecated 3.0.04
1095 1021 *
1096 1022 * @codeCoverageIgnore
1097 1023 *
@@ -1129,36 +1055,6 @@
1129 1055 */
1130 1056 public static function get_form_shortcode( $atts ) {
1131 1057 _deprecated_function( __FUNCTION__, '1.07.05', 'FrmFormsController::get_form_shortcode' );
1132 1058 return FrmFormsController::get_form_shortcode( $atts );
1133 - }
1134 -
1135 - /**
1136 - * Handles Floating Links' scripts and styles enqueueing.
1137 - *
1138 - * @since 6.4
1139 - *
1140 - * @param string $plugin_url URL of the plugin.
1141 - * @param string $version Current version of the plugin.
1142 - * @return void
1143 - */
1144 - private static function enqueue_floating_links( $plugin_url, $version ) {
1145 - if ( ! $plugin_url || ! $version ) {
1146 - // If any required parameters are missing, exit early.
1147 - return;
1148 - }
1149 -
1150 - // Enqueue the Floating Links styles.
1151 - wp_enqueue_style( 's11-floating-links', $plugin_url . '/css/packages/s11-floating-links.css', array(), $version );
1152 -
1153 - // Enqueue the Floating Links script.
1154 - wp_enqueue_script( 's11-floating-links', $plugin_url . '/js/packages/floating-links/s11-floating-links.js', array(), $version, true );
1155 -
1156 - // Enqueue the config script.
1157 - wp_enqueue_script( 's11-floating-links-config', $plugin_url . '/js/packages/floating-links/config.js', array( 'wp-i18n' ), $version, true );
1158 - wp_set_script_translations( 's11-floating-links-config', 's11-' );
1159 - $floating_links_data = array(
1160 - 'proIsInstalled' => FrmAppHelper::pro_is_installed(),
1161 - );
1162 - wp_localize_script( 's11-floating-links-config', 's11FloatingLinksData', $floating_links_data );
1163 1059 }
1164 1060 }