Yoast\WP\SEO\Abilities\User_Interface\Abilities
Set_Xml_Sitemap_Status_Ability::is_available
Returns whether the ability is available.
A network admin can forbid the XML sitemap for the sites of a multisite network. When that is the case, the option validation silently forces the feature back off on save, so the ability is not offered instead of failing on every call. Outside of a multisite the network option does not exist and the feature is always allowed.
Метод класса: Set_Xml_Sitemap_Status_Ability{}
Хуков нет.
Возвращает
bool. Whether the ability is available.
Использование
$Set_Xml_Sitemap_Status_Ability = new Set_Xml_Sitemap_Status_Ability(); $Set_Xml_Sitemap_Status_Ability->is_available(): bool;
Код Set_Xml_Sitemap_Status_Ability::is_available() Set Xml Sitemap Status Ability::is available Yoast 28.8
public function is_available(): bool {
return (bool) $this->options_helper->get( 'allow_enable_xml_sitemap', true );
}