Title: admin_footer
Published: April 25, 2014
Last modified: August 20, 2026

---

# do_action( ‘admin_footer’, string $data )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/admin_footer/?utm_source=www.bubuku.com&output_format=md#parameters)
 * [More Information](https://developer.wordpress.org/reference/hooks/admin_footer/?utm_source=www.bubuku.com&output_format=md#more-information)
 * [Source](https://developer.wordpress.org/reference/hooks/admin_footer/?utm_source=www.bubuku.com&output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/admin_footer/?utm_source=www.bubuku.com&output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/admin_footer/?utm_source=www.bubuku.com&output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/hooks/admin_footer/?utm_source=www.bubuku.com&output_format=md#user-contributed-notes)

Prints scripts or data before the default footer scripts.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/admin_footer/?utm_source=www.bubuku.com&output_format=md#parameters)󠁿

 `$data`string

The data to print.

## 󠀁[More Information](https://developer.wordpress.org/reference/hooks/admin_footer/?utm_source=www.bubuku.com&output_format=md#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.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/admin_footer/?utm_source=www.bubuku.com&output_format=md#source)󠁿

    ```php
    do_action( 'admin_footer', '' );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/admin-footer.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-admin/admin-footer.php#L78)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-admin/admin-footer.php#L78-L78)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/admin_footer/?utm_source=www.bubuku.com&output_format=md#related)󠁿

| Used by | Description | 
| [wp_options_connectors_render_page()](https://developer.wordpress.org/reference/functions/wp_options_connectors_render_page/)`wp-includes/build/pages/options-connectors/page.php` |

Render the options-connectors page.

  | 
| [wp_font_library_render_page()](https://developer.wordpress.org/reference/functions/wp_font_library_render_page/)`wp-includes/build/pages/font-library/page.php` |

Render the font-library page.

  | 
| [iframe_footer()](https://developer.wordpress.org/reference/functions/iframe_footer/)`wp-admin/includes/template.php` |

Generic Iframe footer for use with Thickbox.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/admin_footer/?utm_source=www.bubuku.com&output_format=md#changelog)󠁿

| Version | Description | 
| [1.2.0](https://developer.wordpress.org/reference/since/1.2.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/hooks/admin_footer/?utm_source=www.bubuku.com&output_format=md#user-contributed-notes)󠁿

 1.   [Skip to note 6 content](https://developer.wordpress.org/reference/hooks/admin_footer/?utm_source=www.bubuku.com&output_format=md#comment-content-4317)
 2.    [rmdundon](https://profiles.wordpress.org/rmdundon/)  [  6 years ago  ](https://developer.wordpress.org/reference/hooks/admin_footer/#comment-4317)
 3.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_footer%2F%23comment-4317)
     Vote results for this note: 1[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_footer%2F%23comment-4317)
 4.  Actually, you are not supposed to _return_ data, but rather _echo_ it!
 5.  This example should work:
 6.      ```php
         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');
         ```
     
 7.   [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_footer%2F%3Freplytocom%3D4317%23feedback-editor-4317)
 8.   [Skip to note 7 content](https://developer.wordpress.org/reference/hooks/admin_footer/?utm_source=www.bubuku.com&output_format=md#comment-content-4400)
 9.    [Steven Lin](https://profiles.wordpress.org/stevenlinx/)  [  6 years ago  ](https://developer.wordpress.org/reference/hooks/admin_footer/#comment-4400)
 10. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_footer%2F%23comment-4400)
     Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_footer%2F%23comment-4400)
 11. Example migrated from Codex:
 12. **Adding a JS function**
 13.     ```php
         <?php
         add_action('admin_footer', 'my_admin_add_js');
         function my_admin_add_js($data) {
         	$data = '<script>alert("This will trigger an alert on the admin page.")</script>';
         	return $data;
         }
         ?>
         ```
     
 14.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_footer%2F%3Freplytocom%3D4400%23feedback-editor-4400)
 15.  [Skip to note 8 content](https://developer.wordpress.org/reference/hooks/admin_footer/?utm_source=www.bubuku.com&output_format=md#comment-content-7644)
 16.   [we-are-ferris](https://profiles.wordpress.org/weareferris/)  [  1 month ago  ](https://developer.wordpress.org/reference/hooks/admin_footer/#comment-7644)
 17. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_footer%2F%23comment-7644)
     Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_footer%2F%23comment-7644)
 18. This must be `echo $data;` instead of `return $data;`.
 19.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_footer%2F%3Freplytocom%3D7644%23feedback-editor-7644)
 20.  [Skip to note 9 content](https://developer.wordpress.org/reference/hooks/admin_footer/?utm_source=www.bubuku.com&output_format=md#comment-content-4399)
 21.   [Steven Lin](https://profiles.wordpress.org/stevenlinx/)  [  6 years ago  ](https://developer.wordpress.org/reference/hooks/admin_footer/#comment-4399)
 22. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_footer%2F%23comment-4399)
     Vote results for this note: -1[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_footer%2F%23comment-4399)
 23. Example migrated from Codex:
 24. **Add HTML in the footer of your admin page**
 25.     ```php
         <?php
         add_action('admin_footer', 'my_admin_footer_function');
         function my_admin_footer_function($data) {
         	$data = '<p>This will be inserted at the bottom of admin page</p>';
         	return $data;
         }
         ?>
         ```
     
 26.  * This must be `echo $data;` instead of `return $data;`.
      * [we-are-ferris](https://profiles.wordpress.org/weareferris/) [1 month ago](https://developer.wordpress.org/reference/hooks/admin_footer/#comment-7643)
 27.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_footer%2F%3Freplytocom%3D4399%23feedback-editor-4399)
 28.  [Skip to note 10 content](https://developer.wordpress.org/reference/hooks/admin_footer/?utm_source=www.bubuku.com&output_format=md#comment-content-5611)
 29.   [Steven Lin](https://profiles.wordpress.org/stevenlinx/)  [  5 years ago  ](https://developer.wordpress.org/reference/hooks/admin_footer/#comment-5611)
 30. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_footer%2F%23comment-5611)
     Vote results for this note: -1[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_footer%2F%23comment-5611)
 31. Example migrated from Codex:
 32. **Set priority of your action**
 33. You can set the priority of your action by passing the third parameter. Lower 
     the number to higher the priority.
 34.     ```php
         <?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;
         }
         ?>
         ```
     
 35.  * This must be `echo $data;` instead of `return $data;`.
      * [we-are-ferris](https://profiles.wordpress.org/weareferris/) [1 month ago](https://developer.wordpress.org/reference/hooks/admin_footer/#comment-7645)
 36.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_footer%2F%3Freplytocom%3D5611%23feedback-editor-5611)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_footer%2F)
before being able to contribute a note or feedback.