[wp-trac] [WordPress Trac] #62075: Deprication on every page load.

WordPress Trac noreply at wordpress.org
Wed Sep 18 15:37:09 UTC 2024


#62075: Deprication on every page load.
-------------------------------+------------------------------
 Reporter:  mrDollar4444       |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Plugins            |     Version:  6.4
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------
Changes (by hellofromTonya):

 * keywords:   => reporter-feedback
 * version:  6.6.2 => 6.4


Comment:

 Hello @mrDollar4444,

 Welcome to WordPress Core's Trac. Thank you for opening this ticket and
 discussion.

 [56932] (from WP 6.4) deprecated using `the_block_template_skip_link()`
 but left the original hook in place for backwards compatibility. It's
 unhooked in `wp_enqueue_block_template_skip_link()` which runs when the
 `'wp_enqueue_scripts'` action fires.

 {{{
 add_action( 'wp_enqueue_scripts', 'wp_enqueue_block_template_skip_link' );
 add_action( 'wp_footer', 'the_block_template_skip_link' ); // Retained for
 backwards-compatibility. Unhooked by
 wp_enqueue_block_template_skip_link().
 }}}

 Calling `wp_footer()` at `'init'` is too early, as `'wp_enqueue_scripts'`
 hasn't fired yet to unhook `'the_block_template_skip_link'` from
 `'wp_footer'`. Moreover, `wp_head()` et al hasn't run yet either, as these
 should run first before doing the footer tasks and closing out the `body`
 tag.

 Is there a use case where `wp_footer()` is needed to run before
 `wp_head()` et al?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62075#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list