Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/22/2010 11:34:23 AM (15 years ago)
Author:
apeatling
Message:

Added new install/upgrade wizard. Removed root components and replaced them with actual WordPress pages. Testing on WordPress vhost/novhost and root profile support still to do.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-filters.php

    r2842 r2863  
    11<?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 */
     12function 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}
     24add_filter( 'wp_list_pages_excludes', 'bp_core_exclude_pages' );
    225
    326/**
Note: See TracChangeset for help on using the changeset viewer.