Changeset 2863 for trunk/bp-forums.php
- Timestamp:
- 03/22/2010 11:34:23 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums.php
r2695 r2863 1 1 <?php 2 3 2 /* Define the parent forum ID */ 4 3 if ( !defined( 'BP_FORUMS_PARENT_FORUM_ID' ) ) 5 4 define( 'BP_FORUMS_PARENT_FORUM_ID', 1 ); 6 5 7 if ( !defined( 'BP_FORUMS_SLUG' ) )8 define( 'BP_FORUMS_SLUG', 'forums' );9 10 6 if ( !defined( 'BB_PATH' ) ) 11 7 require ( BP_PLUGIN_DIR . '/bp-forums/bp-forums-bbpress.php' ); … … 17 13 global $bp; 18 14 15 if ( !defined( 'BP_FORUMS_SLUG' ) ) 16 define ( 'BP_FORUMS_SLUG', $bp->pages->forums->slug ); 17 19 18 /* For internal identification */ 20 19 $bp->forums->id = 'forums'; 20 $bp->forums->name = $bp->pages->forums->name; 21 $bp->forums->slug = BP_FORUMS_SLUG; 21 22 22 23 $bp->forums->image_base = BP_PLUGIN_URL . '/bp-forums/images'; 23 24 $bp->forums->bbconfig = $bp->site_options['bb-config-location']; 24 $bp->forums->slug = BP_FORUMS_SLUG;25 25 26 26 /* Register this in the active components array */ … … 40 40 } 41 41 42 function bp_forums_setup_root_component() {43 /* Register 'forums' as a root component */44 bp_core_add_root_component( BP_FORUMS_SLUG );45 }46 add_action( 'bp_setup_root_components', 'bp_forums_setup_root_component' );47 48 42 function bp_forums_directory_forums_setup() { 49 43 global $bp; 50 44 51 45 if ( $bp->current_component == $bp->forums->slug ) { 52 if ( (int) $bp->site_options['bp-disable-forum-directory'] || ! function_exists( 'groups_install' ) )46 if ( (int) $bp->site_options['bp-disable-forum-directory'] || !bp_is_active( 'groups' ) ) 53 47 return false; 54 48
Note: See TracChangeset
for help on using the changeset viewer.