Make WordPress Core


Ignore:
Timestamp:
03/17/2020 07:26:34 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].

Reviewed by whyisjake, SergeyBiryukov.
Merges [47455] to the 5.4 branch.
Fixes #47053.

Location:
branches/5.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.4

  • branches/5.4/src/wp-includes/default-filters.php

    r47221 r47467  
    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.