Yoast\WP\SEO\Routes
Indexables_Page_Route::restore_all_indexables()
Устарела с версии 20.4. Больше не поддерживается и может быть удалена. Рекомендуется заменить эту функцию на аналог.
Restores all indexables from all ignore lists.
Метод класса: Indexables_Page_Route{}
Хуков нет.
Возвращает
WP_REST_Response|WP_Error
. The success or failure response.
Использование
$Indexables_Page_Route = new Indexables_Page_Route(); $Indexables_Page_Route->restore_all_indexables();
Список изменений
Устарела с | 20.4 |
Код Indexables_Page_Route::restore_all_indexables() Indexables Page Route::restore all indexables Yoast 22.4
public function restore_all_indexables() { \_deprecated_function( __METHOD__, 'Yoast SEO 20.4' ); $list_names = $this->indexables_page_helper->get_ignore_list_names(); $success = true; foreach ( $list_names as $list_name ) { $result = $this->indexables_page_action->remove_all_indexables_from_ignore_list( $list_name ); if ( $result === false ) { $success = false; } } if ( $success === true ) { return new WP_REST_Response( [ 'json' => (object) [ 'success' => true ], ], 200 ); } return new WP_Error( 'restore_all_failed', 'Could not save the option in the database', [ 'status' => 500, ] ); }