Merge branch 'develop' of https://github.com/tainacan/tainacan into develop

This commit is contained in:
mateuswetah 2020-10-08 10:46:19 -03:00
commit e500e44eb4
1 changed files with 7 additions and 4 deletions

View File

@ -173,13 +173,16 @@ class Metadatum extends Entity {
function get_metadata_type_object(){
$class_name = $this->get_metadata_type();
if( !class_exists( $class_name ) ){
return null;
if( !class_exists( $class_name ) ) {
$class_name = "Tainacan\\Metadata_Types\\Text";
if( !class_exists( $class_name ) ){
return null;
}
}
$object_type = new $class_name();
$object_type->set_options( $this->get_mapped_property('metadata_type_options') );
return $object_type;
return $object_type;
}
/**