Skip to:
Content

BuddyPress.org

Ticket #6765: 6765-02c.patch

File 6765-02c.patch, 834 bytes (added by imath, 4 years ago)
  • src/bp-core/bp-core-template.php

    diff --git src/bp-core/bp-core-template.php src/bp-core/bp-core-template.php
    index 1f2c5e9..28d3f66 100644
    function bp_get_options_title() { 
    123123function bp_get_directory_title( $component = '' ) {
    124124        $title = '';
    125125
    126         // Use the string provided by the component.
    127         if ( ! empty( buddypress()->{$component}->directory_title ) ) {
     126        // Use the WordPress Page title.
     127        if ( ! empty( buddypress()->pages->{$component}->title ) ) {
     128                $title = buddypress()->pages->{$component}->title;
     129
     130        // Or use the string provided by the component in bp-{component}-loader.php setup_globals.
     131        } elseif ( ! empty( buddypress()->{$component}->directory_title ) ) {
    128132                $title = buddypress()->{$component}->directory_title;
    129133
    130134        // If none is found, concatenate.