wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



is_sitemap › WordPress Function

Seit7.1.0
Veraltetn/v
is_sitemap ( Keine Parameter )
Gibt zurück:
  • (bool) Whether the query is for a sitemap.
Definiert in:
Codex:

Is the query for a sitemap?



Quellcode

function is_sitemap(): bool {
	global $wp_query;

	if ( ! isset( $wp_query ) ) {
		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '7.1.0' );
		return false;
	}

	return $wp_query->is_sitemap();
}