Ticket #8859 (closed defect (bug): fixed)

Opened 3 years ago

Last modified 3 years ago

Load JavaScript In Footer On Specific Pages Using "admin_footer-$hook_suffix"

Reported by: GamerZ Owned by: azaozz
Priority: high Milestone: 2.8
Component: JavaScript Version: 2.8
Severity: normal Keywords: javascript
Cc:

Description

In admin-header.php we have can specify which page to load plugin's JavaScript as well as CSS Stylesheets

do_action("admin_print_styles-$hook_suffix");
do_action("admin_print_scripts-$hook_suffix");
do_action("admin_head-$hook_suffix");

In WordPress 2.8, with the major JavaScript changes and the recommendation to load JavaScript in the footer, I think we need that above line of code for the admin_footer as well so that plugins can load their respective JavaScript as well as CSS on their pages only.

do_action("admin_footer-$hook_suffix");

Change History

  • Status changed from new to closed
  • Resolution set to fixed

(In [10362]) Add action hook in admin footer so plugins can output scripts there on specific pages only, props GamerZ, fixes #8859

Note: See TracTickets for help on using tickets.