wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



in_the_loop › WordPress Function

Depuis2.0.0
Dépréciéen/a
in_the_loop ( Pas de paramètres )
Retourne:
  • (bool) True if caller is within loop, false if loop hasn't started or ended.
Défini(e) dans:
Codex:

Determines whether the caller is in the Loop.

For more information on this and similar theme functions, check out the {@link Conditional Tags} article in the Theme Developer Handbook.


Source

function in_the_loop() {
	global $wp_query;

	if ( ! isset( $wp_query ) ) {
		return false;
	}

	return $wp_query->in_the_loop;
}