wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_reset_postdata › WordPress Function

Since3.0.0
已弃用n/a
wp_reset_postdata ( 没有参数 )
定义在:
文档:

After looping through a separate query, this function restores the $post global to the current post in the main query.



源码

function wp_reset_postdata() {
	global $wp_query;

	if ( isset( $wp_query ) ) {
		$wp_query->reset_postdata();
	}
}