Yoast\WP\SEO\Bulk_Editor\Infrastructure\Updates
Meta_Writer::write_description
Writes the description for a post.
Метод класса: Meta_Writer{}
Хуков нет.
Возвращает
void. Ничего (null).
Использование
$Meta_Writer = new Meta_Writer(); $Meta_Writer->write_description( $type, $post_id, $description ): void;
- $type(Update_Type) (обязательный)
- The appearance the description belongs to.
- $post_id(int) (обязательный)
- The ID of the post.
- $description(строка) (обязательный)
- The description to write.
Код Meta_Writer::write_description() Meta Writer::write description Yoast 28.9
public function write_description( Update_Type $type, int $post_id, string $description ): void {
$key = $type->is_social() ? 'opengraph-description' : 'metadesc';
$this->write( $key, $post_id, $description );
}