WPSEO_Import_RankMath::cleanup()protectedYoast 1.0

Removes the plugin data from the database.

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

Хуков нет.

Возвращает

true|false. Cleanup status.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->cleanup();

Код WPSEO_Import_RankMath::cleanup() Yoast 22.3

protected function cleanup() {
	$return = parent::cleanup();
	if ( $return ) {
		global $wpdb;
		$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'rank-math-%'" );
		$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '%rank_math%'" );
	}

	return $return;
}