Skip to:
Content

BuddyPress.org

Changeset 3627 for trunk/bp-forums.php


Ignore:
Timestamp:
12/30/2010 10:13:05 PM (16 years ago)
Author:
boonebgorges
Message:

Replaces generic 'Search anything' default directory search text with component-specific text. Fixes #1915. Fixes ->forums->slug so that it is properly set in the bp_pages way

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-forums.php

    r3592 r3627  
    55        define( 'BP_FORUMS_PARENT_FORUM_ID', 1 );
    66
    7 if ( !defined( 'BP_FORUMS_SLUG' ) )
    8         define( 'BP_FORUMS_SLUG', 'forums' );
    9 
    107if ( !defined( 'BB_PATH' ) )
    118        require ( BP_PLUGIN_DIR . '/bp-forums/bp-forums-bbpress.php' );
     
    1411require ( BP_PLUGIN_DIR . '/bp-forums/bp-forums-filters.php' );
    1512
     13/**
     14 * Puts important forums component data into the $bp global for later use.
     15 *
     16 * @package BuddyPress Forums
     17 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals()
     18 */
    1619function bp_forums_setup() {
    1720        global $bp;
    18 
    19         /* For internal identification */
     21       
     22        if ( !defined( 'BP_FORUMS_SLUG' ) )
     23                define ( 'BP_FORUMS_SLUG', $bp->pages->forums->slug );
     24
     25        // For internal identification
    2026        $bp->forums->id = 'forums';
    2127
     
    2632                $bp->forums->bbconfig = $bp->site_options['bb-config-location'];
    2733
    28         /* Register this in the active components array */
     34        // Register this in the active components array
    2935        $bp->active_components[$bp->forums->slug] = $bp->forums->id;
     36
     37        // The default text for the forums directory search box
     38        $bp->default_search_strings[$bp->forums->slug] = __( 'Search Forum Topics...', 'buddypress' );
    3039
    3140        do_action( 'bp_forums_setup' );
Note: See TracChangeset for help on using the changeset viewer.