获取最近更新的博客列表。

原型

get_last_updated( mixed $deprecated = '', int $start, int $quantity = 40 )

参数

$deprecated (mixed) (Optional) 不曾用过

$start (int) (Required) 偏移量

$quantity (int) (Optional) 要检索的最大博客数。默认值为40。

返回值

(array)  博客列表

源文件

路径:wp-includes/ms-blogs.php

<?php
...
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 );
}
...
?>

其他

英文文档:https://developer.wordpress.org/reference/functions/get_last_updated/