Make WordPress Core

Ticket #47053: 47053.5.diff

File 47053.5.diff, 1.3 KB (added by xkon, 5 years ago)
  • src/wp-includes/default-filters.php

    diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php
    index a2b1296f5c..18b6d09c33 100644
    a b add_action( 'template_redirect', '_wp_admin_bar_init', 0 ); 
    537537add_action( 'admin_init', '_wp_admin_bar_init' );
    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
    543543// Former admin filters that can also be hooked on the front end
  • src/wp-includes/general-template.php

    diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php
    index 85aacb44ff..197e415f08 100644
    a b function wp_head() { 
    28892889 * @since 1.5.1
    28902890 */
    28912891function wp_footer() {
     2892        /**
     2893         * Sets up the Admin Bar if the current theme does not use `wp_body_open`.
     2894         *
     2895         * @since 5.4.0
     2896         */
     2897        if ( ! did_action( 'wp_body_open' ) ) {
     2898                add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
     2899        }
    28922900        /**
    28932901         * Prints scripts or data before the closing body tag on the front end.
    28942902         *