bp_deregister_template_stack( string $location_callback = '', int $priority = 10 )

Deregister a previously registered template stack location.


Description Description

See also See also


Top ↑

Parameters Parameters

$location_callback

(Optional) Callback function that returns the stack location.

Default value: ''

$priority

(Optional) The priority parameter passed to bp_register_template_stack(). Default: 10.

Default value: 10


Top ↑

Return Return

(bool) See remove_filter().


Top ↑

Source Source

File: bp-core/bp-core-template-loader.php

function bp_deregister_template_stack( $location_callback = '', $priority = 10 ) {

	// Bail if no location, or function/method is not callable.
	if ( empty( $location_callback ) || ! is_callable( $location_callback ) ) {
		return false;
	}

	// Add location callback to template stack.
	return remove_filter( 'bp_template_stack', $location_callback, (int) $priority );
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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