wp()
wp( string|array $query_vars = ” ) 设置WordPress查询。 Set u…
wp( string|array $query_vars = ” )
设置WordPress查询。
Set up the WordPress query.
设置WordPress查询。
Set up the WordPress query.
目录锚点:#参数#源码
参数(Parameters)
| 参数 | 类型 | 说明 |
|---|---|---|
| $query_vars | (string | array) | 默认WP_查询参数。 |
源码(Source)
/**
* Set up the WordPress query.
*
* @since 2.0.0
*
* @global WP $wp_locale
* @global WP_Query $wp_query
* @global WP_Query $wp_the_query
*
* @param string|array $query_vars Default WP_Query arguments.
*/
function wp( $query_vars = '' ) {
global $wp, $wp_query, $wp_the_query;
$wp->main( $query_vars );
if ( !isset($wp_the_query) )
$wp_the_query = $wp_query;
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 2.0.0 | wp-includes/functions.php | 2 | 20 |
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。





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