PHP Class Kirki_Sanitize_Values, kirki

Afficher le fichier Open project: aristath/kirki Class Usage Examples

Méthodes publiques

Méthode Description
__callStatic ( string $name, mixed $arguments ) : mixed Fallback for non-existing methods.
checkbox ( boolean | string $value ) : boolean Checkbox sanitization callback.
color ( string $value ) : string Sanitize colors.
css_dimension ( string $value ) : string Sanitizes css dimensions.
dropdown_pages ( integer $page_id, WP_Customize_Setting $setting ) : integer | string Drop-down Pages sanitization callback.
filter_number ( string $value ) : integer | float Filters numeric values.
number ( integer | float | double | string $value ) : integer | float | double Sanitize number options.
rgba ( string $value ) : string Sanitize RGBA colors
sortable ( string | array $value ) : string Sanitize sortable controls
unfiltered ( integer | string | array $value ) : integer | string | array DOES NOT SANITIZE ANYTHING.

Method Details

__callStatic() public static méthode

Fallback for non-existing methods.
public static __callStatic ( string $name, mixed $arguments ) : mixed
$name string The method we're trying to access.
$arguments mixed The arguments the method we're trying to call accepts.
Résultat mixed The $arguments provided.

checkbox() public static méthode

Sanitization callback for 'checkbox' type controls. This callback sanitizes $value as a boolean value, either TRUE or FALSE. Deprecated. Use Kirki_Field_Checkbox::sanitize() instead.
See also: Kirki_Field_Checkbox::sanitize()
public static checkbox ( boolean | string $value ) : boolean
$value boolean | string Whether the checkbox is checked.
Résultat boolean Whether the checkbox is checked.

color() public static méthode

Sanitize colors.
Since: 0.8.5
public static color ( string $value ) : string
$value string The value to be sanitized.
Résultat string

css_dimension() public static méthode

Sanitizes css dimensions.
Since: 2.2.0
public static css_dimension ( string $value ) : string
$value string The value to be sanitized.
Résultat string

dropdown_pages() public static méthode

- Sanitization: dropdown-pages - Control: dropdown-pages Sanitization callback for 'dropdown-pages' type controls. This callback sanitizes $page_id as an absolute integer, and then validates that $input is the ID of a published page.
See also: absint() https://developer.wordpress.org/reference/functions/absint/
See also: get_post_status() https://developer.wordpress.org/reference/functions/get_post_status/
public static dropdown_pages ( integer $page_id, WP_Customize_Setting $setting ) : integer | string
$page_id integer Page ID.
$setting WP_Customize_Setting Setting instance.
Résultat integer | string Page ID if the page is published; otherwise, the setting default.

filter_number() public static méthode

Filters numeric values.
public static filter_number ( string $value ) : integer | float
$value string The value to be sanitized.
Résultat integer | float

number() public static méthode

Sanitize number options.
Since: 0.5
public static number ( integer | float | double | string $value ) : integer | float | double
$value integer | float | double | string The value to be sanitized.
Résultat integer | float | double

rgba() public static méthode

Sanitize RGBA colors
Since: 0.8.5
public static rgba ( string $value ) : string
$value string The value to be sanitized.
Résultat string

sortable() public static méthode

Sanitize sortable controls
Since: 0.8.3
public static sortable ( string | array $value ) : string
$value string | array The value to be sanitized.
Résultat string

unfiltered() public static méthode

DOES NOT SANITIZE ANYTHING.
Since: 0.5
public static unfiltered ( integer | string | array $value ) : integer | string | array
$value integer | string | array The value to be sanitized.
Résultat integer | string | array