bbp_maybe_get_root_slug

Maybe return the root slug, based on whether or not it's included in the url.

Description

(string) bbp_maybe_get_root_slug(); 

Returns (string)


Usage

  1. if ( !function_exists( 'bbp_maybe_get_root_slug' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/core/options.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bbp_maybe_get_root_slug(); 
  7.  

Defined (1)

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

/includes/core/options.php  
  1. function bbp_maybe_get_root_slug() { 
  2. $retval = ''; 
  3.  
  4. $retval = trailingslashit( bbp_get_root_slug() ); 
  5.  
  6. return apply_filters( 'bbp_maybe_get_root_slug', $retval );