PHP Class Kirki_Output, kirki

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

Protected Properties

Свойство Type Description
$config_id string The Kirki configuration used in the field.
$output array The field's output argument.
$styles array An array of the generated styles.
$value string | array The value.

Méthodes publiques

Méthode Description
__construct ( string $config_id, array $output, string | array $value ) The class constructor.
get_styles ( ) : array Exploses the private $styles property to the world

Méthodes protégées

Méthode Description
apply_sanitize_callback ( array $output, string | array $value ) : string | array If we have a sanitize_callback defined, apply it to the value.
apply_value_pattern ( array $output, string | array $value ) : string | array If we have a value_pattern defined, apply it to the value.
parse_output ( ) Parses the output arguments.
process_output ( array $output, string $value ) : void Parses an output and creates the styles array for it.
process_property_value ( string $property, string $value ) : array Some CSS properties are unique.
process_value ( string | array $value, array $output ) : string | array Returns the value.

Method Details

__construct() public méthode

The class constructor.
public __construct ( string $config_id, array $output, string | array $value )
$config_id string The config ID.
$output array The output argument.
$value string | array The value.

apply_sanitize_callback() protected méthode

If we have a sanitize_callback defined, apply it to the value.
protected apply_sanitize_callback ( array $output, string | array $value ) : string | array
$output array The output args.
$value string | array The value.
Résultat string | array

apply_value_pattern() protected méthode

If we have a value_pattern defined, apply it to the value.
protected apply_value_pattern ( array $output, string | array $value ) : string | array
$output array The output args.
$value string | array The value.
Résultat string | array

get_styles() public méthode

Exploses the private $styles property to the world
public get_styles ( ) : array
Résultat array

parse_output() protected méthode

Calls the process_output method for each of them.
protected parse_output ( )

process_output() protected méthode

Parses an output and creates the styles array for it.
protected process_output ( array $output, string $value ) : void
$output array The field output.
$value string The value.
Résultat void

process_property_value() protected méthode

We need to tweak the value to make everything works as expected.
protected process_property_value ( string $property, string $value ) : array
$property string The CSS property.
$value string The value.
Résultat array

process_value() protected méthode

Returns the value.
protected process_value ( string | array $value, array $output ) : string | array
$value string | array The value.
$output array The field "output".
Résultat string | array

Property Details

$config_id protected_oe property

The Kirki configuration used in the field.
protected string $config_id
Résultat string

$output protected_oe property

The field's output argument.
protected array $output
Résultat array

$styles protected_oe property

An array of the generated styles.
protected array $styles
Résultat array

$value protected_oe property

The value.
protected string|array $value
Résultat string | array