WPSEO_Author_Sitemap_Provider::handles_type()publicYoast 1.0

Check if provider supports given item type.

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

Хуков нет.

Возвращает

true|false.

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

$WPSEO_Author_Sitemap_Provider = new WPSEO_Author_Sitemap_Provider();
$WPSEO_Author_Sitemap_Provider->handles_type( $type );
$type(строка) (обязательный)
Type string to check for.

Код WPSEO_Author_Sitemap_Provider::handles_type() Yoast 22.4

public function handles_type( $type ) {
	// If the author archives have been disabled, we don't do anything.
	if ( WPSEO_Options::get( 'disable-author', false ) || WPSEO_Options::get( 'noindex-author-wpseo', false ) ) {
		return false;
	}

	return $type === 'author';
}