BuddyPress::activity_action( string $action, object $activity )

Description #

Activity action.

Parameters #

  • $action
    string (Required) Action.
  • $activity
    object (Required) Activity object.

Source #

File: addons/buddypress/buddypress.php

	public function activity_action( $action, $activity ) {
		if ( in_array( $activity->type, array( 'new_question', 'new_answer' ), true ) ) {
			return str_replace( 'AP_CPT_LINK', get_permalink( $activity->secondary_item_id ), $action );
		}

		return $action;
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment