bp_update_is_directory( bool $is_directory = false, string $component = '' )

Set the “is_directory” global.

Description

Parameters

$is_directory

(Optional) Default: false.

Default value: false

$component

(Optional) Component name. Default: the current component.

Default value: ''

Source

File: bp-core/bp-core-functions.php

2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
function bp_update_is_directory( $is_directory = false, $component = '' ) {
 
    if ( empty( $component ) ) {
        $component = bp_current_component();
    }
 
    /**
     * Filters the "is_directory" global value.
     *
     * @since BuddyPress 1.5.0
     *
     * @param bool   $is_directory Whether or not we're "is_directory".
     * @param string $component    Component name. Default: the current component.
     */
    buddypress()->is_directory = apply_filters( 'bp_update_is_directory', $is_directory, $component );
}

Changelog

Changelog
Version Description
BuddyPress 1.5.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.