Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Shortcode_Checkout::clean_form_fields( array $fields_html )
Clean form fields html
Description Description
Properly detects empty form fields when the html is only composed of blanks and empty paragraphs. In this case the form fields html is turned into an empty string.
Parameters Parameters
- $fields_html
-
(array) (Required) Form Fields.
Return Return
(array)
Source Source
File: includes/shortcodes/class.llms.shortcode.checkout.php
private static function clean_form_fields( $fields_html ) { // If fields html has only blanks and emoty paragraphs (autop?), clean it. if ( empty( preg_replace( '/(\s)*(<p><\/p>)*/m', '', $fields_html ) ) ) { $fields_html = ''; } return $fields_html; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.1.0 | Introduced. |