Make WordPress Core


Ignore:
Timestamp:
02/09/2020 06:24:41 PM (4 years ago)
Author:
joedolson
Message:

Toolbar: Load toolbar in wp_body_open when available.

For accessibility, the visual appearance and source order should match. Moving the toolbar to load in the new hook wp_body_open (5.2) fixes a long-standing source order problem.

Props jankimoradiya, afercia, SergeyBiryukov, audrasjb, ocean90, xkon, dinhtungdu.
Fixes #47053.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r47122 r47221  
    538538add_action( 'before_signup_header', '_wp_admin_bar_init' );
    539539add_action( 'activate_header', '_wp_admin_bar_init' );
    540 add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
     540add_action( 'wp_body_open', 'wp_admin_bar_render', 0 );
    541541add_action( 'in_admin_header', 'wp_admin_bar_render', 0 );
    542542
Note: See TracChangeset for help on using the changeset viewer.