Yoast\WP\SEO\Bulk_Editor\Application\Updates

Meta_Writer_Interface{}interfaceYoast 1.0

Describes how the bulk updater persists a title, description and focus keyphrase for a post.

Хуков нет.

Использование

$Meta_Writer_Interface = new Meta_Writer_Interface();
// use class methods

Методы

  1. public write_description( Update_Type $type, int $post_id, string $description )
  2. public write_focus_keyphrase( int $post_id, string $focus_keyphrase )
  3. public write_title( Update_Type $type, int $post_id, string $title )

Код Meta_Writer_Interface{} Yoast 28.3

interface Meta_Writer_Interface {

	/**
	 * Writes the title for a post.
	 *
	 * @param Update_Type $type    The appearance the title belongs to.
	 * @param int         $post_id The ID of the post.
	 * @param string      $title   The title to write.
	 *
	 * @return void
	 */
	public function write_title( Update_Type $type, int $post_id, string $title ): void;

	/**
	 * Writes the description for a post.
	 *
	 * @param Update_Type $type        The appearance the description belongs to.
	 * @param int         $post_id     The ID of the post.
	 * @param string      $description The description to write.
	 *
	 * @return void
	 */
	public function write_description( Update_Type $type, int $post_id, string $description ): void;

	/**
	 * Writes the focus keyphrase for a post. The focus keyphrase is channel-agnostic,
	 * so it does not depend on the update type.
	 *
	 * @param int    $post_id         The ID of the post.
	 * @param string $focus_keyphrase The focus keyphrase to write.
	 *
	 * @return void
	 */
	public function write_focus_keyphrase( int $post_id, string $focus_keyphrase ): void;
}