do_action( 'admin_footer', string $data )

Prints scripts or data before the default footer scripts.


Parameters Parameters

$data

(string) The data to print.


Top ↑

More Information More Information

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.


Top ↑

Source Source

File: wp-admin/admin-footer.php

View on Trac



Top ↑

Changelog Changelog

Changelog
Version Description
1.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by rmdundon

    Actually, you are not supposed to return data, but rather echo it!

    This example should work:

    function my_admin_footer_function() {
        echo '<p>' . __( 'This will be inserted at the bottom of admin page', 'textdomain' ) . '</p>';
    }
    add_action('admin_footer', 'my_admin_footer_function');
    
  2. Skip to note 4 content
    Contributed by stevenlinx

    Example migrated from Codex:

    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($data) {
    	$data = '<p>This will be inserted at the bottom of admin page</p>';
    	return = $data;
    }
    ?>
    

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