diff --git a/includes/items-edit-content.php b/includes/items-edit-content.php index 5d72c76..0956c61 100644 --- a/includes/items-edit-content.php +++ b/includes/items-edit-content.php @@ -124,7 +124,7 @@ function ddw_tbex_items_view_archives( $wp_admin_bar ) { $post_type_object->labels->name ); - /** Tweak Toolbar node */ + /** Tweak Toolbar node --> needs GLOBAL here! */ $GLOBALS[ 'wp_admin_bar' ]->add_node( array( 'id' => 'archive', // same as original! diff --git a/includes/plugins/items-login-designer.php b/includes/plugins/items-login-designer.php index 784a89b..450a4b2 100644 --- a/includes/plugins/items-login-designer.php +++ b/includes/plugins/items-login-designer.php @@ -24,6 +24,8 @@ * @uses ddw_tbex_item_title_with_icon() * @uses ddw_tbex_customizer_focus() * + * @global mixed $GLOBALS[ 'wp_admin_bar' ] + * * @param object $admin_bar Object of Toolbar nodes. */ function ddw_tbex_site_items_login_designer( $admin_bar ) { @@ -37,7 +39,7 @@ function ddw_tbex_site_items_login_designer( $admin_bar ) { $title = esc_attr__( 'Login Designer', 'toolbar-extras' ); /** For: Active Theme Group */ - $admin_bar->add_node( + $GLOBALS[ 'wp_admin_bar' ]->add_node( array( 'id' => 'rtabor-logindesigner', 'parent' => 'group-active-theme', @@ -51,7 +53,7 @@ function ddw_tbex_site_items_login_designer( $admin_bar ) { ); /** For: Front Customizer */ - $admin_bar->add_node( + $GLOBALS[ 'wp_admin_bar' ]->add_node( array( 'id' => 'my-sub-item', // same as original 'parent' => 'customize', diff --git a/includes/plugins/items-seopress.php b/includes/plugins/items-seopress.php index cf54aef..df970c7 100644 --- a/includes/plugins/items-seopress.php +++ b/includes/plugins/items-seopress.php @@ -49,7 +49,7 @@ function ddw_tbex_site_items_rehook_seopress( $wp_admin_bar ) { /** Bail early if SEOPress tweak should NOT be used */ if ( ! ddw_tbex_use_tweak_seopress() ) { - return; + return $wp_admin_bar; } /** Re-hook for: Site Group */