_bp_strip_spans_from_title( string $title_part = '' )

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


Parameters Parameters

$title_part

(string) (Optional) Title part to clean up.

Default value: ''


Top ↑

Return Return

(string)


Source 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 );
}


Top ↑

Changelog Changelog

Changelog
Version Description
2.2.2 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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