get_queried_object_id函数简介
是对WP_Query::get_queried_object_id().的封装,可以理解为快捷函数。get_queried_object_id函数返回值
(int)返回被查询对象的ID值。get_queried_object_id函数源代码
get_queried_object_id源函数File: wp-includes/query.php
function get_queried_object_id() {
global $wp_query;
return $wp_query->get_queried_object_id();
}
WP_Query::get_queried_object_id()源代码
public function get_queried_object_id() {
$this->get_queried_object();
if ( isset( $this->queried_object_id ) ) {
return $this->queried_object_id;
}
return 0;
}
以上就是青锋建站给大家分享的wordpress函数get_queried_object_id的使用,青锋建站承接网站建设服务,包括织梦建站,phpcms建站,wordpress建站,CMS系统开发,SEO网站优化,网络营销推广,企业邮箱,400电话。
转载请注明来源网址:青锋建站-http://www.sjzphp.com/kaifazhe/wordpress/get_queried_object_id.html