Fix duplicate field types on register

This commit is contained in:
Eduardo humberto 2017-12-05 15:45:24 -02:00
parent 11a40ddee9
commit d688ae26ff
2 changed files with 9 additions and 9 deletions

View File

@ -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;

View File

@ -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();