llms_get_dom_document( string $string )
Instantiate an instance of DOMDocument with an HTML string
Contents
Description Description
This function suppresses PHP warnings that would be thrown by DOMDocument when loading a partial string or an HTML string with errors.
See also See also
- LLMS_DOM_Document->load().
Parameters Parameters
- $string
-
(string) (Required) An HTML string, either a full HTML document or a partial string.
Return Return
(DOMDocument|WP_Error) Returns an instance of DOMDocument with $string
loaded into it or an error object when DOMDocument isn't available or an error is encountered during loading.
Source Source
File: includes/llms.functions.core.php
*/ function llms_get_dom_document( $string ) { $llms_dom = new LLMS_DOM_Document( $string ); $load = $llms_dom->load(); return is_wp_error( $load ) ? $load : $llms_dom->dom();
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.8.0 | Remove reliance on mb_convert_encoding() . |
4.7.0 | |
4.13.0 | Introduced. |