bp_adminbar_login_menu

Output the "Log In" and "Sign Up" names to the BuddyBar.

Description

(bool|null) bp_adminbar_login_menu(); 

Visible only to visitors who are not logged in.

Returns (bool|null)

Returns false if the current user is logged in.


Usage

  1. if ( !function_exists( 'bp_adminbar_login_menu' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/deprecated/2.1.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_adminbar_login_menu(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-core/deprecated/2.1.php  
  1. function bp_adminbar_login_menu() { 
  2.  
  3. if ( is_user_logged_in() ) { 
  4. return false; 
  5.  
  6. echo '<li class="bp-login no-arrow"><a href="' . wp_login_url() . '">' . __( 'Log In', buddypress ) . '</a></li>'; 
  7.  
  8. // Show "Sign Up" link if user registrations are allowed 
  9. if ( bp_get_signup_allowed() ) { 
  10. echo '<li class="bp-signup no-arrow"><a href="' . bp_get_signup_page() . '">' . __( 'Sign Up', buddypress ) . '</a></li>';