private function _getFieldsOutput($iTermID, $bRenderTableRow) { $_aOutput = array(); $_aOutput[] = wp_nonce_field($this->oProp->sClassHash, $this->oProp->sClassHash, true, false); $this->_setOptionArray($iTermID, $this->oProp->sOptionKey); $this->oForm->format(); $_oFieldsTable = new AdminPageFramework_FormTable($this->oProp->aFieldTypeDefinitions, $this->_getFieldErrors(), $this->oMsg); $_aOutput[] = $bRenderTableRow ? $_oFieldsTable->getFieldRows($this->oForm->aFields['_default'], array($this, '_replyToGetFieldOutput')) : $_oFieldsTable->getFields($this->oForm->aFields['_default'], array($this, '_replyToGetFieldOutput')); $_sOutput = $this->oUtil->addAndApplyFilters($this, 'content_' . $this->oProp->sClassName, implode(PHP_EOL, $_aOutput)); $this->oUtil->addAndDoActions($this, 'do_' . $this->oProp->sClassName, $this); return $_sOutput; }
/** * Retrieves the fields output. * * @since 3.0.0 * @internal */ private function _getFieldsOutput($iTermID, $bRenderTableRow) { $_aOutput = array(); /* Set nonce. */ $_aOutput[] = wp_nonce_field($this->oProp->sClassHash, $this->oProp->sClassHash, true, false); /* Set the option property array */ $this->_setOptionArray($iTermID, $this->oProp->sOptionKey); /* Format the fields arrays - taxonomy fields do not support sections */ $this->oForm->format(); /* Get the field outputs */ $_oFieldsTable = new AdminPageFramework_FormTable($this->oProp->aFieldTypeDefinitions, $this->_getFieldErrors(), $this->oMsg); $_aOutput[] = $bRenderTableRow ? $_oFieldsTable->getFieldRows($this->oForm->aFields['_default'], array($this, '_replyToGetFieldOutput')) : $_oFieldsTable->getFields($this->oForm->aFields['_default'], array($this, '_replyToGetFieldOutput')); /* Filter the output */ // @todo call the content() method. $_sOutput = $this->oUtil->addAndApplyFilters($this, 'content_' . $this->oProp->sClassName, implode(PHP_EOL, $_aOutput)); /* Do action */ $this->oUtil->addAndDoActions($this, 'do_' . $this->oProp->sClassName, $this); return $_sOutput; }