Yoast\WP\SEO\Actions\Importing\Aioseo
Aioseo_Cleanup_Action::index()
Cleans up AIOSEO data.
Метод класса: Aioseo_Cleanup_Action{}
Хуков нет.
Возвращает
Indexable[]|false
. An array of created indexables or false if aioseo data was not found.
Использование
$Aioseo_Cleanup_Action = new Aioseo_Cleanup_Action(); $Aioseo_Cleanup_Action->index();
Код Aioseo_Cleanup_Action::index() Aioseo Cleanup Action::index Yoast 24.7
public function index() { if ( $this->get_completed() ) { return []; } // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared -- Reason: There is no unescaped user input. $meta_data = $this->wpdb->query( $this->cleanup_postmeta_query() ); $aioseo_table_truncate_done = $this->wpdb->query( $this->truncate_query() ); // phpcs:enable WordPress.DB.PreparedSQL.NotPrepared if ( $meta_data === false && $aioseo_table_truncate_done === false ) { return false; } $this->set_completed( true ); return [ 'metadata_cleanup' => $meta_data, 'indexables_cleanup' => $aioseo_table_truncate_done, ]; }