bp_admin_url

Output the correct admin URL based on BuddyPress and WordPress configuration.

Description

bp_admin_url( (string) $path = '', (string) $scheme = 'admin' ); 

Parameters (2)

0. $path — Optional. (string) => ''
The path.
1. $scheme — Optional. (string) => 'admin'
The scheme.

Usage

  1. if ( !function_exists( 'bp_admin_url' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-functions.php'; 
  3.  
  4. // The path. 
  5. $path = ''; 
  6.  
  7. // The scheme. 
  8. $scheme = 'admin'; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bp_admin_url($path, $scheme); 
  12.  

Defined (1)

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

/bp-core/bp-core-functions.php  
  1. function bp_admin_url( $path = '', $scheme = 'admin' ) { 
  2. echo esc_url( bp_get_admin_url( $path, $scheme ) );