The in_admin_footer WordPress PHP action fires after the opening tag for the admin footer.
Usage
add_action('in_admin_footer', 'your_custom_function'); function your_custom_function() { // your custom code here }
Parameters
This action does not accept any parameters.
More information
See WordPress Developer Resources: in_admin_footer
Examples
Adding a custom message to the admin footer
This example adds a custom message to the admin footer.
add_action('in_admin_footer', 'add_custom_message_to_admin_footer'); function add_custom_message_to_admin_footer() { echo '<p><strong>Custom message:</strong> Thank you for using our theme!</p>'; }
Adding a link to the admin footer
This example adds a link to the admin footer.
add_action('in_admin_footer', 'add_link_to_admin_footer'); function add_link_to_admin_footer() { echo '<p><a href="https://example.com" target="_blank">Visit our website</a></p>'; }
Displaying the current user’s display name
This example displays the current user’s display name in the admin footer.
add_action('in_admin_footer', 'display_current_user_name'); function display_current_user_name() { $current_user = wp_get_current_user(); echo '<p>Logged in as: ' . $current_user->display_name . '</p>'; }
Adding custom JavaScript to the admin footer
This example adds custom JavaScript to the admin footer that shows an alert box.
add_action('in_admin_footer', 'add_custom_js_to_admin_footer'); function add_custom_js_to_admin_footer() { echo '<script> jQuery(document).ready(function() { alert("Welcome to the admin area!"); }); </script>'; }
Adding custom CSS to style the admin footer
This example adds custom CSS to style the admin footer with a different background color.
add_action('in_admin_footer', 'add_custom_css_to_admin_footer'); function add_custom_css_to_admin_footer() { echo '<style> #footer { background-color: #ffcc00; } </style>'; }