PHP Class Kirki_Init, kirki

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

Méthodes publiques

Méthode 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 méthode

The class constructor.
public __construct ( )

add_fields() public méthode

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

add_panels() public méthode

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

add_sections() public méthode

Register our sections to the WordPress Customizer.
public add_sections ( ) : void
Résultat void

add_to_customizer() public méthode

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

fields_from_filters() public méthode

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

get_variables() public static méthode

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

register_control_types() public méthode

Register control types
public register_control_types ( ) : void
Résultat void

set_url() public méthode

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 méthode

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.