bp_nouveau_activity_is_edited( int $activity_id, bool $echo = true )

Get log is edited activity.

Description

Parameters

$activity_id

(int) (Required)

$echo

(bool) (Optional)

Default value: true

Return

(mixed)

Source

File: bp-templates/bp-nouveau/includes/activity/template-tags.php

function bp_nouveau_activity_is_edited( $activity_id = 0, $echo = true ) {

	if ( empty( $activity_id ) ) {
		$activity_id = bp_get_activity_id();
	}

	if ( empty( $activity_id ) ) {
		return;
	}

	$is_edited   = bp_activity_get_meta( $activity_id, '_is_edited', true );

	if ( $is_edited ) {
		$activity_text = '<span class="bb-activity-edited-text"> ' . __( '(edited)', 'buddyboss' ) . ' </span>';

	} else {
		$activity_text = null;
	}

	$rendered_text = apply_filters( 'bp_nouveau_activity_is_edited', $activity_text, $activity_id );

	if ( $echo ) {
		echo $rendered_text;
	} else {
		return $rendered_text;
	}
}

Changelog

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