disable creation of revisions during Import

This commit is contained in:
Leo Germani 2018-08-25 20:09:39 -03:00
parent ad863076d8
commit e3ddc61805
1 changed files with 1 additions and 0 deletions

View File

@ -763,6 +763,7 @@ abstract class Importer {
*/ */
public function insert( $processed_item, $collection_index ) { public function insert( $processed_item, $collection_index ) {
remove_action( 'post_updated', 'wp_save_post_revision' );
$collections = $this->get_collections(); $collections = $this->get_collections();
$collection_definition = isset($collections[$collection_index]) ? $collections[$collection_index] : false; $collection_definition = isset($collections[$collection_index]) ? $collections[$collection_index] : false;
if ( !$collection_definition || !is_array($collection_definition) || !isset($collection_definition['id']) || !isset($collection_definition['mapping']) ) { if ( !$collection_definition || !is_array($collection_definition) || !isset($collection_definition['id']) || !isset($collection_definition['mapping']) ) {