Skip to:
Content

BuddyPress.org

Changeset 10835


Ignore:
Timestamp:
05/31/2016 07:00:48 AM (9 years ago)
Author:
r-a-y
Message:

Core: Introduce bp_get_asset_template_part().

Basically the same as bp_get_template_part(), but with 'assets/'
prepended to the slug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-template-loader.php

    r10825 r10835  
    6060    // Return the part that is found.
    6161    return bp_locate_template( $templates, true, false );
     62}
     63
     64/**
     65 * Get an asset template part.
     66 *
     67 * Basically the same as {@link bp_get_template_part()}, but with 'assets/'
     68 * prepended to the slug.
     69 *
     70 * @since 2.6.0
     71 *
     72 * @see bp_get_template_part() for full documentation.
     73 */
     74function bp_get_asset_template_part( $slug, $name = null ) {
     75    return bp_get_template_part( "assets/{$slug}", $name );
    6276}
    6377
Note: See TracChangeset for help on using the changeset viewer.