Changeset 12304
- Timestamp:
- 12/03/2018 08:53:09 PM (6 years ago)
- Location:
- branches/4.0
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.0
-
branches/4.0/src/bp-blogs/bp-blogs-functions.php
r12180 r12304 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 } -
branches/4.0/src/bp-core/bp-core-functions.php
r12286 r12304 3901 3901 return preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $string ); 3902 3902 } 3903 3904 /** 3905 * Checks whether the current installation is "large". 3906 * 3907 * By default, an installation counts as "large" if there are 10000 users or more. 3908 * Filter 'bp_is_large_install' to adjust. 3909 * 3910 * @since 4.1.0 3911 * 3912 * @return bool 3913 */ 3914 function bp_is_large_install() { 3915 // Use the Multisite function if available. 3916 if ( function_exists( 'wp_is_large_network' ) ) { 3917 $is_large = wp_is_large_network( 'users' ); 3918 } else { 3919 $is_large = bp_core_get_total_member_count() > 10000; 3920 } 3921 3922 /** 3923 * Filters whether the current installation is "large". 3924 * 3925 * @since 4.1.0 3926 * 3927 * @param bool $is_large True if the network is "large". 3928 */ 3929 return (bool) apply_filters( 'bp_is_large_install', $is_large ); 3930 } -
branches/4.0/src/bp-friends/bp-friends-functions.php
r12186 r12304 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 } -
branches/4.0/src/bp-groups/bp-groups-admin.php
r12241 r12304 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' ); … … 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 }
Note: See TracChangeset
for help on using the changeset viewer.