函数原型
get_queried_object_id(): int
函数描述
Retrieves the ID of the currently queried object.
是否弃用
未弃用
函数参数
无
函数返回值
int ID of the queried object.
函数位置
File: wp-includes/query.php.
函数源码
function get_queried_object_id() {
global $wp_query;
return $wp_query->get_queried_object_id();
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |

