Yoast\WP\SEO\Bulk_Editor\Application\Updates

Post_Access_Checker_Interface{}interfaceYoast 1.0

Describes what the bulk updater needs to know about a post before updating it.

Хуков нет.

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

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

Методы

  1. public can_edit( int $post_id )
  2. public exists( int $post_id )
  3. public is_supported_type( int $post_id )

Код Post_Access_Checker_Interface{} Yoast 28.3

interface Post_Access_Checker_Interface {

	/**
	 * Whether the post exists.
	 *
	 * @param int $post_id The ID of the post.
	 *
	 * @return bool Whether the post exists.
	 */
	public function exists( int $post_id ): bool;

	/**
	 * Whether the post is of a type the bulk editor supports.
	 *
	 * @param int $post_id The ID of the post.
	 *
	 * @return bool Whether the post is of a supported type.
	 */
	public function is_supported_type( int $post_id ): bool;

	/**
	 * Whether the current user is allowed to edit the post.
	 *
	 * @param int $post_id The ID of the post.
	 *
	 * @return bool Whether the current user is allowed to edit the post.
	 */
	public function can_edit( int $post_id ): bool;
}