Yoast\WP\SEO\Bulk_Editor\Application\Updates
Bulk_Updater::update
Applies the given post updates. Updates are applied independently: one failing update does not block the others.
Метод класса: Bulk_Updater{}
Хуков нет.
Возвращает
Update_Result_Collection. The result per post update.
Использование
$Bulk_Updater = new Bulk_Updater(); $Bulk_Updater->update( $type, $updates ): Update_Result_Collection;
- $type(Update_Type) (обязательный)
- The appearance the updates target.
- $updates(Post_Update_Collection) (обязательный)
- The post updates to apply.
Код Bulk_Updater::update() Bulk Updater::update Yoast 28.9
public function update( Update_Type $type, Post_Update_Collection $updates ): Update_Result_Collection {
$results = new Update_Result_Collection();
foreach ( $updates->get() as $update ) {
$results->add( $this->apply( $type, $update ) );
}
return $results;
}