bbp_get_template_part( string $slug, string $name = null )
Adds bbPress theme support to any active WordPress theme
Description Description
Parameters Parameters
- $slug
-
(Required)
- $name
-
(Optional) Default null
Default value: null
Source Source
File: includes/core/template-functions.php
function bbp_get_template_part( $slug, $name = null ) { // Execute code for this part do_action( 'get_template_part_' . $slug, $slug, $name ); // Setup possible parts $templates = array(); if ( isset( $name ) ) { $templates[] = $slug . '-' . $name . '.php'; } $templates[] = $slug . '.php'; // Allow template parst to be filtered $templates = apply_filters( 'bbp_get_template_part', $templates, $slug, $name ); // Return the part that is found return bbp_locate_template( $templates, true, false ); }
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |