Uses
| Uses | Description | 
|---|---|
| wp-includes/post.php: get_post() | Retrieves post data given a post ID or post object. | 
Retrieve the ID of the current item in the WordPress Loop.
(int|false) The ID of the current item in the WordPress Loop. False if $post is not set.
File: wp-includes/post-template.php
function get_the_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
	$post = get_post();
	return ! empty( $post ) ? $post->ID : false;
}  | Version | Description | 
|---|---|
| 2.1.0 | Introduced. | 
    © 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
    https://developer.wordpress.org/reference/functions/get_the_id