Created
January 7, 2011 13:29
-
-
Save westi/769449 to your computer and use it in GitHub Desktop.
I like the admin bar that we are adding in the soon to be released WordPress 3.1 so much that I wanted it to always show on my site. This way you get an easy to use search box on every page even when logged out. I wrote a quick plugin file which I dro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function pjw_login_adminbar( $wp_admin_bar) { | |
if ( !is_user_logged_in() ) | |
$wp_admin_bar->add_menu( array( 'title' => __( 'Log In' ), 'href' => wp_login_url() ) ); | |
} | |
add_action( 'admin_bar_menu', 'pjw_login_adminbar' ); | |
add_filter( 'show_admin_bar', '__return_true' , 1000 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I like this alot