get_last_updated()
get_last_updated( mixed $deprecated = ”, int $start, in…
get_last_updated( mixed $deprecated = ”,  int $start,  int $quantity = 40 )
获取最近更新的博客列表。
Get a list of most recently updated blogs.
获取最近更新的博客列表。
Get a list of most recently updated blogs.
目录锚点:#参数#返回#源码
参数(Parameters)
| 参数 | 类型 | 必填 | 说明 | 
|---|---|---|---|
| $deprecated | (mixed) | 可选 | 不使用。 | 
| $start | (int) | 可选 | 要偏移查询的博客数。用于生成限制子句。可用于分页。默认值0。 | 
| $quantity | (int) | 可选 | 要检索的最大博客数。 | 
返回(Return)
(array)博客列表。
源码(Source)
/**
 * 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 );
}| 更新版本 | 源码位置 | 使用 | 被使用 | 
|---|---|---|---|
| MU (3.0.0) | wp-includes/ms-blogs.php:759 | 0 | 4 | 
类别:WordPress 函数手册、 
		本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。







还没有任何评论,赶紧来占个楼吧!