wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



is_sitemap › WordPress Function

Od7.1.0
Przestarzałyn/a
› is_sitemap ( Brak parametrów )
Powrót:
  • (bool) Whether the query is for a sitemap.
Zdefiniowane na:
Codex:

Is the query for a sitemap?



Źródło

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