Ticket #8012: 8012.3.diff
File 8012.3.diff, 2.3 KB (added by , 7 years ago) |
---|
-
src/bp-blogs/bp-blogs-functions.php
129 129 $sql['select'] = $wpdb->prepare( "SELECT blog_id, last_updated FROM {$wpdb->base_prefix}blogs WHERE mature = 0 AND spam = 0 AND deleted = 0 AND site_id = %d", $r['site_id'] ); 130 130 131 131 // Omit root blog if large network 132 if ( wp_is_large_network( 'users') ) {132 if ( bp_is_large_install() ) { 133 133 $sql['omit_root_blog'] = $wpdb->prepare( "AND blog_id != %d", bp_get_root_blog_id() ); 134 134 } 135 135 -
src/bp-core/bp-core-functions.php
3900 3900 function bp_strip_script_and_style_tags( $string ) { 3901 3901 return preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $string ); 3902 3902 } 3903 3904 /** 3905 * Is this a large BuddyPress installation? 3906 * 3907 * @since 4.1.0 3908 * 3909 * @return bool True if more than 10000 users, false not 3910 */ 3911 function bp_is_large_install() { 3912 3913 // Multisite has a function specifically for this 3914 $retval = function_exists( 'wp_is_large_network' ) 3915 ? wp_is_large_network( 'users' ) 3916 : ( bp_core_get_total_member_count() > 10000 ); 3917 3918 // Filter & return 3919 return (bool) apply_filters( 'bp_is_large_install', $retval ); 3920 } -
src/bp-friends/bp-friends-functions.php
781 781 } 782 782 783 783 // Bail out if the site has a ton of users. 784 if ( is_multisite() && wp_is_large_network( 'users') ) {784 if ( bp_is_large_install() ) { 785 785 return; 786 786 } 787 787 -
src/bp-groups/bp-groups-admin.php
861 861 * @param BP_Groups_Group $item The BP_Groups_Group object for the current group. 862 862 */ 863 863 function bp_groups_admin_edit_metabox_add_new_members( $item ) { 864 if ( wp_is_large_network( 'users') ) {864 if ( bp_is_large_install() ) { 865 865 $class = ''; 866 866 $notice = __( 'Enter a comma-separated list of user logins.', 'buddypress' ); 867 867 } else { … … 1252 1252 function bp_groups_admin_autocomplete_handler() { 1253 1253 1254 1254 // Bail if user user shouldn't be here, or is a large network. 1255 if ( ! bp_current_user_can( 'bp_moderate' ) || ( is_multisite() && wp_is_large_network( 'users' )) ) {1255 if ( ! bp_current_user_can( 'bp_moderate' ) || bp_is_large_install() ) { 1256 1256 wp_die( -1 ); 1257 1257 } 1258 1258