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_Certificates::modify_dom( string $html )
Modify the HTML using DOMDocument.
Description Description
Preparations include:
1. Removing all `script` tags.
2. Removes the WP Admin Bar.
3. Converting all stylesheets into inline `style` tags.
4. Removes all non stylesheet `link` tags.
5. Converts `img` tags into data uris.
6. Adds inline CSS to hide anything hidden in a print view.
Parameters Parameters
- $html
-
(Required) Certificate HTML.
Return Return
(string)
Source Source
File: includes/class.llms.certificates.php
Changelog Changelog
Version | Description |
---|---|
4.8.0 | Use llms_get_dom_document() in favor of loading DOMDOcument directly. |
4.21.0 | Allow external assets (e.g. images/stylesheets from CDN) to be embedded/inlined. Also, remove the WP Admin Bar earlier. Move the links and images modification in specific methods. |
3.38.1 | Use LLMS_Mime_Type_Extractor::from_file_path() in place of mime_content_type() to avoid issues with PHP installs that do not support it. |
3.37.3 | Introduced. |