Merge branch 'feature/compount-metadata-type-refactor' of https://github.com/tainacan/tainacan into feature/compount-metadata-type-refactor

This commit is contained in:
mateuswetah 2020-03-16 18:27:01 -03:00
commit 3a290bd970
2 changed files with 2 additions and 2 deletions

View File

@ -427,7 +427,7 @@ class Item_Metadata_Entity extends Entity {
* *
* @return boolean * @return boolean
*/ */
function validate() { function validate() {
$value = $this->get_value(); $value = $this->get_value();
$metadatum = $this->get_metadatum(); $metadatum = $this->get_metadatum();
$item = $this->get_item(); $item = $this->get_item();

View File

@ -358,7 +358,7 @@ class Item_Metadata extends Repository {
$post_meta_object = get_metadata_by_mid( 'post', $id ); $post_meta_object = get_metadata_by_mid( 'post', $id );
if ( is_object( $post_meta_object ) ) { if ( is_object( $post_meta_object ) ) {
$metadatum = new Entities\Metadatum( $post_meta_object->meta_key ); $metadatum = new Entities\Metadatum( $post_meta_object->meta_key );
$return_value[ $metadatum->get_id() ] = new Entities\Item_Metadata_Entity( $item, $metadatum, $id, $compound_meta_id ); $return_value[ $metadatum->get_id() ] = new Entities\Item_Metadata_Entity( $item, $metadatum, $id, (int)$compound_meta_id );
} }
} }