Yoast\WP\SEO\Bulk_Editor\Infrastructure\Posts
Post_Meta_Posts_Collector::get_meta
Reads a raw Yoast post meta value.
Reads the raw meta directly so the stored value round-trips with the bulk update endpoint, regardless of which social options are enabled.
Метод класса: Post_Meta_Posts_Collector{}
Хуков нет.
Возвращает
string. The meta value.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_meta( $post_id, $key ): string;
- $post_id(int) (обязательный)
- The post ID.
- $key(строка) (обязательный)
- The meta key, without the Yoast prefix.
Код Post_Meta_Posts_Collector::get_meta() Post Meta Posts Collector::get meta Yoast 28.9
private function get_meta( int $post_id, string $key ): string {
return (string) \get_post_meta( $post_id, self::META_PREFIX . $key, true );
}