update_sitemeta_cache

The timeline below displays how wordpress function update_sitemeta_cache has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.5

/**
 * Updates metadata cache for list of site IDs.
 *
 * Performs SQL query to retrieve all metadata for the sites matching `$site_ids` and stores them in the cache.
 * Subsequent calls to `get_site_meta()` will not need to query the database.
 *
 * @since 5.1.0
 *
 * @param array $site_ids List of site IDs.
 * @return array|false An array of metadata on success, false if there is nothing to update.
 */
function update_sitemeta_cache($site_ids)
{
    // Ensure this filter is hooked in even if the function is called early.
    if (!has_filter('update_blog_metadata_cache', 'wp_check_site_meta_support_prefilter')) {
        add_filter('update_blog_metadata_cache', 'wp_check_site_meta_support_prefilter');
    }
    return update_meta_cache('blog', $site_ids);
}

WordPress Version: .10

/**
 * Updates metadata cache for list of site IDs.
 *
 * Performs SQL query to retrieve all metadata for the sites matching `$site_ids` and stores them in the cache.
 * Subsequent calls to `get_site_meta()` will not need to query the database.
 *
 * @since 5.1.0
 *
 * @param array $site_ids List of site IDs.
 * @return array|false Returns false if there is nothing to update. Returns an array of metadata on success.
 */
function update_sitemeta_cache($site_ids)
{
    // Ensure this filter is hooked in even if the function is called early.
    if (!has_filter('update_blog_metadata_cache', 'wp_check_site_meta_support_prefilter')) {
        add_filter('update_blog_metadata_cache', 'wp_check_site_meta_support_prefilter');
    }
    return update_meta_cache('blog', $site_ids);
}

WordPress Version: 5.1

/**
 * Updates metadata cache for list of site IDs.
 *
 * Performs SQL query to retrieve all metadata for the sites matching `$site_ids` and stores them in the cache.
 * Subsequent calls to `get_site_meta()` will not need to query the database.
 *
 * @since 5.1.0
 *
 * @param array $site_ids List of site IDs.
 * @return array|false Returns false if there is nothing to update. Returns an array of metadata on success.
 */
function update_sitemeta_cache($site_ids)
{
    return update_meta_cache('blog', $site_ids);
}