WPSEO_Sitemaps::__construct() public Yoast 1.0
Class constructor.
{} Это метод класса: WPSEO_Sitemaps{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$WPSEO_Sitemaps = new WPSEO_Sitemaps(); $WPSEO_Sitemaps->__construct();
Код WPSEO_Sitemaps::__construct() WPSEO Sitemaps:: construct Yoast 15.9.1
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' ] );
add_action( 'wpseo_ping_search_engines', [ __CLASS__, 'ping_search_engines' ] );
$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'] ) );
}
}