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.

WP_Customize_Custom_CSS_Setting::is_possible_content_error( string $css )

Find “content:” within a string.


Description Description

Imbalanced/Unclosed validation errors may be caused when a character is used in a "content:" declaration.

This function is used to detect if this is a possible cause of the validation error, so that if it is, a notification may be added to the Validation Errors.

Example: .element::before { content: "(\""; } .element::after { content: "\")"; }

Using ! empty() because strpos() may return non-boolean values that evaluate to false. This would be problematic when using a strict "false === strpos()" comparison.


Parameters Parameters

$css

(string) (Required) The CSS input string.


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: wp-includes/customize/class-wp-customize-custom-css-setting.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.