Add login form etc. to wp-adminbar
-
Hi
I want to use your fabulous plugin inside the wp-adminbar. The admin-bar is set to “always visible”.
The reason behind it is that this is a buddypress-site which uses the admin-bar for everything so it is a must to be able to login from there also.
I thought I could to it like this:
function login_form() { global $wp_admin_bar; $wp_admin_bar->add_menu( array( 'id' => 'wpse-form-in-admin-bar', 'title' => login_with_ajax( array( 'template' => 'in-menu' )) ) ); } add_action( 'wp_before_admin_bar_render', 'login_form' );
“in-menu” is at the moment only a copy of “divs-only”-theme. However, the menu renders not in the menu but just before <div id=”wpadminbar”>
What am I doing wrong?
Btw, if I do
$wp_admin_bar->add_menu( array( 'id' => 'wpse-form-in-admin-bar', 'title' => '<div>TEST</div>' ) );
it renders at the expected place.
Thanks for any insight!
Raphael
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Add login form etc. to wp-adminbar’ is closed to new replies.