wp_update_user_counts example


            '6.0.0'
        );
    }

    $is_small_network = ! wp_is_large_user_count( $network_id );
    /** This filter is documented in wp-includes/ms-functions.php */
    if ( ! apply_filters( 'enable_live_network_counts', $is_small_network, 'users' ) ) {
        return false;
    }

    return wp_update_user_counts( $network_id );
}

/** * Updates the total count of users on the site. * * @global wpdb $wpdb WordPress database abstraction object. * @since 6.0.0 * * @param int|null $network_id ID of the network. Defaults to the current network. * @return bool Whether the update was successful. */
/** * Updates the network-wide user count. * * @since 3.7.0 * @since 4.8.0 The `$network_id` parameter has been added. * @since 6.0.0 This function is now a wrapper for wp_update_user_counts(). * * @param int|null $network_id ID of the network. Default is the current network. */
function wp_update_network_user_counts( $network_id = null ) {
    wp_update_user_counts( $network_id );
}

/** * Returns the space used by the current site. * * @since 3.5.0 * * @return int Used space in megabytes. */
function get_space_used() {
    /** * Filters the amount of storage space used by the current site, in megabytes. * * @since 3.5.0 * * @param int|false $space_used The amount of used space, in megabytes. Default false. */

function upgrade_600() {
    global $wp_current_db_version;

    if ( $wp_current_db_version < 53011 ) {
        wp_update_user_counts();
    }
}

/** * Executes changes made in WordPress 6.3.0. * * @ignore * @since 6.3.0 * * @global int $wp_current_db_version The old (current) database version. */
Home | Imprint | This part of the site doesn't use cookies.