BP_Activity_Theme_Compat::single_template_hierarchy( string $templates )

Add custom template hierarchy to theme compat for activity permalink pages.

Description Description

This is to mirror how WordPress has template hierarchy.

Top ↑

Parameters Parameters


(string) (Required) The templates from bp_get_theme_compat_templates().

Top ↑

Return Return

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

Source Source

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

	public function single_template_hierarchy( $templates ) {

		 * Filters the template hierarchy for the activity permalink pages.
		 * @since 1.8.0
		 * @param array $index Array holding template names to be merged into template list.
		$new_templates = apply_filters( 'bp_template_hierarchy_activity_single_item', array(
		) );

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

		return $templates;

Top ↑

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.