diff --git bp-activity/bp-activity-loader.php bp-activity/bp-activity-loader.php
index e45b6a5..1ae1bd2 100644
|
|
class BP_Activity_Component extends BP_Component { |
101 | 101 | 'slug' => BP_ACTIVITY_SLUG, |
102 | 102 | 'root_slug' => isset( $bp->pages->activity->slug ) ? $bp->pages->activity->slug : BP_ACTIVITY_SLUG, |
103 | 103 | 'has_directory' => true, |
| 104 | 'directory_title' => __( 'Activity Directory', 'buddypress' ), |
104 | 105 | 'search_string' => __( 'Search Activity...', 'buddypress' ), |
105 | 106 | 'global_tables' => $global_tables, |
106 | 107 | 'notification_callback' => 'bp_activity_format_notifications', |
diff --git bp-core/bp-core-component.php bp-core/bp-core-component.php
index df271f1..406dcca 100644
|
|
class BP_Component { |
195 | 195 | 'slug' => $this->id, |
196 | 196 | 'root_slug' => $default_root_slug, |
197 | 197 | 'has_directory' => false, |
| 198 | 'directory_title' => '', |
198 | 199 | 'notification_callback' => '', |
199 | 200 | 'search_string' => '', |
200 | 201 | 'global_tables' => '' |
diff --git bp-core/bp-core-filters.php bp-core/bp-core-filters.php
index e02aa26..c26ba8f 100644
|
|
function bp_modify_page_title( $title, $sep, $seplocation ) { |
385 | 385 | |
386 | 386 | // An index or directory |
387 | 387 | } elseif ( bp_is_directory() ) { |
388 | | if ( !bp_current_component() ) { |
389 | | $title = sprintf( __( '%s Directory', 'buddypress' ), bp_get_name_from_root_slug() ); |
| 388 | |
| 389 | $current_component = bp_current_component(); |
| 390 | |
| 391 | // No current component (when does this happen?) |
| 392 | if ( empty( $current_component ) ) { |
| 393 | $title = __( 'Directory', 'buddypress' ); |
| 394 | |
| 395 | // Component has registered a Directory Title |
| 396 | } else if ( ! empty( $bp->{$current_component}->directory_title ) ) { |
| 397 | $title = $bp->{$current_component}->directory_title; |
| 398 | |
| 399 | // No directory title was provided, so we concatenate one |
390 | 400 | } else { |
391 | 401 | $title = sprintf( __( '%s Directory', 'buddypress' ), bp_get_name_from_root_slug() ); |
392 | 402 | } |