bp_get_activity_feed_item_title()

Return the activity feed item title.


Description Description


Return Return

(string) $title The activity feed item title.


Top ↑

Source Source

File: bp-activity/bp-activity-template.php

	function bp_get_activity_feed_item_title() {
		global $activities_template;

		if ( !empty( $activities_template->activity->action ) ) {
			$content = $activities_template->activity->action;
		} else {
			$content = $activities_template->activity->content;
		}

		$content = explode( '<span', $content );
		$title   = strip_tags( ent2ncr( trim( convert_chars( $content[0] ) ) ) );

		if ( ':' === substr( $title, -1 ) ) {
			$title = substr( $title, 0, -1 );
		}

		if ( 'activity_update' === $activities_template->activity->type ) {
			$title .= ': ' . strip_tags( ent2ncr( trim( convert_chars( bp_create_excerpt( $activities_template->activity->content, 70, array( 'ending' => " [&#133;]" ) ) ) ) ) );
		}

		/**
		 * Filters the activity feed item title.
		 *
		 * @since 1.0.0
		 *
		 * @param string $title The title for the activity feed item.
		 */
		return apply_filters( 'bp_get_activity_feed_item_title', $title );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.