Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/25/2011 08:58:56 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Rename new 'bp-users' component to 'bp-members' for consistency through-out project.
Core, Messages, and Friends Components now use the BP_Component class.
Split Friends and Messages components into smaller files.
Change references to 'profile' to 'xprofile' through-out project for consistency.
Introduce 'bp_actions' and 'bp_screens' standard hooks to replace the usage of 'wp' through-out project.
Move component loader sequence into bp-core-bootstrap.php,
Move old root_component action into 1.3 deprecated file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs/bp-blogs-screens.php

    r3763 r3917  
    88
    99function bp_blogs_screen_my_blogs() {
    10     global $bp;
    11 
    1210    if ( !is_multisite() )
    1311        return false;
     
    1917
    2018function bp_blogs_screen_create_a_blog() {
    21     global $bp;
    22 
    23     if ( !is_multisite() || $bp->current_component != $bp->blogs->slug || 'create' != $bp->current_action )
     19    if ( !is_multisite() ||  !bp_is_blogs_component() || !bp_is_current_action( 'create' ) )
    2420        return false;
    2521
     
    3127    bp_core_load_template( apply_filters( 'bp_blogs_template_create_a_blog', 'blogs/create' ) );
    3228}
    33 add_action( 'wp', 'bp_blogs_screen_create_a_blog', 3 );
     29add_action( 'bp_screens', 'bp_blogs_screen_create_a_blog', 3 );
    3430
    3531function bp_blogs_screen_index() {
    3632    global $bp;
    3733
    38     if ( is_multisite() && $bp->current_component == $bp->blogs->slug && empty( $bp->current_action ) ) {
     34    if ( is_multisite() && bp_is_blogs_component() && !bp_current_action() ) {
    3935        $bp->is_directory = true;
    4036
     
    4440    }
    4541}
    46 add_action( 'wp', 'bp_blogs_screen_index', 2 );
     42add_action( 'bp_screens', 'bp_blogs_screen_index', 2 );
    4743
    4844?>
Note: See TracChangeset for help on using the changeset viewer.