File ManagerCurrent Directory: wp-content/plugins/wpforms/vendor_prefixed/ezyang/htmlpurifier/library/HTMLPurifier/ChildDefLinux appserver-0d5e4f1e-php-cc8da225320a42ba9b7d66cba40b1f03 6.6.123+ #1 SMP PREEMPT_DYNAMIC Wed Mar 11 09:04:28 UTC 2026 x86_64Edit File: Optional.php <?php namespace WPForms\Vendor; /** * Definition that allows a set of elements, and allows no children. * @note This is a hack to reuse code from HTMLPurifier_ChildDef_Required, * really, one shouldn't inherit from the other. Only altered behavior * is to overload a returned false with an array. Thus, it will never * return false. */ class HTMLPurifier_ChildDef_Optional extends HTMLPurifier_ChildDef_Required { /** * @type bool */ public $allow_empty = \true; /** * @type string */ public $type = 'optional'; /** * @param array $children * @param HTMLPurifier_Config $config * @param HTMLPurifier_Context $context * @return array */ public function validateChildren($children, $config, $context) { $result = parent::validateChildren($children, $config, $context); // we assume that $children is not modified if ($result === \false) { if (empty($children)) { return \true; } elseif ($this->whitespace) { return $children; } else { return array(); } } return $result; } } // vim: et sw=4 sts=4 Upload File Directory Listing NameTypeSizeActions.. (Parent Directory)DirChameleon.phpFile1.75 KB Rename | Delete | EditCustom.phpFile2.65 KB Rename | Delete | EditEmpty.phpFile890.00 B Rename | Delete | EditList.phpFile3.02 KB Rename | Delete | EditOptional.phpFile1.21 KB Rename | Delete | EditRequired.phpFile3.33 KB Rename | Delete | EditStrictBlockquote.phpFile2.84 KB Rename | Delete | EditTable.phpFile7.43 KB Rename | Delete | Edit