Outil de recherche WordPress pour les développeurs et auteurs de thèmes



get_last_updated ›

Depuis3.0.0
Dépréciéen/a
get_last_updated ( $deprecated = '', $start = 0, $quantity = 40 )
Paramètres: (3)
  • (mixed) $deprecated Not used
    Requis: Non
    Défaut: (vide)
  • (int) $start The offset
    Requis: Non
    Défaut:
  • (int) $quantity The maximum number of blogs to retrieve. Default is 40.
    Requis: Non
    Défaut: 40
Retourne:
  • (array) The list of blogs
Défini(e) dans:
Codex:
Changelog:
  • MU

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