bp_nouveau_member_reset_front_template( array $templates = array() )

Add the default user front template to the front template hierarchy


Description Description


Parameters Parameters

$templates

(Optional) The list of templates for the front.php template part.

Default value: array()


Top ↑

Return Return

(array) The same list with the default front template if needed.


Top ↑

Source Source

File: bp-templates/bp-nouveau/includes/members/functions.php

function bp_nouveau_member_reset_front_template( $templates = array() ) {
	$use_default_front = bp_nouveau_get_appearance_settings( 'user_front_page' );

	// Setting the front template happens too early, so we need this!
	if ( is_customize_preview() ) {
		$use_default_front = bp_nouveau_get_temporary_setting( 'user_front_page', $use_default_front );
	}

	if ( ! empty( $use_default_front ) ) {
		array_push( $templates, 'members/single/default-front.php' );
	}

	/**
	 * Filters the BuddyPress Nouveau template hierarchy after resetting front template for members.
	 *
	 * @since 3.0.0
	 *
	 * @param array $templates Array of templates.
	 */
	return apply_filters( '_bp_nouveau_member_reset_front_template', $templates );
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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