BP_Activity_Activity::generate_action_strings( array $activities )

Generate action strings for the activities located in BP_Activity_Activity::get().

Description

If no string can be dynamically generated for a given item (typically because the activity type has not been properly registered), the static ‘action’ value pulled from the database will be left in place.

Parameters

$activities

(Required) Array of activities.

Return

(array)

Source

File: bp-activity/classes/class-bp-activity-activity.php

	protected static function generate_action_strings( $activities ) {
		foreach ( $activities as $key => $activity ) {
			$generated_action = bp_activity_generate_action_string( $activity );
			if ( false !== $generated_action ) {
				$activity->action = $generated_action;
			}

			$activities[ $key ] = $activity;
		}

		return $activities;
	}

Changelog

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