bbp_get_single_user_template

Get the user profile template.

Description

(string) bbp_get_single_user_template(); 

Returns (string)

Path to template file


Usage

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

Defined (1)

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

/includes/core/template-loader.php  
  1. function bbp_get_single_user_template() { 
  2. $nicename = bbp_get_displayed_user_field( 'user_nicename' ); 
  3. $user_id = bbp_get_displayed_user_id(); 
  4. $templates = array( 
  5. 'single-user-' . $nicename . '.php', // Single User nicename 
  6. 'single-user-' . $user_id . '.php', // Single User ID 
  7. 'single-user.php', // Single User 
  8. 'user.php', // User 
  9. ); 
  10. return bbp_get_query_template( 'profile', $templates );