Changeset 2863 for trunk/bp-core/bp-core-filters.php
- Timestamp:
- 03/22/2010 11:34:23 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-filters.php
r2842 r2863 1 1 <?php 2 3 /** 4 * bp_core_exclude_pages() 5 * 6 * Excludes specific pages from showing on page listings, for example the "Activation" page. 7 * 8 * @package BuddyPress Core 9 * @uses bp_is_active() checks if a BuddyPress component is active. 10 * @return array The list of page ID's to exclude 11 */ 12 function bp_core_exclude_pages( $pages ) { 13 global $bp; 14 15 $pages = explode( ',', $pages ); 16 $pages[] = $bp->pages->activate->id; 17 $pages[] = $bp->pages->register->id; 18 19 if ( !bp_is_active( 'forums' ) || ( function_exists( 'bp_forums_is_installed_correctly' ) && !bp_forums_is_installed_correctly() ) ) 20 $pages[] = $bp->pages->forums->id; 21 22 return apply_filters( 'bp_core_exclude_pages', $pages ); 23 } 24 add_filter( 'wp_list_pages_excludes', 'bp_core_exclude_pages' ); 2 25 3 26 /**
Note: See TracChangeset
for help on using the changeset viewer.