PHP Класс Kirki_Init, kirki

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

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

Метод Описание
__construct ( ) The class constructor.
add_fields ( ) : void Create the settings and controls from the $fields array and register them.
add_panels ( ) Register our panels to the WordPress Customizer.
add_sections ( ) : void Register our sections to the WordPress Customizer.
add_to_customizer ( ) : void Helper function that adds the fields, sections and panels to the customizer.
fields_from_filters ( ) Process fields added using the 'kirki/fields' and 'kirki/controls' filter.
get_variables ( ) : array Build the variables.
register_control_types ( ) : void Register control types
set_url ( ) Properly set the Kirki URL for assets.
update_user_meta ( string $value, object $wp_customize_setting ) Handle saving of settings with "user_meta" storage type.

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

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

The class constructor.
public __construct ( )

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

Create the settings and controls from the $fields array and register them.
public add_fields ( ) : void
Результат void

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

Register our panels to the WordPress Customizer.
public add_panels ( )

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

Register our sections to the WordPress Customizer.
public add_sections ( ) : void
Результат void

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

Helper function that adds the fields, sections and panels to the customizer.
public add_to_customizer ( ) : void
Результат void

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

These filters are no longer used, this is simply for backwards-compatibility.
public fields_from_filters ( )

get_variables() публичный статический Метод

Build the variables.
public static get_variables ( ) : array
Результат array ('variable-name' => value)

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

Register control types
public register_control_types ( ) : void
Результат void

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

Determines if Kirki is installed as a plugin, in a child theme, or a parent theme and then does some calculations to get the proper URL for its CSS & JS assets.
public set_url ( )

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

Handle saving of settings with "user_meta" storage type.
public update_user_meta ( string $value, object $wp_customize_setting )
$value string The value being saved.
$wp_customize_setting object $WP_Customize_Setting The WP_Customize_Setting instance when saving is happening.