| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package Adminimize |
| 4 |
* @subpackage Notice for settings page |
| 5 |
* @author Frank Bültge |
| 6 |
*/ |
| 7 |
if ( ! function_exists( 'add_filter' ) ) { |
| 8 |
echo "Hi there! I'm just a part of plugin, not much I can do when called directly."; |
| 9 |
exit; |
| 10 |
} |
| 11 |
// always visible |
| 12 |
add_action( 'load-settings_page_adminimize/adminimize', '_mw_adminimize_add_settings_error' ); |
| 13 |
|
| 14 |
function _mw_adminimize_add_settings_error() { |
| 15 |
|
| 16 |
$settings_hint_message = '<span style="font-size: 35px; float: left; margin: 10px 3px 0 0;">☝</span>' |
| 17 |
. esc_attr__( |
| 18 |
'Please note: The Adminimize settings page ignores the Menu Options below and displays the menu with all entries.', |
| 19 |
'adminimize' |
| 20 |
) |
| 21 |
. ' ' |
| 22 |
. esc_attr__( |
| 23 |
'To view your changes to the menu you need to navigate away from the Adminimize settings page.', |
| 24 |
'adminimize' |
| 25 |
); |
| 26 |
|
| 27 |
add_settings_error( |
| 28 |
'_mw_settings_hint_message', |
| 29 |
'_mw_settings_hint', |
| 30 |
$settings_hint_message, |
| 31 |
'updated' |
| 32 |
); |
| 33 |
|
| 34 |
} |
| 35 |
|
| 36 |
function _mw_adminimize_get_admin_notices() { |
| 37 |
|
| 38 |
settings_errors( '_mw_settings_hint_message' ); |
| 39 |
} |
| 40 |
|