Our treacherous trip into the back country of admin-header.php is followed by a more leisurely stroll through admin-footer.php. In comparison, admin-footer is a really small file.
First, is a check to avoid someone opening the file directly (by checking if the ABSPATH constant is set).
Get Stijn De Lathouwer’s stories in your inbox
Join Medium for free to get updates from this writer.
Then, we have a few div closing tags (which were started in admin-header).
Hooks and Filters
The meat of admin-footer sits in the hooks and filters. Here’s a list of what they do:
- in_admin_footer: (hook) Add functions within the wpfooter div
- admin_footer_text: (filter) Here you can change (or remove) the Thank You text.
- update_footer: (filter) WordPress filters this to show your WordPress version (or an update message if you need to update).
- admin_footer: (hook) You can use it to do actions just before the footer scripts (enqueued to the bottom) are run. WordPress itself hooks into this as well, see _admin_notice_post_locked, used to notify users that someone else is editing the current post.
- admin_print_footer_scripts: (hook) This is used to enqueue the scripts that you designate to the footer.
- “admin_footer-” . $GLOBALS[‘hook_suffix’]: (hook) This last hook is based on the specific admin page you are loading.
At the bottom of admin-footer, wpOnload() is run. Note that this function will only exist if jQuery’s (document).ready() can not be used.
And that pretty much wraps it up for admin-footer.php. See? That wasn’t too hard after all.





