bbp_get_subscriptions_template

Get the user subscriptions template.

Description

(string) bbp_get_subscriptions_template(); 

Returns (string)

Path to template file


Usage

  1. if ( !function_exists( 'bbp_get_subscriptions_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_subscriptions_template(); 
  7.  

Defined (1)

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

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