Parses and sanitizes all field arguments.
Then it adds the field to Kirki::$fields.
public __construct ( string $config_id = 'global', array $args = [] ) | ||
$config_id | string | The ID of the config we want to use. Defaults to "global". Configs are handled by the Kirki_Config class. |
$args | array | The arguments of the field. |
/** * Constructor. * Since editor fields only work properly if there's a single tinyMCE instance * We'll be adding a global editor using the add_editor method. * * @access public * @param string $config_id The ID of the config we want to use. * Defaults to "global". * Configs are handled by the Kirki_Config class. * @param array $args The arguments of the field. */ public function __construct($config_id = 'global', $args = array()) { // Call the parent-class constructor. parent::__construct($config_id, $args); // Add the editor. add_action('customize_controls_print_footer_scripts', array(__CLASS__, 'add_editor')); }