WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Action Reference/admin footer

The admin_footer action is triggered just after closing the <div id="wpfooter"> tag and right before admin_print_footer_scripts action call of the admin-footer.php page.

This hook is for admin only and can't be used to add anything on the front end.

This is an action hook and doesn't provide any parameters. You can echo your HTML to the browser, add JS or CSS in the admin area of your installation.

Add HTML in the footer of your admin page

<?php
add_action('admin_footer', 'my_admin_footer_function');
function my_admin_footer_function() {
	echo '<p>This will be inserted at the bottom of admin page</p>';
}
?>

Adding a JS function

<?php
add_action('admin_footer', 'my_admin_add_js');
function my_admin_add_js() {
	echo '<script>alert("This will trigger an alert on the admin page.")</script>';
}
?>

Set priority of your action

You can set the priority of your action by passing the third parameter. Lower the number to higher the priority.

<?php
add_action('admin_footer', 'my_admin_footer_function', 100);
function my_admin_footer_function() {
	echo '<p>This will be inserted at the bottom of admin page</p>';
}
?>
This page is marked as incomplete. You can help Codex by expanding it.