bp_get_asset_template_part

Get an asset template part.

Description

(string) bp_get_asset_template_part( (string) $slug, (null) $name = null ); 

Basically the same as , but with assets/ prepended to the slug.

Returns (string)

Parameters (2)

0. $slug (string)
Template slug.
1. $name — Optional. (null) => null
Template name.

Usage

  1. if ( !function_exists( 'bp_get_asset_template_part' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-template-loader.php'; 
  3.  
  4. // Template slug. 
  5. $slug = ''; 
  6.  
  7. // Template name. 
  8. $name = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bp_get_asset_template_part($slug, $name); 
  12.  

Defined (1)

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

/bp-core/bp-core-template-loader.php  
  1. function bp_get_asset_template_part( $slug, $name = null ) { 
  2. return bp_get_template_part( "assets/{$slug}", $name );