BP_Blogs_Theme_Compat::create_template_hierarchy( string $templates )

Add custom template hierarchy to theme compat for the blog create page.


Description Description

This is to mirror how WordPress has template hierarchy.


Parameters Parameters

$templates

(Required) The templates from bp_get_theme_compat_templates().


Top ↑

Return Return

(array) $templates Array of custom templates to look for.


Top ↑

Source Source

File: bp-blogs/classes/class-bp-blogs-theme-compat.php

	public function create_template_hierarchy( $templates ) {

		/**
		 * Filters the custom templates used for theme compat with the blog create page.
		 *
		 * @since 1.8.0
		 *
		 * @param array $value Array of template paths to add to template list to look for.
		 */
		$new_templates = apply_filters( 'bp_template_hierarchy_blogs_create', array(
			'blogs/index-create.php'
		) );

		// Merge new templates with existing stack
		// @see bp_get_theme_compat_templates().
		$templates = array_merge( (array) $new_templates, $templates );

		return $templates;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.