Sanitize final class
Minn\Support\Sanitize · public/minn/src/Minn/Support/Sanitize.php · 92 lines
Text made fit to store the way WordPress's sanitizers make it, each ending in the filter plugins hook there, handed the result and what was given: a title (accents gone when saving), a key, a line of plain text, a user name, an email address and the check of one.
Used by 30 (show)
Public
| static | title(mixed $title, mixed $fallback = '', mixed $context = 'save'): string# | A title as a slug's source (sanitize_title): accents gone when saving; the fallback when the filter leaves nothing. |
| static | key(mixed $key): string# | A key (sanitize_key): lower case letters, digits, underscores and dashes only. |
| static | textField(mixed $text): string# | One line of plain text (sanitize_text_field): tags, line breaks, extra spaces and stray octets gone; anything but text is empty. |
| static | user(mixed $username, mixed $strict = false): string# | A user name (sanitize_user): tags, accents, octets and references gone, spaces collapsed; strictly, only letters, digits, spaces and _ . - @. |
| static | htmlClass(mixed $classname, mixed $fallback = ''): mixed# | A class name for HTML (sanitize_html_class): escaped octets and anything but letters, digits, _ and - taken out; the fallback's when nothing is left; then the filter. |
| static | hexColor(mixed $color): mixed# | A hex colour as given when it is one (#abc or #aabbcc), empty for none, else null (sanitize_hex_color). |
| static | textareaField(mixed $text): mixed# | Lines of plain text (sanitize_textarea_field): as a text field, line breaks kept; then the filter. |
| static | email(mixed $email): string# | An email address with what may not be in one taken out (sanitize_email), and why when nothing is left. |
| static | isEmail(mixed $email): mixed# | The address when it reads as one, else false (is_email), as the filter leaves it. |
Nothing matches.