| @@ -286,9 +286,9 @@ | ||
| 286 | 286 | public static function settings_link( $links ) { |
| 287 | 287 | $settings = array(); |
| 288 | 288 | |
| 289 | 289 | if ( ! FrmAppHelper::pro_is_installed() ) { |
| 290 | - $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>'; | |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | $settings[] = '<a href="' . esc_url( admin_url( 'admin.php?page=formidable' ) ) . '">' . __( 'Build a Form', 'formidable' ) . '</a>'; |
| 294 | 294 | |
| @@ -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 && FrmAppHelper::is_formidable_branding() ) { | |
| 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 | /** |
| @@ -1036,31 +1016,8 @@ | ||
| 1036 | 1016 | return $text; |
| 1037 | 1017 | } |
| 1038 | 1018 | |
| 1039 | 1019 | /** |
| 1040 | - * Add admin footer links. | |
| 1041 | - * | |
| 1042 | - * @since 6.4.1 | |
| 1043 | - * | |
| 1044 | - * @return void | |
| 1045 | - */ | |
| 1046 | - public static function add_admin_footer_links() { | |
| 1047 | - $post_type = FrmAppHelper::simple_get( 'post_type', 'sanitize_title' ); | |
| 1048 | - | |
| 1049 | - // Check admin privileges, screen mode, and branding | |
| 1050 | - $is_not_admin = ! FrmAppHelper::is_formidable_admin() && $post_type !== 'frm_logs'; | |
| 1051 | - $is_full_screen = FrmAppHelper::is_full_screen(); | |
| 1052 | - $is_not_formidable_branding = ! FrmAppHelper::is_formidable_branding(); | |
| 1053 | - | |
| 1054 | - // Exit if any of the above conditions are met | |
| 1055 | - if ( $is_not_admin || $is_full_screen || $is_not_formidable_branding ) { | |
| 1056 | - return; | |
| 1057 | - } | |
| 1058 | - | |
| 1059 | - include FrmAppHelper::plugin_path() . '/classes/views/shared/admin-footer-links.php'; | |
| 1060 | - } | |
| 1061 | - | |
| 1062 | - /** | |
| 1063 | 1020 | * @deprecated 3.0.04 |
| 1064 | 1021 | * |
| 1065 | 1022 | * @codeCoverageIgnore |
| 1066 | 1023 | * |
| @@ -1098,36 +1055,6 @@ | ||
| 1098 | 1055 | */ |
| 1099 | 1056 | public static function get_form_shortcode( $atts ) { |
| 1100 | 1057 | _deprecated_function( __FUNCTION__, '1.07.05', 'FrmFormsController::get_form_shortcode' ); |
| 1101 | 1058 | return FrmFormsController::get_form_shortcode( $atts ); |
| 1102 | - } | |
| 1103 | - | |
| 1104 | - /** | |
| 1105 | - * Handles Floating Links' scripts and styles enqueueing. | |
| 1106 | - * | |
| 1107 | - * @since 6.4 | |
| 1108 | - * | |
| 1109 | - * @param string $plugin_url URL of the plugin. | |
| 1110 | - * @param string $version Current version of the plugin. | |
| 1111 | - * @return void | |
| 1112 | - */ | |
| 1113 | - private static function enqueue_floating_links( $plugin_url, $version ) { | |
| 1114 | - if ( ! $plugin_url || ! $version ) { | |
| 1115 | - // If any required parameters are missing, exit early. | |
| 1116 | - return; | |
| 1117 | - } | |
| 1118 | - | |
| 1119 | - // Enqueue the Floating Links styles. | |
| 1120 | - wp_enqueue_style( 's11-floating-links', $plugin_url . '/css/packages/s11-floating-links.css', array(), $version ); | |
| 1121 | - | |
| 1122 | - // Enqueue the Floating Links script. | |
| 1123 | - wp_enqueue_script( 's11-floating-links', $plugin_url . '/js/packages/floating-links/s11-floating-links.js', array(), $version, true ); | |
| 1124 | - | |
| 1125 | - // Enqueue the config script. | |
| 1126 | - wp_enqueue_script( 's11-floating-links-config', $plugin_url . '/js/packages/floating-links/config.js', array( 'wp-i18n' ), $version, true ); | |
| 1127 | - wp_set_script_translations( 's11-floating-links-config', 's11-' ); | |
| 1128 | - $floating_links_data = array( | |
| 1129 | - 'proIsInstalled' => FrmAppHelper::pro_is_installed(), | |
| 1130 | - ); | |
| 1131 | - wp_localize_script( 's11-floating-links-config', 's11FloatingLinksData', $floating_links_data ); | |
| 1132 | 1059 | } |
| 1133 | 1060 | } |