Exemplo n.º 1
0
/**
 * Change the HTML title to reflect custom Group Tree name
 * Works with either the BP 1.2 bp_page_title hook or the standard wp_title hook used in BP 1.5+
 */
function bp_group_hierarchy_group_tree_title($full_title, $title, $sep_location = null)
{
    global $bp;
    if ($sep_location != null) {
        return bp_group_hierarchy_clean_title($bp->group_hierarchy->extension_settings['group_tree_name']) . ' ' . $title . ' ';
    }
    return $full_title . bp_group_hierarchy_clean_title($bp->group_hierarchy->extension_settings['group_tree_name']);
}
Exemplo n.º 2
0
/**
 * Change the HTML title to reflect custom Group Tree name
 */
function bp_group_hierarchy_group_tree_title($title, $sep, $sep_location = null)
{
    global $bp;
    if ($sep_location != null) {
        return str_replace(sprintf(__('%s Directory', 'buddypress'), bp_get_name_from_root_slug()), bp_group_hierarchy_clean_title($bp->group_hierarchy->extension_settings['group_tree_name']), $title);
    }
    // I think this is left over from BP 1.2, so just return the title
    return $title;
}