_bp_strip_spans_from_title( string $title_part = '' )

Strip the span count of a menu item or of a title part.

Description

Parameters

$title_part

(Optional) Title part to clean up.

Default value: ''

Return

(string)

Source

File: bp-core/bp-core-functions.php

function _bp_strip_spans_from_title( $title_part = '' ) {
	$title = $title_part;
	$span = strpos( $title, '<span' );
	if ( false !== $span ) {
		$title = substr( $title, 0, $span - 1 );
	}
	return trim( $title );
}

Changelog

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