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/general-template.php

    r47406 r47455  
    28942894function wp_footer() {
    28952895    /**
    2896      * Sets up the Admin Bar if the current theme does not use `wp_body_open`.
    2897      *
    2898      * @since 5.4.0
    2899      */
    2900     if ( ! did_action( 'wp_body_open' ) ) {
    2901         add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
    2902     }
    2903     /**
    29042896     * Prints scripts or data before the closing body tag on the front end.
    29052897     *
Note: See TracChangeset for help on using the changeset viewer.