PHP Class Kirki, kirki

Inheritance: extends Kirki_Init
Mostrar archivo Open project: aristath/kirki Class Usage Examples

Public Properties

Property Type Description
$config array An array containing all configurations.
$fields array An array containing all fields.
$panels array An array containing all panels.
$path string Absolute path to the Kirki folder.
$sections array An array containing all sections.
$url string URL to the Kirki folder.

Public Methods

Method Description
add_config ( string $config_id, array $args = [] ) Sets the configuration options.
add_field ( string $config_id, array $args ) Create a new field.
add_panel ( string $id = '', array $args = [] ) Create a new panel.
add_section ( string $id, array $args ) Create a new section.
get_option ( string $config_id = '', string $field_id = '' ) : mixed Get the value of an option from the db.

Method Details

add_config() public static method

Sets the configuration options.
public static add_config ( string $config_id, array $args = [] )
$config_id string The configuration ID.
$args array The configuration options.

add_field() public static method

Create a new field.
public static add_field ( string $config_id, array $args )
$config_id string The configuration ID for this field.
$args array The field arguments.

add_panel() public static method

Create a new panel.
public static add_panel ( string $id = '', array $args = [] )
$id string The ID for this panel.
$args array The panel arguments.

add_section() public static method

Create a new section.
public static add_section ( string $id, array $args )
$id string The ID for this section.
$args array The section arguments.

get_option() public static method

Get the value of an option from the db.
public static get_option ( string $config_id = '', string $field_id = '' ) : mixed
$config_id string The ID of the configuration corresponding to this field.
$field_id string The field_id (defined as 'settings' in the field arguments).
return mixed The saved value of the field.

Property Details

$config public_oe static_oe property

An array containing all configurations.
public static array $config
return array

$fields public_oe static_oe property

An array containing all fields.
public static array $fields
return array

$panels public_oe static_oe property

An array containing all panels.
public static array $panels
return array

$path public_oe static_oe property

Absolute path to the Kirki folder.
public static string $path
return string

$sections public_oe static_oe property

An array containing all sections.
public static array $sections
return array

$url public_oe static_oe property

URL to the Kirki folder.
public static string $url
return string