118 lines
3.5 KiB
PHP
118 lines
3.5 KiB
PHP
<?php
|
|
|
|
/*----------------------------
|
|
Button
|
|
----------------------------*/
|
|
Kirki::add_section( 'upstudy_button_section', array(
|
|
'title' => esc_html__( 'Buttons', 'upstudy' ),
|
|
'panel' => 'upstudy_general_panel'
|
|
) );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'select',
|
|
'settings' => 'upstudy_button_style',
|
|
'label' => esc_html__( 'Button Style', 'upstudy' ),
|
|
'section' => 'upstudy_button_section',
|
|
'default' => '1',
|
|
'multiple' => false,
|
|
'choices' => [
|
|
'1' => esc_html__('Style 01', 'upstudy'),
|
|
'2' => esc_html__('Style 02', 'upstudy'),
|
|
],
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', array(
|
|
'label' => esc_html__( 'Button Text', 'upstudy' ),
|
|
'type' => 'color',
|
|
'settings' => 'btn_text_color',
|
|
'section' => 'upstudy_button_section',
|
|
'default' => '',
|
|
'choices' => [
|
|
'alpha' => true,
|
|
],
|
|
'output' => array(
|
|
array(
|
|
'element' => 'button, input[type="button"], input[type="submit"]',
|
|
'property' => 'color',
|
|
),
|
|
array(
|
|
'element' => 'button, input[type="button"], input[type="submit"]',
|
|
'property' => 'color',
|
|
),
|
|
array(
|
|
'element' => '.upstudy-main-btn a',
|
|
'property' => 'color',
|
|
),
|
|
)
|
|
) );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', array(
|
|
'label' => esc_html__( 'Button Text Hover Color', 'upstudy' ),
|
|
'type' => 'color',
|
|
'settings' => 'btn_text_hover_color',
|
|
'section' => 'upstudy_button_section',
|
|
'default' => '',
|
|
'choices' => [
|
|
'alpha' => true,
|
|
],
|
|
'output' => array(
|
|
array(
|
|
'element' => 'button:hover, button:focus, input[type="button"]:hover, input[type="button"]:focus, input[type="submit"]:hover, input[type="submit"]:focus',
|
|
'property' => 'color',
|
|
),
|
|
array(
|
|
'element' => '.upstudy-main-btn:hover',
|
|
'property' => 'border-color',
|
|
),
|
|
array(
|
|
'element' => '.upstudy-main-btn:hover a',
|
|
'property' => 'color',
|
|
),
|
|
)
|
|
) );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', array(
|
|
'label' => esc_html__( 'Button Background', 'upstudy' ),
|
|
'type' => 'color',
|
|
'settings' => 'btn_color',
|
|
'section' => 'upstudy_button_section',
|
|
'default' => '',
|
|
'choices' => [
|
|
'alpha' => true,
|
|
],
|
|
'output' => array(
|
|
array(
|
|
'element' => 'button, input[type="button"], input[type="submit"]',
|
|
'property' => 'border-color',
|
|
),
|
|
array(
|
|
'element' => 'button, input[type="button"], input[type="submit"]',
|
|
'property' => 'background',
|
|
),
|
|
array(
|
|
'element' => '.upstudy-main-btn',
|
|
'property' => 'background',
|
|
),
|
|
)
|
|
) );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', array(
|
|
'label' => esc_html__( 'Button Background Hover', 'upstudy' ),
|
|
'type' => 'color',
|
|
'settings' => 'btn_hover_color',
|
|
'section' => 'upstudy_button_section',
|
|
'default' => '',
|
|
'choices' => [
|
|
'alpha' => true,
|
|
],
|
|
'output' => array(
|
|
array(
|
|
'element' => 'button:hover, button:focus, input[type="button"]:hover, input[type="button"]:focus, input[type="submit"]:hover, input[type="submit"]:focus',
|
|
'property' => 'background-color',
|
|
),
|
|
array(
|
|
'element' => '.upstudy-main-btn:hover',
|
|
'property' => 'background-color',
|
|
),
|
|
)
|
|
) ); |