WordPress.org

Make WordPress Core

Ticket #47053: 47053.2.patch

File 47053.2.patch, 752 bytes (added by joedolson, 5 months ago)

Updated patch using did_action

  • wp-includes/default-filters.php

     
    535535add_action( 'admin_init', '_wp_admin_bar_init' );
    536536add_action( 'before_signup_header', '_wp_admin_bar_init' );
    537537add_action( 'activate_header', '_wp_admin_bar_init' );
    538 add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
     538add_action( 'wp_body_open', 'wp_admin_bar_render', 1000 );
     539if ( ! did_action( 'wp_body_open' ) ) {
     540        add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
     541}
    539542add_action( 'in_admin_header', 'wp_admin_bar_render', 0 );
    540543
    541544// Former admin filters that can also be hooked on the front end