wpseek.com
A WordPress-centric search engine for devs and theme authors



get_last_updated › WordPress Function

Since
Deprecatedn/a
get_last_updated ( $deprecated = '', $start = 0, $quantity = 40 )
Parameters: (3)
  • (mixed) $deprecated Not used.
    Required: No
    Default: (empty)
  • (int) $start Optional. Number of blogs to offset the query. Used to build LIMIT clause. Can be used for pagination. Default 0.
    Required: No
    Default:
  • (int) $quantity Optional. The maximum number of blogs to retrieve. Default 40.
    Required: No
    Default: 40
Returns:
  • (array) The list of blogs.
Defined at:
Codex:
Change Log:
  • MU

Gets a list of most recently updated blogs.



Source

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 );
}