Yoast\WP\SEO\Abilities\Infrastructure\Global_Setting_Targets
Global_Setting_Target_Repository::get_all
Returns all targets whose global settings can be changed on the site, leaving out the ones that cannot, like a static homepage or the WooCommerce Shop page.
Метод класса: Global_Setting_Target_Repository{}
Хуков нет.
Возвращает
array<Global_Setting_Target_Interface>. The targets.
Использование
$Global_Setting_Target_Repository = new Global_Setting_Target_Repository(); $Global_Setting_Target_Repository->get_all(): array;
Код Global_Setting_Target_Repository::get_all() Global Setting Target Repository::get all Yoast 28.9
public function get_all(): array {
$targets = [];
foreach ( \array_merge( \array_values( $this->single_targets ), $this->post_type_archive_factory->create_all() ) as $target ) {
try {
$target->ensure_available();
} catch ( Unavailable_Global_Setting_Target_Exception $exception ) {
continue;
}
$targets[] = $target;
}
return $targets;
}