Aioseo_Cleanup_Action::truncate_query()publicYoast 1.0

Creates a TRUNCATE query string for emptying the AIOSEO indexable table, if it exists.

Метод класса: Aioseo_Cleanup_Action{}

Хуков нет.


Строку. The query to use for importing or counting the number of items to import.


$Aioseo_Cleanup_Action = new Aioseo_Cleanup_Action();

Код Aioseo_Cleanup_Action::truncate_query() Yoast 23.0

public function truncate_query() {
	if ( ! $this->aioseo_helper->aioseo_exists() ) {
		// If the table doesn't exist, we need a string that will amount to a quick query that doesn't return false when ran.
		return 'SELECT 1';

	$table = $this->aioseo_helper->get_table();

	return "TRUNCATE TABLE {$table}";