Yoast\WP\SEO\Bulk_Editor\Application\Updates
Post_Access_Checker_Interface{}
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
Методы
- public can_edit( int $post_id )
- public exists( int $post_id )
- public is_supported_type( int $post_id )
Код Post_Access_Checker_Interface{} 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;
}