-
apply_filters( 'bbp_pre_get_user_profile_url', (int) $user_id )
Source Reference:
-
*/ function bbp_get_user_profile_url( $user_id = 0, $user_nicename = '' ) { global $wp_rewrite, $bbp; // Use displayed user ID if there is one, and one isn't requested if ( !$user_id = bbp_get_user_id( $user_id ) ) return false; // Allow early overriding of the profile URL to cut down on processing $early_profile_url = apply_filters( 'bbp_pre_get_user_profile_url', (int) $user_id ); if ( is_string( $early_profile_url ) ) return $early_profile_url; // Pretty permalinks if ( $wp_rewrite->using_permalinks() ) { $url = $wp_rewrite->root . $bbp->user_slug . '/%' . $bbp->user_id . '%'; // Get username if not passed if ( empty( $user_nicename ) ) { $user = get_userdata( $user_id );
-
Hook: add_filter: bbp_pre_get_user_profile_url instances (1)
-
add_filter( 'bbp_pre_get_user_profile_url', array( $this, 'user_profile_url' ) )
Source Reference:
-
// Obey BuddyPress commenting rules add_filter( 'bp_activity_can_comment', array( $this, 'activity_can_comment' ) ); // Link directly to the topic or reply add_filter( 'bp_activity_get_permalink', array( $this, 'activity_get_permalink' ), 10, 2 ); /** Profiles **********************************************************/ // Override bbPress user profile URL with BuddyPress profile URL add_filter( 'bbp_pre_get_user_profile_url', array( $this, 'user_profile_url' ) ); /** Mentions **********************************************************/ // Only link mentions if activity component is active if ( bp_is_active( 'activity' ) ) { // Convert mentions into links on create add_filter( 'bbp_new_topic_pre_content', 'bp_activity_at_name_filter' ); add_filter( 'bbp_new_reply_pre_content', 'bp_activity_at_name_filter' );
-