PHP Класс Kirki_Output, kirki

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
__construct ( string $config_id, array $output, string | array $value ) The class constructor.
get_styles ( ) : array Exploses the private $styles property to the world

Защищенные методы

Метод Описание
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.

Описание методов

__construct() публичный Метод

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() защищенный Метод

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.
Результат string | array

apply_value_pattern() защищенный Метод

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.
Результат string | array

get_styles() публичный Метод

Exploses the private $styles property to the world
public get_styles ( ) : array
Результат array

parse_output() защищенный Метод

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

process_output() защищенный Метод

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.
Результат void

process_property_value() защищенный Метод

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.
Результат array

process_value() защищенный Метод

Returns the value.
protected process_value ( string | array $value, array $output ) : string | array
$value string | array The value.
$output array The field "output".
Результат string | array

Описание свойств

$config_id защищенное свойство

The Kirki configuration used in the field.
protected string $config_id
Результат string

$output защищенное свойство

The field's output argument.
protected array $output
Результат array

$styles защищенное свойство

An array of the generated styles.
protected array $styles
Результат array

$value защищенное свойство

The value.
protected string|array $value
Результат string | array