Make WordPress Core


Ignore:
Timestamp:
03/17/2020 07:26:34 PM (5 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/general-template.php

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