Skip to:
Content

BuddyPress.org

Changeset 4651


Ignore:
Timestamp:
07/12/2011 03:14:14 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Audit the usage of $bp->blogs->slug and $bp->blogs->root_slug. See #3325.

Location:
trunk
Files:
5 edited

Legend:

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

    r4466 r4651  
    1919    if ( is_array( $blogs['blogs'] ) && (int)$blogs['count'] ) {
    2020
    21         echo '<li id="bp-adminbar-blogs-menu"><a href="' . trailingslashit( $bp->loggedin_user->domain . $bp->blogs->slug ) . '">';
     21        echo '<li id="bp-adminbar-blogs-menu"><a href="' . trailingslashit( $bp->loggedin_user->domain . bp_get_blogs_slug() ) . '">';
    2222
    2323        _e( 'My Sites', 'buddypress' );
     
    4949        if ( bp_blog_signup_enabled() ) {
    5050            echo '<li' . $alt . '>';
    51             echo '<a href="' . bp_get_root_domain() . '/' . $bp->blogs->root_slug . '/create/">' . __( 'Create a Site!', 'buddypress' ) . '</a>';
     51            echo '<a href="' . bp_get_root_domain() . '/' . bp_get_blogs_root_slug() . '/create/">' . __( 'Create a Site!', 'buddypress' ) . '</a>';
    5252            echo '</li>';
    5353        }
  • trunk/bp-blogs/bp-blogs-functions.php

    r4602 r4651  
    371371
    372372    // Delete activity stream item
    373     bp_blogs_delete_activity( array( 'item_id' => $blog_id, 'secondary_item_id' => $post_id, 'component' => $bp->blogs->slug, 'type' => 'new_blog_post' ) );
     373    bp_blogs_delete_activity( array( 'item_id' => $blog_id, 'secondary_item_id' => $post_id, 'component' => $bp->blogs->id, 'type' => 'new_blog_post' ) );
    374374
    375375    do_action( 'bp_blogs_remove_post', $blog_id, $post_id, $user_id );
     
    419419
    420420    // Delete activity stream item
    421     bp_blogs_delete_activity( array( 'item_id' => $blog_id, 'component' => $bp->blogs->slug, 'type' => false ) );
     421    bp_blogs_delete_activity( array( 'item_id' => $blog_id, 'component' => $bp->blogs->id, 'type' => false ) );
    422422
    423423    do_action( 'bp_blogs_remove_data_for_blog', $blog_id );
  • trunk/bp-blogs/bp-blogs-template.php

    r4559 r4651  
    536536
    537537    if ( bp_is_my_profile() )
    538         echo apply_filters( 'bp_create_blog_link', '<a href="' . bp_get_root_domain() . '/' . $bp->blogs->root_slug . '/create/">' . __( 'Create a Site', 'buddypress' ) . '</a>' );
     538        echo apply_filters( 'bp_create_blog_link', '<a href="' . bp_get_root_domain() . '/' . bp_get_blogs_root_slug() . '/create/">' . __( 'Create a Site', 'buddypress' ) . '</a>' );
    539539}
    540540
     
    546546        return false;
    547547
    548     $current_tab = $bp->current_action; ?>
     548    ?>
    549549
    550550    <ul class="content-header-nav">
    551         <li<?php if ( 'my-blogs' == $current_tab || empty( $current_tab ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . $bp->blogs->slug . '/my-blogs' ); ?>"><?php printf( __( "%s's Sites", 'buddypress' ), $bp->displayed_user->fullname ); ?></a></li>
    552         <li<?php if ( 'recent-posts' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . $bp->blogs->slug . '/recent-posts' ); ?>"><?php printf( __( "%s's Recent Posts", 'buddypress' ), $bp->displayed_user->fullname ); ?></a></li>
    553         <li<?php if ( 'recent-comments' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . $bp->blogs->slug . '/recent-comments' );?>"><?php printf( __( "%s's Recent Comments", 'buddypress' ), $bp->displayed_user->fullname ); ?></a></li>
     551        <li<?php if ( bp_is_current_action( 'my-blogs'        ) || !bp_current_action() ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_blogs_slug() . '/my-blogs'        ); ?>"><?php printf( __( "%s's Sites", 'buddypress' ),           bp_get_displayed_user_fullname() ); ?></a></li>
     552        <li<?php if ( bp_is_current_action( 'recent-posts'    )                         ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_blogs_slug() . '/recent-posts'    ); ?>"><?php printf( __( "%s's Recent Posts", 'buddypress' ),    bp_get_displayed_user_fullname() ); ?></a></li>
     553        <li<?php if ( bp_is_current_action( 'recent-comments' )                         ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_blogs_slug() . '/recent-comments' ); ?>"><?php printf( __( "%s's Recent Comments", 'buddypress' ), bp_get_displayed_user_fullname() ); ?></a></li>
    554554    </ul>
    555555
  • trunk/bp-core/bp-core-buddybar.php

    r4650 r4651  
    488488            <?php if ( is_multisite() && bp_is_active( 'blogs' ) ) : ?>
    489489
    490                 <li><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . $bp->blogs->root_slug ) . '?random-blog' ?>"  rel="nofollow"><?php _e( 'Random Site', 'buddypress' ) ?></a></li>
     490                <li><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_blogs_root_slug() ) . '?random-blog' ?>"  rel="nofollow"><?php _e( 'Random Site', 'buddypress' ) ?></a></li>
    491491
    492492            <?php endif; ?>
  • trunk/bp-core/bp-core-functions.php

    r4650 r4651  
    828828
    829829            case 'blogs':
    830                 $slug = bp_is_active( 'blogs' )  ? $bp->blogs->root_slug  : '';
     830                $slug = bp_is_active( 'blogs' )  ? bp_get_blogs_root_slug()  : '';
    831831                break;
    832832
Note: See TracChangeset for help on using the changeset viewer.