WPSEO_Sitemaps::set_n()publicYoast 1.0

Set the sitemap current page to allow creating partial sitemaps with WP-CLI in a one-off process.

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

Хуков нет.

Возвращает

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

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

$WPSEO_Sitemaps = new WPSEO_Sitemaps();
$WPSEO_Sitemaps->set_n( $current_page );
$current_page(int) (обязательный)
The part that should be generated.

Код WPSEO_Sitemaps::set_n() Yoast 22.4

public function set_n( $current_page ) {
	if ( is_scalar( $current_page ) && intval( $current_page ) > 0 ) {
		$this->current_page = intval( $current_page );
	}
}