wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



get_the_id › WordPress Function

Da2.1.0
Deprecaton/a
get_the_id ( Nessun parametro )
Ritorna:
  • (int|false) The ID of the current item in the WordPress Loop. False if $post is not set.
Definito a:
Codex:

Retrieves the ID of the current item in the WordPress Loop.



Sorgenti

function get_the_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
	$post = get_post();
	return ! empty( $post ) ? $post->ID : false;
}