Yoast\WP\SEO\Bulk_Editor\Domain\Updates
Post_Update_Collection{}
This class describes a collection of post updates.
Хуков нет.
Использование
$Post_Update_Collection = new Post_Update_Collection(); // use class methods
Методы
- public add( Post_Update $update )
- public get()
Код Post_Update_Collection{} Post Update Collection{} Yoast 28.3
class Post_Update_Collection {
/**
* The post updates.
*
* @var array<Post_Update>
*/
private $updates = [];
/**
* Adds a post update to the collection.
*
* @param Post_Update $update The post update to add.
*
* @return void
*/
public function add( Post_Update $update ): void {
$this->updates[] = $update;
}
/**
* Returns the post updates in the collection.
*
* @return array<Post_Update> The post updates in the collection.
*/
public function get(): array {
return $this->updates;
}
}