File ManagerCurrent Directory: wp-content/plugins/wpforms/vendor_prefixed/ezyang/htmlpurifier/library/HTMLPurifier/ChildDefLinux appserver-7a7af3b2-php-0c9ec09e2f9746c2a80fa3756c076432 6.12.94+ #1 SMP Fri Jul 17 09:26:56 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