Changeset 8090
- Timestamp:
- 03/09/2014 02:38:24 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-loader.php
r7854 r8090 107 107 'root_slug' => isset( $bp->pages->activity->slug ) ? $bp->pages->activity->slug : BP_ACTIVITY_SLUG, 108 108 'has_directory' => true, 109 'directory_title' => _x( 'Sitewide Activity', 'component directory title', 'buddypress' ), 109 110 'notification_callback' => 'bp_activity_format_notifications', 110 111 'search_string' => __( 'Search Activity...', 'buddypress' ), -
trunk/bp-activity/bp-activity-screens.php
r7926 r8090 382 382 bp_theme_compat_reset_post( array( 383 383 'ID' => 0, 384 'post_title' => __( 'Sitewide Activity', 'buddypress' ),384 'post_title' => bp_get_directory_title( 'activity' ), 385 385 'post_author' => 0, 386 386 'post_date' => 0, -
trunk/bp-blogs/bp-blogs-screens.php
r7942 r8090 142 142 public function directory_dummy_post() { 143 143 144 $title = apply_filters( 'bp_blogs_directory_ title', __( 'Sites', 'buddypress' ) );144 $title = apply_filters( 'bp_blogs_directory_header', __( 'Sites', 'buddypress' ) ); 145 145 146 146 bp_theme_compat_reset_post( array( -
trunk/bp-core/bp-core-component.php
r7839 r8090 216 216 'root_slug' => $default_root_slug, 217 217 'has_directory' => false, 218 'directory_title' => '', 218 219 'notification_callback' => '', 219 220 'search_string' => '', … … 230 231 // Does this component have a top-level directory? 231 232 $this->has_directory = apply_filters( 'bp_' . $this->id . '_has_directory', $r['has_directory'] ); 233 234 // Does this component have a top-level directory? 235 $this->directory_title = apply_filters( 'bp_' . $this->id . '_directory_title', $r['directory_title'] ); 232 236 233 237 // Search string -
trunk/bp-core/bp-core-filters.php
r8033 r8090 432 432 // An index or directory 433 433 } elseif ( bp_is_directory() ) { 434 if ( !bp_current_component() ) { 435 $title = sprintf( __( '%s Directory', 'buddypress' ), bp_get_name_from_root_slug() ); 434 435 $current_component = bp_current_component(); 436 437 // No current component (when does this happen?) 438 if ( empty( $current_component ) ) { 439 $title = _x( 'Directory', 'component directory title', 'buddypress' ); 436 440 } else { 437 $title = sprintf( __( '%s Directory', 'buddypress' ), bp_get_name_from_root_slug());441 $title = bp_get_directory_title( $current_component ); 438 442 } 439 443 -
trunk/bp-core/bp-core-template.php
r8068 r8090 82 82 83 83 echo apply_filters( 'bp_get_options_title', esc_attr( $bp->bp_options_title ) ); 84 } 85 86 /** 87 * Get the directory title for a component. 88 * 89 * Used for the <title> element and the page header on the component directory 90 * page. 91 * 92 * @since BuddyPress (2.0.0) 93 * 94 * @return string 95 */ 96 function bp_get_directory_title( $component = '' ) { 97 $title = ''; 98 99 // Use the string provided by the component 100 if ( isset( buddypress()->{$component}->directory_title ) ) { 101 $title = buddypress()->{$component}->directory_title; 102 103 // If none is found, concatenate 104 } else if ( isset( buddypress()->{$component}->name ) ) { 105 $title = sprintf( __( '%s Directory', 'buddypress' ), buddypress()->{$component}->name ); 106 } 107 108 return apply_filters( 'bp_get_directory_title', $title, $component ); 84 109 } 85 110 -
trunk/bp-groups/bp-groups-loader.php
r8057 r8090 148 148 'root_slug' => isset( $bp->pages->groups->slug ) ? $bp->pages->groups->slug : BP_GROUPS_SLUG, 149 149 'has_directory' => true, 150 'directory_title' => _x( 'Groups', 'component directory title', 'buddypress' ), 150 151 'notification_callback' => 'groups_format_notifications', 151 152 'search_string' => __( 'Search Groups...', 'buddypress' ), -
trunk/bp-groups/bp-groups-screens.php
r7942 r8090 1022 1022 public function directory_dummy_post() { 1023 1023 1024 $title = apply_filters( 'bp_groups_directory_ title', __( 'Groups', 'buddypress' ) );1024 $title = apply_filters( 'bp_groups_directory_header', bp_get_directory_title( 'groups' ) ); 1025 1025 1026 1026 bp_theme_compat_reset_post( array( -
trunk/bp-members/bp-members-loader.php
r7860 r8090 73 73 'root_slug' => isset( $bp->pages->members->slug ) ? $bp->pages->members->slug : BP_MEMBERS_SLUG, 74 74 'has_directory' => true, 75 'directory_title' => _x( 'Members', 'component directory title', 'buddypress' ), 75 76 'global_tables' => array( 76 77 'table_name_last_activity' => bp_core_get_table_prefix() . 'bp_activity', -
trunk/bp-members/bp-members-screens.php
r7926 r8090 364 364 bp_theme_compat_reset_post( array( 365 365 'ID' => 0, 366 'post_title' => __( 'Members', 'buddypress' ),366 'post_title' => bp_get_directory_title( 'members' ), 367 367 'post_author' => 0, 368 368 'post_date' => 0, -
trunk/bp-templates/bp-legacy/buddypress-functions.php
r8088 r8090 112 112 add_action( 'bp_group_header_actions', 'bp_group_new_topic_button', 20 ); 113 113 add_action( 'bp_directory_groups_actions', 'bp_group_join_button' ); 114 add_filter( 'bp_groups_directory_ title','bp_legacy_theme_group_create_button' );115 add_filter( 'bp_blogs_directory_ title','bp_legacy_theme_blog_create_button' );114 add_filter( 'bp_groups_directory_header', 'bp_legacy_theme_group_create_button' ); 115 add_filter( 'bp_blogs_directory_header', 'bp_legacy_theme_blog_create_button' ); 116 116 } 117 117
Note: See TracChangeset
for help on using the changeset viewer.