do_action( “admin_footer-{$hook_suffix}” )

Prints scripts or data after the default footer scripts.

Description

The dynamic portion of the hook name, $hook_suffix, refers to the global hook suffix of the current page.

More Information

admin_footer-($hook_suffix) is triggered at the end of the <body> section of a specific admin page, after `admin_footer` and `admin_print_footer_scripts` actions.

The hookname part you can get using the variable $GLOBALS['hook_suffix']. Examples of actions:

add_action('admin_footer-edit.php', 'my_post_list_page_hook'); // Fired on the page with the posts table
add_action('admin_footer-post.php', 'my_post_edit_page_hook'); // Fired on post edit page
add_action('admin_footer-post-new.php', 'my_new_post_page_hook'); // Fired on add new post page

This hook provides no parameters. You use this hook by having your function echo output to the browser, or by having it perform background tasks. Your functions shouldn’t return, and shouldn’t take any parameters.

Source

do_action( "admin_footer-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores

Changelog

VersionDescription
2.8.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.