Yoast\WP\SEO\User_Meta\Application
Custom_Meta_Collector::get_sorted_custom_meta
Returns all the custom meta, sorted by rendering priority.
Метод класса: Custom_Meta_Collector{}
Хуков нет.
Возвращает
Массив. All the custom meta, sorted by rendering priority.
Использование
$Custom_Meta_Collector = new Custom_Meta_Collector(); $Custom_Meta_Collector->get_sorted_custom_meta(): array;
Код Custom_Meta_Collector::get_sorted_custom_meta() Custom Meta Collector::get sorted custom meta Yoast 28.1
public function get_sorted_custom_meta(): array {
$custom_meta = $this->get_custom_meta();
\usort(
$custom_meta,
static function ( Custom_Meta_Interface $a, Custom_Meta_Interface $b ) {
return ( $a->get_render_priority() <=> $b->get_render_priority() );
},
);
return $custom_meta;
}