[wp-trac] [WordPress Trac] #58664: Eliminate manual construction of script tags in WP_Scripts and of inline scripts on frontend/login screen

WordPress Trac noreply at wordpress.org
Fri Oct 13 17:19:46 UTC 2023


#58664: Eliminate manual construction of script tags in WP_Scripts and of inline
scripts on frontend/login screen
-------------------------------------------------+-------------------------
 Reporter:  westonruter                          |       Owner:
                                                 |  westonruter
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.4
Component:  Script Loader                        |     Version:  6.3
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:  javascript
  note                                           |
-------------------------------------------------+-------------------------

Comment (by westonruter):

 In [changeset:"56932" 56932]:
 {{{
 #!CommitTicketReference repository="" revision="56932"
 Script Loader: Enqueue inline style for block template skip link in head
 instead of footer.

 * Introduce `wp_enqueue_block_template_skip_link()` to replace
 `the_block_template_skip_link()`. Add to `wp_enqueue_scripts` action
 instead of `wp_footer`.
 * Keep inline script for skip link in footer.
 * Restore original `the_block_template_skip_link()` from 6.3 and move to
 `deprecated.php`.
 * Preserve back-compat for unhooking skip-link by removing
 `the_block_template_skip_link` from `wp_footer` action.

 Follow-up to [56682] and [56687].

 Props sabernhardt, plugindevs, westonruter, spacedmonkey.
 Fixes #59505.
 See #58775.
 See #58664.
 }}}

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


More information about the wp-trac mailing list