Yoast\WP\SEO\Bulk_Editor\Application\Updates
Meta_Writer_Interface::write_focus_keyphrase
Writes the focus keyphrase for a post. The focus keyphrase is channel-agnostic, so it does not depend on the update type.
Returns the sanitized value that was actually stored, so callers can detect when the input was silently altered (e.g. HTML stripped by sanitize_text_field).
Метод класса: Meta_Writer_Interface{}
Хуков нет.
Возвращает
string. The sanitized focus keyphrase that was persisted.
Использование
$Meta_Writer_Interface = new Meta_Writer_Interface(); $Meta_Writer_Interface->write_focus_keyphrase( $post_id, $focus_keyphrase ): string;
- $post_id(int) (обязательный)
- The ID of the post.
- $focus_keyphrase(строка) (обязательный)
- The focus keyphrase to write.
Код Meta_Writer_Interface::write_focus_keyphrase() Meta Writer Interface::write focus keyphrase Yoast 28.9
public function write_focus_keyphrase( int $post_id, string $focus_keyphrase ): string;