Skip to:
Content

BuddyPress.org

Changeset 4041


Ignore:
Timestamp:
02/12/2011 08:50:26 PM (14 years ago)
Author:
djpaul
Message:

Swap some more function_exists calls to bp_is_active. See #2718

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-template.php

    r3985 r4041  
    293293            switch ( $scope ) {
    294294                case 'friends':
    295                     if ( function_exists( 'friends_get_friend_user_ids' ) )
     295                    if ( bp_is_active( 'friends' ) )
    296296                        $friends = friends_get_friend_user_ids( $user_id );
    297297                        if ( empty( $friends ) )
     
    301301                    break;
    302302                case 'groups':
    303                     if ( function_exists( 'groups_get_user_groups' ) ) {
     303                    if ( bp_is_active( 'groups' ) ) {
    304304                        $groups = groups_get_user_groups( $user_id );
    305305                        if ( empty( $groups['groups'] ) )
  • trunk/bp-blogs/bp-blogs-activity.php

    r3761 r4041  
    99    global $bp;
    1010
    11     if ( !function_exists( 'bp_activity_set_action' ) )
     11    if ( !bp_is_active( 'activity' ) )
    1212        return false;
    1313
     
    2323    global $bp;
    2424
    25     if ( !function_exists( 'bp_activity_add' ) )
     25    if ( !bp_is_active( 'activity' ) )
    2626        return false;
    2727
     
    3131     * component globals.
    3232     */
    33     if ( !$bp->activity && function_exists('bp_activity_setup_globals') )
     33    if ( !$bp->activity && bp_is_active( 'activity' ) )
    3434        bp_activity_setup_globals();
    3535
     
    5151
    5252    // Remove large images and replace them with just one image thumbnail
    53     if ( function_exists( 'bp_activity_thumbnail_content_images' ) && !empty( $content ) )
     53    if ( bp_is_active( 'activity' ) && !empty( $content ) )
    5454        $content = bp_activity_thumbnail_content_images( $content, $primary_link );
    5555
     
    7575    global $bp;
    7676
    77     if ( function_exists( 'bp_activity_delete_by_item_id' ) ) {
     77    if ( bp_is_active( 'activity' ) ) {
    7878        $defaults = array(
    7979            'item_id'           => false,
  • trunk/bp-blogs/bp-blogs-loader.php

    r3938 r4041  
    125125        if ( bp_is_blogs_component() ) {
    126126            if ( bp_is_my_profile() ) {
    127                 if ( function_exists('xprofile_setup_nav') ) {
     127                if ( bp_is_active( 'xprofile' ) ) {
    128128                    $bp->bp_options_title = __( 'My Blogs', 'buddypress' );
    129129                }
  • trunk/bp-core/admin/bp-core-admin.php

    r4031 r4041  
    160160                    </tr>
    161161
    162                     <?php if ( function_exists( 'bp_forums_setup') ) : ?>
     162                    <?php if ( bp_is_active( 'forums' ) ) : ?>
    163163
    164164                        <tr>
  • trunk/bp-core/admin/bp-core-update.php

    r4034 r4041  
    6969                $steps[] = __( 'Database Update', 'buddypress' );
    7070
    71             if ( $this->database_version < 1225 || ( function_exists( 'bp_core_get_page_meta' ) && !bp_core_get_page_meta() ) )
     71            if ( $this->database_version < 1225 || !bp_core_get_page_meta() )
    7272                $steps[] = __( 'Pages', 'buddypress' );
    7373
  • trunk/bp-core/bp-core-filters.php

    r3982 r4041  
    1919        $pages[] = $bp->pages->register->id;
    2020
    21     if ( !bp_is_active( 'forums' ) || ( function_exists( 'bp_forums_is_installed_correctly' ) && !bp_forums_is_installed_correctly() ) )
     21    if ( !bp_is_active( 'forums' ) || ( bp_is_active( 'forums' ) && !bp_forums_is_installed_correctly() ) )
    2222        if ( !empty( $bp->pages->forums ) )
    2323            $pages[] = $bp->pages->forums->id;
  • trunk/bp-friends/bp-friends-activity.php

    r3917 r4041  
    99    global $bp;
    1010
    11     if ( !function_exists( 'bp_activity_add' ) )
     11    if ( !bp_is_active( 'activity' ) )
    1212        return false;
    1313
     
    4343    global $bp;
    4444
    45     if ( !function_exists( 'bp_activity_set_action' ) )
     45    if ( !bp_is_active( 'activity' ) )
    4646        return false;
    4747
  • trunk/bp-groups/bp-groups-activity.php

    r3933 r4041  
    1414    global $bp;
    1515
    16     if ( !function_exists( 'bp_activity_set_action' ) )
     16    if ( !bp_is_active( 'activity' ) )
    1717        return false;
    1818
     
    2929    global $bp;
    3030
    31     if ( !function_exists( 'bp_activity_add' ) )
     31    if ( !bp_is_active( 'activity' ) )
    3232        return false;
    3333
  • trunk/bp-members/bp-members-signup.php

    r3982 r4041  
    496496
    497497function bp_members_new_user_activity( $user ) {
    498     if ( empty( $user ) || !function_exists( 'bp_activity_add' ) )
     498    if ( empty( $user ) || !bp_is_active( 'activity' ) )
    499499        return false;
    500500
  • trunk/bp-xprofile/bp-xprofile-classes.php

    r4032 r4041  
    689689            </div>
    690690
    691             <?php if ( function_exists( 'wp_nonce_field' ) ) wp_nonce_field( 'xprofile_delete_option' ); ?>
     691            <?php wp_nonce_field( 'xprofile_delete_option' ); ?>
    692692
    693693        </form>
Note: See TracChangeset for help on using the changeset viewer.