Skip to:
Content

BuddyPress.org

Ticket #6369: 6369.01.patch

File 6369.01.patch, 1.5 KB (added by DJPaul, 5 years ago)
  • src/bp-core/bp-core-filters.php

     
    540540        // Is there a displayed user, and do they have a name?
    541541        $displayed_user_name = bp_get_displayed_user_fullname();
    542542
    543         /**
    544          * Strip span tags out of title part strings.
    545          *
    546          * This is a temporary function for compatibility with WordPress versions
    547          * less than 4.0, and should be removed at a later date.
    548          *
    549          * @param  string $title_part
    550          * @return string
    551          */
    552         function _bp_strip_spans_from_title( $title_part = '' ) {
    553                 $title = $title_part;
    554                 $span = strpos( $title, '<span' );
    555                 if ( false !== $span ) {
    556                         $title = substr( $title, 0, $span - 1 );
    557                 }
    558                 return $title;
    559         }
    560 
    561543        // Displayed user
    562544        if ( ! empty( $displayed_user_name ) && ! is_404() ) {
    563545
     
    692674add_filter( 'bp_modify_page_title', 'esc_html'        );
    693675
    694676/**
     677 * Strip span tags out of title part strings.
     678 *
     679 * This is a temporary function for compatibility with WordPress versions
     680 * less than 4.0, and should be removed at a later date.
     681 *
     682 * @param  string $title_part
     683 * @return string
     684 */
     685function _bp_strip_spans_from_title( $title_part = '' ) {
     686        $title = $title_part;
     687        $span = strpos( $title, '<span' );
     688        if ( false !== $span ) {
     689                $title = substr( $title, 0, $span - 1 );
     690        }
     691        return $title;
     692}
     693
     694/**
    695695 * Add BuddyPress-specific items to the wp_nav_menu.
    696696 *
    697697 * @since BuddyPress (1.9.0)