| @@ -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. |