Opened 13 years ago
Closed 13 years ago
#21782 closed defect (bug) (invalid)
admin_print_footer_scripts action not working with wp_enqueue_script function
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.4.1 |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
the code I use:
function tt() { wp_enqueue_script('jquery-ui-accordion'); } add_action('admin_print_footer_scripts', 'tt');
the jquery-ui-accordion is not loaded in the footer.
Change History (5)
#1
follow-up:
↓ 2
@
13 years ago
- Description modified (diff)
- Keywords 2nd-opinion needs-patch removed
#2
in reply to:
↑ 1
@
13 years ago
Replying to SergeyBiryukov:
admin_print_footer_scripts
is too late for enqueueing. This is when_wp_footer_scripts()
is called, so only the styles included earlier will be printed.
Use
admin_footer
instead.
then for what is this function? I thought it is designed for calling .js user files through wp_enqueue_script function
#3
follow-up:
↓ 4
@
13 years ago
admin_print_footer_scripts
action is used to print the default scripts followed by custom scripts that were earlier enqueued for the footer:
http://make.wordpress.org/core/2009/01/15/optimizing-script-loading-implementation/
#4
in reply to:
↑ 3
@
13 years ago
Replying to SergeyBiryukov:
admin_print_footer_scripts
action is used to print the default scripts followed by custom scripts that were earlier enqueued for the footer:
http://make.wordpress.org/core/2009/01/15/optimizing-script-loading-implementation/
Thanks!
admin_print_footer_scripts
is too late for enqueueing. This is when_wp_footer_scripts()
is called, so only the styles included earlier will be printed.Use
admin_footer
instead.