bp_media_activity_after_email_content( BP_Activity_Activity $activity )

Added text on the email when replied on the activity.

Description

Parameters

$activity

(Required) Activity Object.

Source

File: bp-media/bp-media-filters.php

function bp_media_activity_after_email_content( $activity ) {
	$media_ids = bp_activity_get_meta( $activity->id, 'bp_media_ids', true );

	if ( ! empty( $media_ids ) ) {
		$media_ids = explode( ',', $media_ids );
		$photo_text = sprintf(
		        _n( '%s photo', '%s photos', count( $media_ids) , 'buddyboss' ),
                number_format_i18n( count( $media_ids ) )
        );
		$content   = sprintf(
		    /* translator: 1. Activity link, 2. Activity photo count */
			__( '<a href="%1$s" target="_blank">%2$s uploaded</a>', 'buddyboss' ),
			bp_activity_get_permalink( $activity->id ),
			$photo_text
		);
		echo wpautop( $content );
	}
}

Changelog

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