Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/10/2016 02:25:50 PM (9 years ago)
Author:
hnla
Message:

Use WP page titles for BP directory pages headings

The activity directory heading historically used a hardcoded string for it's WP page title (post_title), with other component directories taking the name from the actual WP page title.

This commit brings all page headings for BP directories into parity, screens will look to the WP page(post_title) for the string to use, & BP sets a new series of initial default strings for new installs page creation.

An update routine is provided to ensure that no existing sites will suddenly see a new title string, if a previous install then update the post_title to older hardcoded strings (unless the page title changed by user), thereafter changes to the WP page title determine what BP will display.

Props boonebgorges, imath, dcavins, hnla
Fixes #6765

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/classes/class-bp-activity-component.php

    r11022 r11080  
    121121        );
    122122
     123        // Fetch the default directory title.
     124        $default_directory_titles = bp_core_get_directory_page_default_titles();
     125        $default_directory_title  = $default_directory_titles[$this->id];
     126
    123127        // All globals for activity component.
    124128        // Note that global_tables is included in this array.
     
    127131            'root_slug'             => isset( $bp->pages->activity->slug ) ? $bp->pages->activity->slug : BP_ACTIVITY_SLUG,
    128132            'has_directory'         => true,
    129             'directory_title'       => _x( 'Site-Wide Activity', 'component directory title', 'buddypress' ),
     133            'directory_title'       => isset( $bp->pages->activity->title ) ? $bp->pages->activity->title : $default_directory_title,
    130134            'notification_callback' => 'bp_activity_format_notifications',
    131135            'search_string'         => __( 'Search Activity...', 'buddypress' ),
Note: See TracChangeset for help on using the changeset viewer.