Make WordPress Core


Ignore:
Timestamp:
03/14/2020 03:59:22 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Toolbar: Move the logic for rendering the admin bar on wp_footer to wp_admin_bar_render().

Clarify in the function documentation that it is now called on wp_body_open action first, with wp_footer as a fallback.

Follow-up to [47221].

Fixes #47053.

File:
1 edited

Legend:

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

    r47221 r47455  
    539539add_action( 'activate_header', '_wp_admin_bar_init' );
    540540add_action( 'wp_body_open', 'wp_admin_bar_render', 0 );
     541add_action( 'wp_footer', 'wp_admin_bar_render', 1000 ); // Back-compat for themes not using `wp_body_open`.
    541542add_action( 'in_admin_header', 'wp_admin_bar_render', 0 );
    542543
Note: See TracChangeset for help on using the changeset viewer.