bp_core_exclude_pages( array $pages = array() )
Prevent specific pages (eg ‘Activate’) from showing on page listings.
Description
Parameters
- $pages
-
(Optional) List of excluded page IDs, as passed to the 'wp_list_pages_excludes' filter.
Default value: array()
Return
(array) The exclude list, with BP's pages added.
Source
File: bp-core/bp-core-filters.php
function bp_core_exclude_pages( $pages = array() ) { // Bail if not the root blog. if ( ! bp_is_root_blog() ) return $pages; $bp = buddypress(); if ( !empty( $bp->pages->activate ) ) $pages[] = $bp->pages->activate->id; if ( !empty( $bp->pages->register ) ) $pages[] = $bp->pages->register->id; /** * Filters specific pages that shouldn't show up on page listings. * * @since BuddyPress 1.5.0 * * @param array $pages Array of pages to exclude. */ return apply_filters( 'bp_core_exclude_pages', $pages ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.5.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.