get_last_updated

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

WordPress Version: 6.2

/**
 * Gets a list of most recently updated blogs.
 *
 * @since MU (3.0.0)
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param mixed $deprecated Not used.
 * @param int   $start      Optional. Number of blogs to offset the query. Used to build LIMIT clause.
 *                          Can be used for pagination. Default 0.
 * @param int   $quantity   Optional. The maximum number of blogs to retrieve. Default 40.
 * @return array The list of blogs.
 */
function get_last_updated($deprecated = '', $start = 0, $quantity = 40)
{
    global $wpdb;
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, 'MU');
        // Never used.
    }
    return $wpdb->get_results($wpdb->prepare("SELECT blog_id, domain, path FROM {$wpdb->blogs} WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit %d, %d", get_current_network_id(), $start, $quantity), ARRAY_A);
}

WordPress Version: 5.4

/**
 * Get a list of most recently updated blogs.
 *
 * @since MU (3.0.0)
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param mixed $deprecated Not used.
 * @param int   $start      Optional. Number of blogs to offset the query. Used to build LIMIT clause.
 *                          Can be used for pagination. Default 0.
 * @param int   $quantity   Optional. The maximum number of blogs to retrieve. Default 40.
 * @return array The list of blogs.
 */
function get_last_updated($deprecated = '', $start = 0, $quantity = 40)
{
    global $wpdb;
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, 'MU');
        // Never used.
    }
    return $wpdb->get_results($wpdb->prepare("SELECT blog_id, domain, path FROM {$wpdb->blogs} WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit %d, %d", get_current_network_id(), $start, $quantity), ARRAY_A);
}

WordPress Version: 5.3

/**
 * Get a list of most recently updated blogs.
 *
 * @since MU (3.0.0)
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param mixed $deprecated Not used.
 * @param int   $start      Optional. Number of blogs to offset the query. Used to build LIMIT clause.
 *                          Can be used for pagination. Default 0.
 * @param int   $quantity   Optional. The maximum number of blogs to retrieve. Default 40.
 * @return array The list of blogs.
 */
function get_last_updated($deprecated = '', $start = 0, $quantity = 40)
{
    global $wpdb;
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, 'MU');
        // never used
    }
    return $wpdb->get_results($wpdb->prepare("SELECT blog_id, domain, path FROM {$wpdb->blogs} WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit %d, %d", get_current_network_id(), $start, $quantity), ARRAY_A);
}

WordPress Version: 5.1

/**
 * Get a list of most recently updated blogs.
 *
 * @since MU (3.0.0)
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param mixed $deprecated Not used
 * @param int   $start      The offset
 * @param int   $quantity   The maximum number of blogs to retrieve. Default is 40.
 * @return array The list of blogs
 */
function get_last_updated($deprecated = '', $start = 0, $quantity = 40)
{
    global $wpdb;
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, 'MU');
        // never used
    }
    return $wpdb->get_results($wpdb->prepare("SELECT blog_id, domain, path FROM {$wpdb->blogs} WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit %d, %d", get_current_network_id(), $start, $quantity), ARRAY_A);
}

WordPress Version: 4.9

/**
 * Get a list of most recently updated blogs.
 *
 * @since MU (3.0.0)
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param mixed $deprecated Not used
 * @param int   $start      The offset
 * @param int   $quantity   The maximum number of blogs to retrieve. Default is 40.
 * @return array The list of blogs
 */
function get_last_updated($deprecated = '', $start = 0, $quantity = 40)
{
    global $wpdb;
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, 'MU');
    }
    // never used
    return $wpdb->get_results($wpdb->prepare("SELECT blog_id, domain, path FROM {$wpdb->blogs} WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit %d, %d", get_current_network_id(), $start, $quantity), ARRAY_A);
}

WordPress Version: 4.4

/**
 * Get a list of most recently updated blogs.
 *
 * @since MU
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param mixed $deprecated Not used
 * @param int   $start      The offset
 * @param int   $quantity   The maximum number of blogs to retrieve. Default is 40.
 * @return array The list of blogs
 */
function get_last_updated($deprecated = '', $start = 0, $quantity = 40)
{
    global $wpdb;
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, 'MU');
    }
    // never used
    return $wpdb->get_results($wpdb->prepare("SELECT blog_id, domain, path FROM {$wpdb->blogs} WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit %d, %d", $wpdb->siteid, $start, $quantity), ARRAY_A);
}

WordPress Version: 4.3

/**
 * Get a list of most recently updated blogs.
 *
 * @since MU
 *
 * @global wpdb $wpdb
 *
 * @param mixed $deprecated Not used
 * @param int   $start      The offset
 * @param int   $quantity   The maximum number of blogs to retrieve. Default is 40.
 * @return array The list of blogs
 */
function get_last_updated($deprecated = '', $start = 0, $quantity = 40)
{
    global $wpdb;
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, 'MU');
    }
    // never used
    return $wpdb->get_results($wpdb->prepare("SELECT blog_id, domain, path FROM {$wpdb->blogs} WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit %d, %d", $wpdb->siteid, $start, $quantity), ARRAY_A);
}

WordPress Version: 3.7

/**
 * Get a list of most recently updated blogs.
 *
 * @since MU
 *
 * @param mixed $deprecated Not used
 * @param int $start The offset
 * @param int $quantity The maximum number of blogs to retrieve. Default is 40.
 * @return array The list of blogs
 */
function get_last_updated($deprecated = '', $start = 0, $quantity = 40)
{
    global $wpdb;
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, 'MU');
    }
    // never used
    return $wpdb->get_results($wpdb->prepare("SELECT blog_id, domain, path FROM {$wpdb->blogs} WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit %d, %d", $wpdb->siteid, $start, $quantity), ARRAY_A);
}