bp_displayed_user_id
Get the ID of the currently displayed user.
Description
(int) bp_displayed_user_id();
Returns (int)
$id ID of the currently displayed user.
Usage
if ( !function_exists( 'bp_displayed_user_id' ) ) { require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-template.php'; } // NOTICE! Understand what this does before running. $result = bp_displayed_user_id();
Defined (1)
The function is defined in the following location(s).
- /bp-core/bp-core-template.php
- function bp_displayed_user_id() {
- $bp =buddypress);
- $id = !empty( $bp->displayed_user->id )
- ? $bp->displayed_user->id
- : 0;
- /**
- * Filters the ID of the currently displayed user.
- *
- * @since 1.0.0
- *
- * @param int $id ID of the currently displayed user.
- */
- return (int) apply_filters( 'bp_displayed_user_id', $id );
- }