WPSEO_Plugin_Importer::cleanup
Removes the plugin data from the database.
Метод класса: WPSEO_Plugin_Importer{}
Хуков нет.
Возвращает
true|false. Cleanup status.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->cleanup();
Код WPSEO_Plugin_Importer::cleanup() WPSEO Plugin Importer::cleanup Yoast 27.6
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;
}