Opened 16 years ago
Closed 16 years ago
#9560 closed defect (bug) (wontfix)
do_action sequence in admin-footer.php
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.8 |
Component: | Administration | Keywords: | has-patch dev-feedback |
Focuses: | Cc: |
Description
the current sequence is :
do_action('admin_footer', );
do_action('admin_print_footer_scripts');
do_action("admin_footer-$hook_suffix");
shouldn't it be
do_action("admin_footer-$hook_suffix");
do_action('admin_print_footer_scripts');
do_action('admin_footer', );
Attachments (1)
Change History (10)
#1
follow-up:
↓ 2
@
16 years ago
- Component changed from General to Administration
- Keywords has-patch added
- Priority changed from high to normal
- Version set to 2.8
#2
in reply to:
↑ 1
;
follow-up:
↓ 3
@
16 years ago
Sorry but the right sequence should be :
do_action("admin_footer-$hook_suffix");
do_action('admin_print_footer_scripts');
do_action('admin_footer', );
#3
in reply to:
↑ 2
;
follow-up:
↓ 4
@
16 years ago
Erm, why? I went off the order that the header has it in:
do_action('admin_enqueue_scripts', $hook_suffix); do_action("admin_print_styles-$hook_suffix"); do_action('admin_print_styles'); do_action("admin_print_scripts-$hook_suffix"); do_action('admin_print_scripts'); do_action("admin_head-$hook_suffix"); do_action('admin_head');
#4
in reply to:
↑ 3
@
16 years ago
Replying to Viper007Bond:
Erm, why? I went off the order that the header has it in:
do_action('admin_enqueue_scripts', $hook_suffix); do_action("admin_print_styles-$hook_suffix"); do_action('admin_print_styles'); do_action("admin_print_scripts-$hook_suffix"); do_action('admin_print_scripts'); do_action("admin_head-$hook_suffix"); do_action('admin_head');
ok !
#7
@
16 years ago
If I add a script in one particular page to override WP scripts, I'd *much* rather than the hook-specific hook fires after, personally.
#9
@
16 years ago
- Milestone 2.8 deleted
- Resolution set to wontfix
- Status changed from new to closed
In the footer scripts have to be printed after all content, just before the </body> tag. Also as Denis mentions running do_action("admin_footer-$hook_suffix");
last allows overwriting any previously defined js function.
Yes, the generic hook should come last. Attached patch matches the order of the header.