From d688ae26ff819e4b4433f0e05b028c3638d736d7 Mon Sep 17 00:00:00 2001 From: Eduardo humberto Date: Tue, 5 Dec 2017 15:45:24 -0200 Subject: [PATCH] Fix duplicate field types on register --- .../repositories/class-tainacan-metadatas.php | 2 +- src/classes/tainacan-creator.php | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/classes/repositories/class-tainacan-metadatas.php b/src/classes/repositories/class-tainacan-metadatas.php index e4d8e3127..9775f1bc2 100644 --- a/src/classes/repositories/class-tainacan-metadatas.php +++ b/src/classes/repositories/class-tainacan-metadatas.php @@ -314,7 +314,7 @@ class Metadatas extends Repository { if( $output === 'NAME' ){ foreach ($this->field_types as $field_type) { - $return[] = str_replace('\Tainacan\Field_Types\\','', $field_type); + $return[] = str_replace('Tainacan\Field_Types\\','', $field_type); } return $return; diff --git a/src/classes/tainacan-creator.php b/src/classes/tainacan-creator.php index 26f075a80..b08ed38a4 100644 --- a/src/classes/tainacan-creator.php +++ b/src/classes/tainacan-creator.php @@ -61,14 +61,14 @@ global $Tainacan_Metadatas; $Tainacan_Metadatas = new \Tainacan\Repositories\Metadatas(); //register field types -$Tainacan_Metadatas->register_field_type('\Tainacan\Field_Types\Text'); -$Tainacan_Metadatas->register_field_type('\Tainacan\Field_Types\Textarea'); -$Tainacan_Metadatas->register_field_type('\Tainacan\Field_Types\Date'); -$Tainacan_Metadatas->register_field_type('\Tainacan\Field_Types\Numeric'); -$Tainacan_Metadatas->register_field_type('\Tainacan\Field_Types\Selectbox'); -$Tainacan_Metadatas->register_field_type('\Tainacan\Field_Types\Relationship'); -$Tainacan_Metadatas->register_field_type('\Tainacan\Field_Types\Radio'); -$Tainacan_Metadatas->register_field_type('\Tainacan\Field_Types\Checkbox'); +$Tainacan_Metadatas->register_field_type('Tainacan\Field_Types\Text'); +$Tainacan_Metadatas->register_field_type('Tainacan\Field_Types\Textarea'); +$Tainacan_Metadatas->register_field_type('Tainacan\Field_Types\Date'); +$Tainacan_Metadatas->register_field_type('Tainacan\Field_Types\Numeric'); +$Tainacan_Metadatas->register_field_type('Tainacan\Field_Types\Selectbox'); +$Tainacan_Metadatas->register_field_type('Tainacan\Field_Types\Relationship'); +$Tainacan_Metadatas->register_field_type('Tainacan\Field_Types\Radio'); +$Tainacan_Metadatas->register_field_type('Tainacan\Field_Types\Checkbox'); global $Tainacan_Filters; $Tainacan_Filters = new \Tainacan\Repositories\Filters();