BP_Email_Tokens::token__poster_url( BP_Email $bp_email, array $formatted_tokens, array $tokens )

Generate the output for token poster.url

Description

Parameters

$bp_email

(BP_Email) (Required)

$formatted_tokens

(array) (Required)

$tokens

(array) (Required)

Return

(string) html for the output

Source

File: bp-core/classes/class-bp-email-tokens.php

	public function token__poster_url( $bp_email, $formatted_tokens, $tokens ) {
		$activity = isset( $tokens['activity'] ) ? $tokens['activity'] : false;

		if ( empty( $activity ) ) {
			$user_id = isset( $tokens['commenter.id'] ) ? $tokens['commenter.id'] : false;
		} else {
			$user_id = $activity->user_id;
		}

		if ( empty( $user_id ) ) {
			return "";
		}

		return bp_core_get_user_domain( $user_id );
	}

Changelog

Changelog
Version Description
BuddyBoss 1.0.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.