add test create compound metadatum API fix validate #17

This commit is contained in:
vnmedeiros 2020-03-24 08:46:28 -03:00
parent 3bc72a6fbd
commit c08b6b32b7
2 changed files with 2 additions and 2 deletions

View File

@ -405,7 +405,7 @@ class Item extends Entity {
$is_valid = false;
}
$arrayItemMetadata = $this->get_metadata();
$arrayItemMetadata = $this->get_metadata(['parent'=>'any']);
if ( $arrayItemMetadata ) {
foreach ( $arrayItemMetadata as $itemMetadata ) {

View File

@ -100,7 +100,7 @@ class Compound extends Metadata_Type {
$item_arr['current_user_can_edit'] = $child->can_edit();
ob_start();
$child->get_metadata_type_object()->form();
$child = ob_get_clean();
$form = ob_get_clean();
$item_arr['edit_form'] = $form;
$index = array_search( $item_arr['id'], array_column( $options['children_order'], 'id' ) );