Changeset 4137
- Timestamp:
- 03/12/2011 09:25:51 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-cache.php
r3955 r4137 31 31 function bp_core_add_global_group() { 32 32 wp_cache_init(); 33 34 if ( function_exists( 'wp_cache_add_global_groups' ) ) 35 wp_cache_add_global_groups( array( 'bp' ) ); 33 wp_cache_add_global_groups( array( 'bp' ) ); 36 34 } 37 35 add_action( 'bp_loaded', 'bp_core_add_global_group' ); -
trunk/bp-core/bp-core-wpabstraction.php
r3947 r4137 71 71 } 72 72 73 /**74 * bp_core_is_main_site75 *76 * Checks if current blog is root blog of site. Deprecated in 1.3.77 *78 * @deprecated 1.379 * @deprecated Use is_multisite()80 * @package BuddyPress81 * @param int $blog_id optional blog id to test (default current blog)82 * @return bool True if not multisite or $blog_id is main site83 * @since 1.2.684 */85 function bp_core_is_main_site( $blog_id = '' ) {86 _deprecated_function( __FUNCTION__, '1.3', 'is_main_site()' );87 return is_main_site( $blog_id );88 }89 90 73 function bp_core_get_status_sql( $prefix = false ) { 91 74 if ( !is_multisite() ) … … 94 77 return "{$prefix}spam = 0 AND {$prefix}deleted = 0 AND {$prefix}user_status = 0"; 95 78 } 96 97 98 79 ?> -
trunk/bp-core/deprecated/1.3.php
r4053 r4137 30 30 _deprecated_function( __FUNCTION__, '1.3', 'is_multisite()' ); 31 31 return is_multisite(); 32 } 33 34 /** 35 * bp_core_is_main_site 36 * 37 * Checks if current blog is root blog of site. Deprecated in 1.3. 38 * 39 * @deprecated 1.3 40 * @deprecated Use is_main_site() 41 * @package BuddyPress 42 * @param int $blog_id optional blog id to test (default current blog) 43 * @return bool True if not multisite or $blog_id is main site 44 * @since 1.2.6 45 */ 46 function bp_core_is_main_site( $blog_id = '' ) { 47 _deprecated_function( __FUNCTION__, '1.3', 'is_main_site()' ); 48 return is_main_site( $blog_id ); 32 49 } 33 50 -
trunk/bp-forums/bp-forums-screens.php
r4088 r4137 18 18 19 19 // Check to see if the user has posted a new topic from the forums page. 20 if ( isset( $_POST['submit_topic'] ) && function_exists( 'bp_forums_new_topic' ) ) {20 if ( isset( $_POST['submit_topic'] ) && bp_is_active( 'forums' ) ) { 21 21 check_admin_referer( 'bp_forums_new_topic' ); 22 22 -
trunk/bp-friends/bp-friends-activity.php
r4041 r4137 34 34 global $bp; 35 35 36 if ( function_exists('bp_activity_delete_by_item_id') ) {36 if ( bp_is_active( 'activity' ) ) { 37 37 extract( (array)$args ); 38 38 bp_activity_delete_by_item_id( array( 'item_id' => $item_id, 'component' => $bp->friends->id, 'type' => $type, 'user_id' => $user_id, 'secondary_item_id' => $secondary_item_id ) ); -
trunk/bp-friends/bp-friends-template.php
r3841 r4137 134 134 <h5><?php echo bp_core_get_userlink( $user_ids['users'][$i]->user_id ) ?></h5> 135 135 136 <?php if ( function_exists( 'xprofile_get_random_profile_data' ) ) { ?>136 <?php if ( bp_is_active( 'xprofile' ) ) { ?> 137 137 138 138 <?php $random_data = xprofile_get_random_profile_data( $user_ids['users'][$i]->user_id, true ); ?> … … 149 149 <div class="action"> 150 150 151 <?php if ( function_exists( 'bp_add_friend_button' ) ) { ?>151 <?php if ( bp_is_active( 'friends' ) ) { ?> 152 152 153 153 <?php bp_add_friend_button( $user_ids['users'][$i]->user_id ) ?> -
trunk/bp-groups/bp-groups-actions.php
r3982 r4137 83 83 } else { 84 84 // Create the forum if enable_forum = 1 85 if ( function_exists( 'bp_forums_setup' ) && '' == groups_get_groupmeta( $bp->groups->new_group_id, 'forum_id' ) ) {85 if ( bp_is_active( 'forums' ) && '' == groups_get_groupmeta( $bp->groups->new_group_id, 'forum_id' ) ) { 86 86 groups_new_group_forum(); 87 87 } -
trunk/bp-groups/bp-groups-forums.php
r3903 r4137 26 26 $group = new BP_Groups_Group( $group_id ); 27 27 28 if ( empty( $group->enable_forum ) || ! function_exists( 'bp_forums_setup' ) )28 if ( empty( $group->enable_forum ) || !bp_is_active( 'forums' ) ) 29 29 return false; 30 30 … … 120 120 if ( $topic = bp_forums_update_topic( array( 'topic_title' => $topic_title, 'topic_text' => $topic_text, 'topic_id' => $topic_id ) ) ) { 121 121 // Update the activity stream item 122 if ( function_exists( 'bp_activity_delete_by_item_id' ) )122 if ( bp_is_active( 'activity' ) ) 123 123 bp_activity_delete_by_item_id( array( 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $topic_id, 'component' => $bp->groups->id, 'type' => 'new_forum_topic' ) ); 124 124 … … 164 164 165 165 // Fetch an existing entry and update if one exists. 166 if ( function_exists( 'bp_activity_get_activity_id' ) )166 if ( bp_is_active( 'activity' ) ) 167 167 $id = bp_activity_get_activity_id( array( 'user_id' => $post->poster_id, 'component' => $bp->groups->id, 'type' => 'new_forum_post', 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $post_id ) ); 168 168 … … 195 195 196 196 // Delete the activity stream item 197 if ( function_exists( 'bp_activity_delete' ) )197 if ( bp_is_active( 'activity' ) ) 198 198 bp_activity_delete( array( 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $topic_id, 'component' => $bp->groups->id, 'type' => 'new_forum_topic' ) ); 199 199 … … 213 213 214 214 // Delete the activity stream item 215 if ( function_exists( 'bp_activity_delete' ) )215 if ( bp_is_active( 'activity' ) ) 216 216 bp_activity_delete( array( 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $post_id, 'component' => $bp->groups->id, 'type' => 'new_forum_post' ) ); 217 217 -
trunk/bp-groups/bp-groups-functions.php
r3955 r4137 256 256 * joining/leaving the group in quick succession. 257 257 */ 258 if ( function_exists( 'bp_activity_delete' ) && gmmktime() <= strtotime( '+5 minutes', (int)strtotime( $membership->date_modified ) ) )258 if ( bp_is_active( 'activity' ) && gmmktime() <= strtotime( '+5 minutes', (int)strtotime( $membership->date_modified ) ) ) 259 259 bp_activity_delete( array( 'component' => $bp->groups->id, 'type' => 'joined_group', 'user_id' => $user_id, 'item_id' => $group_id ) ); 260 260 -
trunk/bp-groups/bp-groups-screens.php
r4124 r4137 312 312 } else { 313 313 // Posting a topic 314 if ( isset( $_POST['submit_topic'] ) && function_exists( 'bp_forums_new_topic') ) {314 if ( isset( $_POST['submit_topic'] ) && bp_is_active( 'forums' ) ) { 315 315 // Check the nonce 316 316 check_admin_referer( 'bp_forums_new_topic' ); -
trunk/bp-groups/bp-groups-template.php
r4063 r4137 702 702 return false; 703 703 704 if ( ! function_exists( 'bp_forums_get_forum_topicpost_count' ) )704 if ( !bp_is_active( 'forums' ) ) 705 705 return false; 706 706 … … 736 736 return false; 737 737 738 if ( ! function_exists( 'bp_forums_get_forum_topicpost_count' ) )738 if ( !bp_is_active( 'forums' ) ) 739 739 return false; 740 740 … … 760 760 $group =& $groups_template->group; 761 761 762 if ( function_exists( 'bp_forums_is_installed_correctly' ) ) {762 if ( bp_is_active( 'forums' ) ) { 763 763 if ( bp_forums_is_installed_correctly() ) { 764 764 if ( $group->enable_forum ) -
trunk/bp-members/bp-members-actions.php
r3917 r4137 72 72 73 73 // Hide this user's activity 74 if ( $is_spam && function_exists( 'bp_activity_hide_user_activity' ) )74 if ( $is_spam && bp_is_active( 'activity' ) ) 75 75 bp_activity_hide_user_activity( $bp->displayed_user->id ); 76 76 -
trunk/bp-members/bp-members-signup.php
r4094 r4137 61 61 62 62 // Now we've checked account details, we can check profile information 63 if ( function_exists( 'xprofile_check_is_required_field' ) ) {63 if ( bp_is_active( 'xprofile' ) ) { 64 64 65 65 // Make sure hidden field is passed and populated … … 396 396 397 397 // Set any profile data 398 if ( function_exists( 'xprofile_set_field_data' ) ) {398 if ( bp_is_active( 'xprofile' ) ) { 399 399 if ( !empty( $usermeta['profile_field_ids'] ) ) { 400 400 $profile_field_ids = explode( ',', $usermeta['profile_field_ids'] ); … … 455 455 456 456 // Set any profile data 457 if ( function_exists( 'xprofile_set_field_data' ) ) {457 if ( bp_is_active( 'xprofile' ) ) { 458 458 if ( !empty( $user['meta']['profile_field_ids'] ) ) { 459 459 $profile_field_ids = explode( ',', $user['meta']['profile_field_ids'] ); … … 486 486 } 487 487 488 // Support for WP < 3.1 489 if ( ! function_exists( 'wp_update_user' ) ) 490 require_once( ABSPATH . WPINC . '/registration.php' ); 488 require_once( ABSPATH . WPINC . '/registration.php' ); 491 489 492 490 // Update the display_name … … 534 532 535 533 // Add the user's fullname to Xprofile 536 if ( function_exists( 'xprofile_set_field_data' ) ) {534 if ( bp_is_active( 'xprofile' ) ) { 537 535 $firstname = get_user_meta( $user_id, 'first_name', true ); 538 536 $lastname = ' ' . get_user_meta( $user_id, 'last_name', true ); -
trunk/bp-members/bp-members-template.php
r4107 r4137 561 561 global $members_template; 562 562 563 if ( function_exists( 'xprofile_get_random_profile_data' ) ) { ?>563 if ( bp_is_active( 'xprofile' ) ) { ?> 564 564 <?php $random_data = xprofile_get_random_profile_data( $members_template->member->id, true ); ?> 565 565 <strong><?php echo wp_filter_kses( $random_data[0]->name ) ?></strong> … … 648 648 649 649 // Always add a log out list item to the end of the navigation 650 if ( function_exists( 'wp_logout_url' ) ) 651 $logout_link = '<li><a id="wp-logout" href="' . wp_logout_url( bp_get_root_domain() ) . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>'; 652 else 653 $logout_link = '<li><a id="wp-logout" href="' . site_url() . '/wp-login.php?action=logout&redirect_to=' . bp_get_root_domain() . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>'; 650 $logout_link = '<li><a id="wp-logout" href="' . wp_logout_url( bp_get_root_domain() ) . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>'; 654 651 655 652 echo apply_filters( 'bp_logout_nav_link', $logout_link );
Note: See TracChangeset
for help on using the changeset viewer.