mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389.
See #36335. git-svn-id: https://develop.svn.wordpress.org/trunk@38470 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -23,9 +23,11 @@
|
||||
function _wp_admin_bar_init() {
|
||||
global $wp_admin_bar;
|
||||
|
||||
if ( ! is_admin_bar_showing() ) {
|
||||
if ( ! is_admin_bar_showing() )
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Load the admin bar class code ready for instantiation */
|
||||
require_once( ABSPATH . WPINC . '/class-wp-admin-bar.php' );
|
||||
|
||||
/* Instantiate the admin bar */
|
||||
|
||||
@@ -37,11 +39,11 @@ function _wp_admin_bar_init() {
|
||||
* @param string $wp_admin_bar_class Admin bar class to use. Default 'WP_Admin_Bar'.
|
||||
*/
|
||||
$admin_bar_class = apply_filters( 'wp_admin_bar_class', 'WP_Admin_Bar' );
|
||||
if ( class_exists( $admin_bar_class ) ) {
|
||||
if ( class_exists( $admin_bar_class ) )
|
||||
$wp_admin_bar = new $admin_bar_class;
|
||||
} else {
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
$wp_admin_bar->initialize();
|
||||
$wp_admin_bar->add_menus();
|
||||
|
||||
@@ -292,10 +294,10 @@ function wp_admin_bar_site_menu( $wp_admin_bar ) {
|
||||
}
|
||||
|
||||
if ( is_network_admin() ) {
|
||||
/* translators: %s: site name */
|
||||
/* translators: %s: site name */
|
||||
$blogname = sprintf( __( 'Network Admin: %s' ), esc_html( get_current_site()->site_name ) );
|
||||
} elseif ( is_user_admin() ) {
|
||||
/* translators: %s: site name */
|
||||
/* translators: %s: site name */
|
||||
$blogname = sprintf( __( 'User Dashboard: %s' ), esc_html( get_current_site()->site_name ) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user