Changeset 10402 for branches/2.4/src/bp-core/bp-core-functions.php
- Timestamp:
- 12/13/2015 04:45:43 PM (10 years ago)
- File:
-
- 1 edited
-
branches/2.4/src/bp-core/bp-core-functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.4/src/bp-core/bp-core-functions.php
r10110 r10402 2297 2297 add_action( 'bp_init', 'bp_remove_adjacent_posts_rel_link' ); 2298 2298 2299 /** 2300 * Strip the span count of a menu item or of a title part. 2301 * 2302 * @since 2.2.2 2303 * 2304 * @param string $title_part Title part to clean up. 2305 * @return string 2306 */ 2307 function _bp_strip_spans_from_title( $title_part = '' ) { 2308 $title = $title_part; 2309 $span = strpos( $title, '<span' ); 2310 if ( false !== $span ) { 2311 $title = substr( $title, 0, $span - 1 ); 2312 } 2313 return trim( $title ); 2314 } 2315 2299 2316 /** Nav Menu ******************************************************************/ 2300 2317 … … 2348 2365 2349 2366 // Remove <span>number</span> 2350 $item_name = preg_replace( '/([.0-9]+)/', '', $bp_item['name'] ); 2351 $item_name = trim( strip_tags( $item_name ) ); 2367 $item_name = _bp_strip_spans_from_title( $bp_item['name'] ); 2352 2368 2353 2369 $page_args[ $bp_item['slug'] ] = (object) array(
Note: See TracChangeset
for help on using the changeset viewer.