get_the_ID()
最后更新于:2021-11-27 02:09:40
get_the_ID()Retrieve the ID of the current item in the GeChiUI Loop.
响应
(int|false) The ID of the current item in the GeChiUI Loop. False if $post is not set.
源文件
文件: gc-includes/post-template.php
function get_the_ID() { // phpcs:ignore GeChiUI.NamingConventions.ValidFunctionName.FunctionNameInvalid
$post = get_post();
return ! empty( $post ) ? $post->ID : false;
}