Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/19/2010 04:36:58 PM (15 years ago)
Author:
apeatling
Message:

Improving page titles.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-templatetags.php

    r2348 r2365  
    888888    if ( is_home() && bp_is_page( 'home' ) ) {
    889889        $title = __( 'Home', 'buddypress' );
     890
    890891    } else if ( bp_is_blog_page() ) {
    891892        if ( is_single() ) {
     
    899900
    900901    } else if ( !empty( $bp->displayed_user->fullname ) ) {
    901         $title = strip_tags( $bp->displayed_user->fullname . ' | ' . ucwords( $bp->current_component ) . ' | ' . $bp->bp_options_nav[$bp->current_component][$bp->current_action]['name'] );
     902        $title = strip_tags( $bp->displayed_user->fullname . ' | ' . ucwords( $bp->current_component ) );
     903
    902904    } else if ( $bp->is_single_item ) {
    903         $title = ucwords( $bp->current_component ) . ' | ' . $bp->bp_options_title;
     905        $title = ucwords( $bp->current_component ) . ' | ' . $bp->bp_options_title . ' | ' . $bp->bp_options_nav[$bp->current_component][$bp->current_action]['name'];
     906
    904907    } else if ( $bp->is_directory ) {
    905908        if ( !$bp->current_component )
     
    907910        else
    908911            $title = sprintf( __( '%s Directory', 'buddypress' ), ucwords( $bp->current_component ) );
    909     } else {
    910         global $post;
    911         $title = get_the_title($post->ID);
     912
     913    } else if ( bp_is_register_page() ) {
     914        $title = __( 'Create an Account', 'buddypress' );
     915
     916    } else if ( bp_is_activation_page() ) {
     917        $title = __( 'Activate your Account', 'buddypress' );
    912918    }
    913919
     
    918924    }
    919925
    920     return apply_filters( 'bp_page_title', $blog_title . ' | ' . attribute_escape( $title ), attribute_escape( $title ) );
     926    return apply_filters( 'bp_page_title', $blog_title . ' | ' . esc_attr( $title ), esc_attr( $title ) );
    921927}
    922928
Note: See TracChangeset for help on using the changeset viewer.