WPSEO_Sitemaps::__construct()publicYoast 1.0

Class constructor.

Метод класса: WPSEO_Sitemaps{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WPSEO_Sitemaps = new WPSEO_Sitemaps();
$WPSEO_Sitemaps->__construct();

Код WPSEO_Sitemaps::__construct() Yoast 22.4

public function __construct() {

	add_action( 'after_setup_theme', [ $this, 'init_sitemaps_providers' ] );
	add_action( 'after_setup_theme', [ $this, 'reduce_query_load' ], 99 );
	add_action( 'pre_get_posts', [ $this, 'redirect' ], 1 );
	add_action( 'wpseo_hit_sitemap_index', [ $this, 'hit_sitemap_index' ] );

	$this->router   = new WPSEO_Sitemaps_Router();
	$this->renderer = new WPSEO_Sitemaps_Renderer();
	$this->cache    = new WPSEO_Sitemaps_Cache();

	if ( ! empty( $_SERVER['SERVER_PROTOCOL'] ) ) {
		$this->http_protocol = sanitize_text_field( wp_unslash( $_SERVER['SERVER_PROTOCOL'] ) );
	}
}