PHP Class Kirki_Init, kirki

Mostrar archivo Open project: aristath/kirki Class Usage Examples

Public Methods

Method Description
__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.

Method Details

__construct() public method

The class constructor.
public __construct ( )

add_fields() public method

Create the settings and controls from the $fields array and register them.
public add_fields ( ) : void
return void

add_panels() public method

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

add_sections() public method

Register our sections to the WordPress Customizer.
public add_sections ( ) : void
return void

add_to_customizer() public method

Helper function that adds the fields, sections and panels to the customizer.
public add_to_customizer ( ) : void
return void

fields_from_filters() public method

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

get_variables() public static method

Build the variables.
public static get_variables ( ) : array
return array ('variable-name' => value)

register_control_types() public method

Register control types
public register_control_types ( ) : void
return void

set_url() public method

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() public method

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.