admin_print_scripts WordPress Action Hook

The admin_print_scripts hook is a action hook that is called in the admin header for printing scripts. This hook is used to add custom scripts to the WordPress admin area.

do_action( 'admin_print_scripts' ) #

Fires when scripts are printed for all admin pages.


More Information

  • admin_print_scripts mainly used to echo inline javascript in admin pages header.
  • admin_print_scripts should not be used to enqueue styles or scripts on the admin pages. Use admin_enqueue_scripts instead.
  • admin_print_scripts could be used to insert inline script in admin pages header while admin_print_footer_scripts could be used to insert inline script in admin pages footer.

Top ↑

Source

File: wp-admin/admin-header.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by the Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.