wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



is_sitemap › WordPress Function

Desde7.1.0
Obsoleton/a
› is_sitemap ( Sem parâmetros )
Retorna:
  • (bool) Whether the query is for a sitemap.
Definido em:
Codex:

Is the query for a sitemap?



Fonte

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();
}