MarkupQA class
HTML Markup Quality Assurance
Provides runtime quality assurance for markup stored in [textarea] field values.
- Ensures URLs referenced in and
tags are relative to actual site root.
- Ensures local page URLs referenced in tags up-to-date with current $page URL.
- Identifies and logs
tags that point to non-existing files in PW's file system.
- Re-creates image variations that don't exist, when the original still exists.
- Populates blank 'alt' attributes with actual file description.
- Ensures local page URLs referenced in tags up-to-date with current $page URL.
- For #1 use the wakeupUrls($value) and sleepUrls($value) methods.
- For #2 use the wakeupHrefs($value) and sleepHrefs($value) methods.
- For #3-5 use the checkImgTags($value, $options) method, where $options specifies 3-5.
Runtime errors are logged to: /site/assets/logs/markup-qa-errors.txt
Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the Markup
class also inherits all the methods and properties of: Wire.
Common
Additional methods and properties
In addition to the methods and properties above, Markup
API reference based on ProcessWire core version 3.0.251