PluginProbe
Adminimize / 1.11.12
Adminimize v1.11.12
1.11.14 1.11.13 1.11.1 1.11.10 1.11.11 1.11.12 1.11.2 1.11.3 1.11.4 1.11.5 1.11.6 1.11.7 1.11.8 1.11.9 1.3 1.4.7 1.6 1.7.12 1.7.13 1.7.14 1.7.15 1.7.16 1.7.17 1.7.18 1.7.19 All 53 releases
adminimize / inc-setup / footer.php

footer.php in Adminimize 1.11.12, at inc-setup/footer.php

49 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package Adminimize
4 * @subpackage Remove the footer area of the back end.
5 * @author Frank Bültge
6 */
7
8 if ( ! function_exists( 'add_action' ) ) {
9 echo "Hi there! I'm just a part of plugin, not much I can do when called directly.";
10 exit;
11 }
12
13 add_action( 'init', '_mw_adminimize_remove_footer' );
14 /**
15 * Check settings for enqueue scripts.
16 */
17 function _mw_adminimize_remove_footer() {
18
19 // Exclude super admin.
20 if ( _mw_adminimize_exclude_super_admin() ) {
21 return;
22 }
23
24 // Leave the settings screen from Adminimize to see all areas on settings, also on AJAX requests.
25 if ( _mw_adminimize_exclude_settings_page() ) {
26 return;
27 }
28
29 if ( 1 !== (int) _mw_adminimize_get_option_value( '_mw_adminimize_footer' ) ) {
30 return;
31 }
32
33 add_action( 'admin_init', '_mw_adminimize_enqueue_remove_footer' );
34 }
35
36 /**
37 * Enqueue script to remove admin footer area.
38 */
39 function _mw_adminimize_enqueue_remove_footer() {
40
41 $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
42
43 wp_enqueue_script(
44 '_mw_adminimize_remove_footer',
45 WP_PLUGIN_URL . '/' . FB_ADMINIMIZE_BASEFOLDER . '/js/remove_footer' . $suffix . '.js',
46 array( 'jquery' )
47 );
48 }
49