control_groups['form'] = [ 'title' => esc_html__( 'Form', 'propertyhive' ), 'tab' => 'content', // content / style ];*/ } public function set_controls() { /*$this->controls['height'] = [ 'tab' => 'content', //'group' => 'settings', 'label' => esc_html__( 'Height', 'propertyhive' ), 'type' => 'number', 'default' => 400 ];*/ } public function render() { global $property; if ( !isset($property->id) ) { return; } $root_classes[] = $this->name; // Add 'class' attribute to element root tag $this->set_attribute( '_root', 'class', $root_classes ); echo "
render_attributes( '_root' )}>"; if ( get_option('propertyhive_epcs_stored_as', '') == 'urls' ) { $epc_urls = $property->_epc_urls; if ( is_array($epc_urls) && !empty( $epc_urls ) ) { foreach ($epc_urls as $epc) { echo ''; } } } else { $epc_attachment_ids = $property->get_epc_attachment_ids(); if ( !empty($epc_attachment_ids) ) { echo '
'; echo '

' . esc_html(__( 'EPCs', 'propertyhive' )) . '

'; foreach ( $epc_attachment_ids as $attachment_id ) { if ( wp_attachment_is_image($attachment_id) ) { echo ''; } else { echo '' . esc_html(__( 'View EPC', 'propertyhive' )) . ''; } } echo '
'; } } echo '
'; } }