Opened 16 years ago
Closed 16 years ago
#8859 closed defect (bug) (fixed)
Load JavaScript In Footer On Specific Pages Using "admin_footer-$hook_suffix"
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.8 | Priority: | high |
Severity: | normal | Version: | 2.8 |
Component: | JavaScript | Keywords: | javascript |
Focuses: | 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");
Note: See
TracTickets for help on using
tickets.
(In [10362]) Add action hook in admin footer so plugins can output scripts there on specific pages only, props GamerZ, fixes #8859