| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package Adminimize |
| 4 |
* @subpackage Add Hint in Admin Footer |
| 5 |
* @author Frank Bültge |
| 6 |
*/ |
| 7 |
if ( ! function_exists( 'add_action' ) ) { |
| 8 |
echo "Hi there! I'm just a part of plugin, not much I can do when called directly."; |
| 9 |
exit; |
| 10 |
} |
| 11 |
|
| 12 |
if ( ! is_admin() ) { |
| 13 |
return NULL; |
| 14 |
} |
| 15 |
|
| 16 |
// on init of WordPress |
| 17 |
add_action( 'admin_init', '_mw_adminimize_init_admin_footer' ); |
| 18 |
function _mw_adminimize_init_admin_footer() { |
| 19 |
|
| 20 |
if ( (int) _mw_adminimize_get_option_value( '_mw_adminimize_advice' ) === 1 ) { |
| 21 |
add_action( 'in_admin_footer', '_mw_adminimize_add_admin_footer' ); |
| 22 |
} |
| 23 |
} |
| 24 |
|
| 25 |
/** |
| 26 |
* Print hint in wp-footer |
| 27 |
*/ |
| 28 |
function _mw_adminimize_add_admin_footer() { |
| 29 |
|
| 30 |
echo _mw_adminimize_get_option_value( '_mw_adminimize_advice_txt' ) . '<br />'; |
| 31 |
} |