<commit_before><?php

/**
 * Add the theme's styles.css
 */
function kirki_demo_scripts() {
	wp_enqueue_style( 'kirki-demo', Kirki::$url . '/demo-theme/style.css', array(), time() );
}
add_action( 'wp_enqueue_scripts', 'kirki_demo_scripts' );

if ( class_exists( 'Kirki' ) ) {
	/**
	 * Add sections
	 */
	Kirki::add_section( 'checkbox', array(
		'title'          => esc_attr__( 'Checkbox Controls', 'kirki-demo' ),
		'priority'       => 1,
		'capability'     => 'edit_theme_options',
	) );

	Kirki::add_section( 'text', array(
		'title'          => esc_attr__( 'Text Controls', 'kirki-demo' ),
		'priority'       => 2,
		'capability'     => 'edit_theme_options',
	) );

	Kirki::add_section( 'color', array(
		'title'          => esc_attr__( 'Color & Color-Alpha Controls', 'kirki-demo' ),
		'priority'       => 3,
		'capability'     => 'edit_theme_options',
	) );

	Kirki::add_section( 'numeric', array(
		'title'          => esc_attr__( 'Numeric Controls', 'kirki-demo' ),
		'priority'       => 4,
		'capability'     => 'edit_theme_options',
	) );

	Kirki::add_section( 'radio', array(
		'title'          => esc_attr__( 'Radio Controls', 'kirki-demo' ),
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
	) );

	Kirki::add_section( 'select', array(
		'title'          => esc_attr__( 'Select Controls', 'kirki-demo' ),
		'priority'       => 6,
		'capability'     => 'edit_theme_options',
	) );

	Kirki::add_section( 'composite', array(
		'title'          => esc_attr__( 'Composite Controls', 'kirki-demo' ),
		'priority'       => 7,
		'capability'     => 'edit_theme_options',
	) );

	Kirki::add_section( 'custom', array(
		'title'          => esc_attr__( 'Custom Control', 'kirki-demo' ),
		'priority'       => 4,
		'capability'     => 'edit_theme_options',
	) );

	/**
	 * Add the configuration.
	 * This way all the fields using the 'kirki_demo' ID
	 * will inherit these options
	 */
	Kirki::add_config( 'kirki_demo', array(
		'capability'    => 'edit_theme_options',
		'option_type'   => 'theme_mod',
	) );

	/**
	 * Add fields
	 */
	Kirki::add_field( 'kirki_demo', array(
		'type'        => 'checkbox',
		'settings'    => 'checkbox_demo',
		'label'       => esc_attr__( 'Checkbox demo', 'kirki' ),
		'description' => esc_attr__( 'This is a simple checkbox', 'kirki-demo' ),
		'help'        => esc_attr__( 'This is a tooltip', 'kirki-demo' ),
		'section'     => 'checkbox',
		'default'     => true,
		'priority'    => 10,
	) );

	Kirki::add_field( 'kirki_demo', array(
		'type'        => 'switch',
		'settings'    => 'switch_demo',
		'label'       => esc_attr__( 'Switch demo', 'kirki' ),
		'description' => esc_attr__( 'This is a switch control. Internally it is a checkbox and you can also change the ON/OFF labels.', 'kirki-demo' ),
		'help'        => esc_attr__( 'This is a tooltip', 'kirki-demo' ),
		'section'     => 'checkbox',
		'default'     => true,
		'priority'    => 10,
		'required'    => array(
			array(
				'setting'  => 'checkbox_demo',
				'operator' => '==',
				'value'    => true,
			),
		),
	) );

	Kirki::add_field( 'kirki_demo', array(
		'type'        => 'toggle',
		'settings'    => 'toggle_demo',
		'label'       => esc_attr__( 'Toggle demo', 'kirki' ),
		'description' => esc_attr__( 'This is a toggle. it is basically identical to a switch, the only difference is that it does not have any labels and to save space it is inline with the label. Internally this is a checkbox.', 'kirki-demo' ),
		'help'        => esc_attr__( 'This is a tooltip', 'kirki-demo' ),
		'section'     => 'checkbox',
		'default'     => true,
		'priority'    => 10,
	) );

	Kirki::add_field( 'kirki_demo', array(
		'type'        => 'text',
		'settings'    => 'text_demo',
		'label'       => esc_attr__( 'Text Control', 'kirki-demo' ),
		'help'        => esc_attr__( 'This is a tooltip', 'kirki-demo' ),
		'default'     => esc_attr__( 'This text is entered in the "text" control.', 'kirki-demo' ),
		'section'     => 'text',
		'default'     => '',
		'priority'    => 10,
	) );

	Kirki::add_field( 'kirki_demo', array(
		'type'        => 'textarea',
		'settings'    => 'textarea_demo',
		'label'       => esc_attr__( 'Textarea Control', 'kirki-demo' ),
		'help'        => esc_attr__( 'This is a tooltip', 'kirki-demo' ),
		'default'     => esc_attr__( 'This text is entered in the "textarea" control.', 'kirki-demo' ),
		'section'     => 'text',
		'default'     => '',
		'priority'    => 10,
	) );

	Kirki::add_field( 'kirki_demo', array(
		'type'        => 'editor',
		'settings'    => 'editor_demo',
		'label'       => esc_attr__( 'Editor Control', 'kirki-demo' ),
		'help'        => esc_attr__( 'This is a tooltip', 'kirki-demo' ),<commit_msg>test descriptions on editor controls<commit_after><?php

/**
 * Add the theme's styles.css
 */
function kirki_demo_scripts() {
	wp_enqueue_style( 'kirki-demo', Kirki::$url . '/demo-theme/style.css', array(), time() );
}
add_action( 'wp_enqueue_scripts', 'kirki_demo_scripts' );

if ( class_exists( 'Kirki' ) ) {
	/**
	 * Add sections
	 */
	Kirki::add_section( 'checkbox', array(
		'title'          => esc_attr__( 'Checkbox Controls', 'kirki-demo' ),
		'priority'       => 1,
		'capability'     => 'edit_theme_options',
	) );

	Kirki::add_section( 'text', array(
		'title'          => esc_attr__( 'Text Controls', 'kirki-demo' ),
		'priority'       => 2,
		'capability'     => 'edit_theme_options',
	) );

	Kirki::add_section( 'color', array(
		'title'          => esc_attr__( 'Color & Color-Alpha Controls', 'kirki-demo' ),
		'priority'       => 3,
		'capability'     => 'edit_theme_options',
	) );

	Kirki::add_section( 'numeric', array(
		'title'          => esc_attr__( 'Numeric Controls', 'kirki-demo' ),
		'priority'       => 4,
		'capability'     => 'edit_theme_options',
	) );

	Kirki::add_section( 'radio', array(
		'title'          => esc_attr__( 'Radio Controls', 'kirki-demo' ),
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
	) );

	Kirki::add_section( 'select', array(
		'title'          => esc_attr__( 'Select Controls', 'kirki-demo' ),
		'priority'       => 6,
		'capability'     => 'edit_theme_options',
	) );

	Kirki::add_section( 'composite', array(
		'title'          => esc_attr__( 'Composite Controls', 'kirki-demo' ),
		'priority'       => 7,
		'capability'     => 'edit_theme_options',
	) );

	Kirki::add_section( 'custom', array(
		'title'          => esc_attr__( 'Custom Control', 'kirki-demo' ),
		'priority'       => 4,
		'capability'     => 'edit_theme_options',
	) );

	/**
	 * Add the configuration.
	 * This way all the fields using the 'kirki_demo' ID
	 * will inherit these options
	 */
	Kirki::add_config( 'kirki_demo', array(
		'capability'    => 'edit_theme_options',
		'option_type'   => 'theme_mod',
	) );

	/**
	 * Add fields
	 */
	Kirki::add_field( 'kirki_demo', array(
		'type'        => 'checkbox',
		'settings'    => 'checkbox_demo',
		'label'       => esc_attr__( 'Checkbox demo', 'kirki' ),
		'description' => esc_attr__( 'This is a simple checkbox', 'kirki-demo' ),
		'help'        => esc_attr__( 'This is a tooltip', 'kirki-demo' ),
		'section'     => 'checkbox',
		'default'     => true,
		'priority'    => 10,
	) );

	Kirki::add_field( 'kirki_demo', array(
		'type'        => 'switch',
		'settings'    => 'switch_demo',
		'label'       => esc_attr__( 'Switch demo', 'kirki' ),
		'description' => esc_attr__( 'This is a switch control. Internally it is a checkbox and you can also change the ON/OFF labels.', 'kirki-demo' ),
		'help'        => esc_attr__( 'This is a tooltip', 'kirki-demo' ),
		'section'     => 'checkbox',
		'default'     => true,
		'priority'    => 10,
		'required'    => array(
			array(
				'setting'  => 'checkbox_demo',
				'operator' => '==',
				'value'    => true,
			),
		),
	) );

	Kirki::add_field( 'kirki_demo', array(
		'type'        => 'toggle',
		'settings'    => 'toggle_demo',
		'label'       => esc_attr__( 'Toggle demo', 'kirki' ),
		'description' => esc_attr__( 'This is a toggle. it is basically identical to a switch, the only difference is that it does not have any labels and to save space it is inline with the label. Internally this is a checkbox.', 'kirki-demo' ),
		'help'        => esc_attr__( 'This is a tooltip', 'kirki-demo' ),
		'section'     => 'checkbox',
		'default'     => true,
		'priority'    => 10,
	) );

	Kirki::add_field( 'kirki_demo', array(
		'type'        => 'text',
		'settings'    => 'text_demo',
		'label'       => esc_attr__( 'Text Control', 'kirki-demo' ),
		'help'        => esc_attr__( 'This is a tooltip', 'kirki-demo' ),
		'default'     => esc_attr__( 'This text is entered in the "text" control.', 'kirki-demo' ),
		'section'     => 'text',
		'default'     => '',
		'priority'    => 10,
	) );

	Kirki::add_field( 'kirki_demo', array(
		'type'        => 'textarea',
		'settings'    => 'textarea_demo',
		'label'       => esc_attr__( 'Textarea Control', 'kirki-demo' ),
		'help'        => esc_attr__( 'This is a tooltip', 'kirki-demo' ),
		'default'     => esc_attr__( 'This text is entered in the "textarea" control.', 'kirki-demo' ),
		'section'     => 'text',
		'default'     => '',
		'priority'    => 10,
	) );

	Kirki::add_field( 'kirki_demo', array(
		'type'        => 'editor',
		'settings'    => 'editor_demo',
		'label'       => esc_attr__( 'Editor Control', 'kirki-demo' ),
		'description' => esc_attr__( 'Editor Control Description', 'kirki-demo' ),
		'help'        => esc_attr__( 'This is a tooltip', 'kirki-demo' ),
{'fraction_non_alphanumeric': 0.18697033898305085, 'fraction_numerical': 0.0038135593220338985, 'mean_word_length': 2.9734848484848486, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 152, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '627958', 'n_tokens_mistral': 3602, 'n_tokens_neox': 3418, 'n_words': 778}