Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/09/2014 02:38:24 PM (11 years ago)
Author:
boonebgorges
Message:

Improve strings used for <title> and header of directory pages

Our legacy method for creating directory titles involved concatenating the
component name into '% Directory', which did not work well in languages where
a term like 'Groups Directory' would be translated into a single word. In
addition, there was inconistency between the <title> element on directory pages
and the header element used in the page body.

This changeset introduces a 'directory_title' parameter to BP_Core_Component,
so that directories can register a fully localizable string as the title/
header for directories.

To avoid filter name conflicts, the filter names associated with the headers
on group and blog directory pages were changed to _directory_header. See r7942,

See #4726, #4630

Fixes #4631

File:
1 edited

Legend:

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

    r7839 r8090  
    216216            'root_slug'             => $default_root_slug,
    217217            'has_directory'         => false,
     218            'directory_title'       => '',
    218219            'notification_callback' => '',
    219220            'search_string'         => '',
     
    230231        // Does this component have a top-level directory?
    231232        $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']         );
    232236
    233237        // Search string
Note: See TracChangeset for help on using the changeset viewer.