fix identations

This commit is contained in:
Rodrigo Guimarães 2021-02-04 23:42:07 -03:00
parent 20b5299254
commit 0fb53b61c4
1 changed files with 3 additions and 7 deletions

View File

@ -26,7 +26,7 @@ class Collections extends Repository {
* {@inheritDoc} * {@inheritDoc}
* @see \Tainacan\Repositories\Repository::get_map() * @see \Tainacan\Repositories\Repository::get_map()
*/ */
protected function _get_map() { protected function _get_map() {
return apply_filters( 'tainacan-get-map-' . $this->get_name(), [ return apply_filters( 'tainacan-get-map-' . $this->get_name(), [
'name' => [ 'name' => [
'map' => 'post_title', 'map' => 'post_title',
@ -303,10 +303,9 @@ class Collections extends Repository {
* @see \Tainacan\Repositories\Repository::insert() * @see \Tainacan\Repositories\Repository::insert()
*/ */
public function insert( $collection ) { public function insert( $collection ) {
$this->pre_process( $collection );
$this->handle_parent_order_clone( $collection );
$this->pre_process( $collection );
$this->handle_parent_order_clone( $collection );
$new_collection = parent::insert( $collection ); $new_collection = parent::insert( $collection );
$this->handle_core_metadata( $new_collection ); $this->handle_core_metadata( $new_collection );
@ -389,12 +388,9 @@ class Collections extends Repository {
} }
function pre_process( $collection ) { function pre_process( $collection ) {
$this->old_collection = $this->fetch( $collection->get_id() ); $this->old_collection = $this->fetch( $collection->get_id() );
$this->old_core_title = $collection->get_core_title_metadatum(); $this->old_core_title = $collection->get_core_title_metadatum();
$this->old_core_description = $collection->get_core_description_metadatum(); $this->old_core_description = $collection->get_core_description_metadatum();
} }
function handle_core_metadata( $collection ) { function handle_core_metadata( $collection ) {