WPSEO_Plugin_Importer::cleanup()protectedYoast 1.0

Removes the plugin data from the database.

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

Хуков нет.

Возвращает

true|false. Cleanup status.

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

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

Код WPSEO_Plugin_Importer::cleanup() Yoast 22.4

protected function cleanup() {
	global $wpdb;
	if ( empty( $this->meta_key ) ) {
		return true;
	}
	$wpdb->query(
		$wpdb->prepare(
			"DELETE FROM {$wpdb->postmeta} WHERE meta_key LIKE %s",
			$this->meta_key
		)
	);
	$result = $wpdb->__get( 'result' );
	if ( ! $result ) {
		$this->cleanup_error_msg();
	}

	return $result;
}