| @@ -570,9 +570,9 @@ | ||
| 570 | 570 | return; |
| 571 | 571 | } |
| 572 | 572 | |
| 573 | 573 | if ( ! self::is_behind_proxy() ) { |
| 574 | - // This message is only applicable when using a reverse proxy. | |
| 574 | + // This message is only applicable when where is a reverse proxy. | |
| 575 | 575 | return; |
| 576 | 576 | } |
| 577 | 577 | |
| 578 | 578 | if ( FrmAppHelper::get_post_param( 'frm_action', '', 'sanitize_text_field' ) ) { |
| @@ -579,16 +579,16 @@ | ||
| 579 | 579 | // Avoid the message on a POST action. We don't want to show the message if we're saving global settings. |
| 580 | 580 | return; |
| 581 | 581 | } |
| 582 | 582 | |
| 583 | - $global_settings_link = admin_url( 'admin.php?page=formidable-settings' ) . '#frm_custom_header_ip'; | |
| 584 | - $message = sprintf( | |
| 585 | - // Translators: 1: Global Settings Link | |
| 586 | - __( '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' ), | |
| 587 | - '<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 | + } | |
| 588 | 590 | ); |
| 589 | - $option_name = 'frm_dismiss_ip_address_notice'; | |
| 590 | - FrmAppHelper::add_dismissable_warning_message( $message, $option_name ); | |
| 591 | 591 | } |
| 592 | 592 | |
| 593 | 593 | /** |
| 594 | 594 | * Check if any reverse proxy headers are set. |
| @@ -637,19 +637,8 @@ | ||
| 637 | 637 | wp_register_script( 'formidable_settings', $plugin_url . '/js/admin/settings.js', array(), $version, true ); |
| 638 | 638 | |
| 639 | 639 | $page = FrmAppHelper::simple_get( 'page', 'sanitize_title' ); |
| 640 | 640 | |
| 641 | - // Enqueue Floating Links. | |
| 642 | - $is_valid_page = | |
| 643 | - FrmAppHelper::is_formidable_admin() && | |
| 644 | - ! FrmAppHelper::is_style_editor_page() && | |
| 645 | - ! FrmAppHelper::is_admin_page( 'formidable-views-editor' ) && | |
| 646 | - ! FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ); | |
| 647 | - if ( $is_valid_page ) { | |
| 648 | - self::enqueue_floating_links( $plugin_url, $version ); | |
| 649 | - } | |
| 650 | - unset( $is_valid_page ); | |
| 651 | - | |
| 652 | 641 | if ( 'formidable-applications' === $page ) { |
| 653 | 642 | FrmApplicationsController::load_assets(); |
| 654 | 643 | return; |
| 655 | 644 | } |
| @@ -727,17 +716,8 @@ | ||
| 727 | 716 | self::enqueue_legacy_views_assets(); |
| 728 | 717 | } |
| 729 | 718 | } |
| 730 | 719 | |
| 731 | - } | |
| 732 | - | |
| 733 | - /** | |
| 734 | - * @since 6.3.2 | |
| 735 | - * | |
| 736 | - * @return void | |
| 737 | - */ | |
| 738 | - public static function admin_enqueue_scripts() { | |
| 739 | - self::load_wp_admin_style(); | |
| 740 | 720 | self::maybe_force_formidable_block_on_gutenberg_page(); |
| 741 | 721 | } |
| 742 | 722 | |
| 743 | 723 | /** |
| @@ -1075,36 +1055,6 @@ | ||
| 1075 | 1055 | */ |
| 1076 | 1056 | public static function get_form_shortcode( $atts ) { |
| 1077 | 1057 | _deprecated_function( __FUNCTION__, '1.07.05', 'FrmFormsController::get_form_shortcode' ); |
| 1078 | 1058 | return FrmFormsController::get_form_shortcode( $atts ); |
| 1079 | - } | |
| 1080 | - | |
| 1081 | - /** | |
| 1082 | - * Handles Floating Links' scripts and styles enqueueing. | |
| 1083 | - * | |
| 1084 | - * @since x.x | |
| 1085 | - * | |
| 1086 | - * @param string $plugin_url URL of the plugin. | |
| 1087 | - * @param string $version Current version of the plugin. | |
| 1088 | - * @return void | |
| 1089 | - */ | |
| 1090 | - private static function enqueue_floating_links( $plugin_url, $version ) { | |
| 1091 | - if ( ! $plugin_url || ! $version ) { | |
| 1092 | - // If any required parameters are missing, exit early. | |
| 1093 | - return; | |
| 1094 | - } | |
| 1095 | - | |
| 1096 | - // Enqueue the Floating Links styles. | |
| 1097 | - wp_enqueue_style( 's11-floating-links', $plugin_url . '/css/packages/s11-floating-links.css', array(), $version ); | |
| 1098 | - | |
| 1099 | - // Enqueue the Floating Links script. | |
| 1100 | - wp_enqueue_script( 's11-floating-links', $plugin_url . '/js/packages/floating-links/s11-floating-links.js', array(), $version, true ); | |
| 1101 | - | |
| 1102 | - // Enqueue the config script. | |
| 1103 | - wp_enqueue_script( 's11-floating-links-config', $plugin_url . '/js/packages/floating-links/config.js', array( 'wp-i18n' ), $version, true ); | |
| 1104 | - wp_set_script_translations( 's11-floating-links-config', 's11-' ); | |
| 1105 | - $floating_links_data = array( | |
| 1106 | - 'proIsInstalled' => FrmAppHelper::pro_is_installed(), | |
| 1107 | - ); | |
| 1108 | - wp_localize_script( 's11-floating-links-config', 's11FloatingLinksData', $floating_links_data ); | |
| 1109 | 1059 | } |
| 1110 | 1060 | } |