Current File : /home/kelaby89/sergio-cuchi.tattoo/wp-content/themes/maori/includes/kirki.php
<?php
/* ---------------------------------------------------------
Config
----------------------------------------------------------- */

$kirki_prefix = "maori_";

Kirki::add_config( $kirki_prefix . 'theme_config_id', array(
    'capability'    => 'edit_theme_options',
    'option_type'   => 'theme_mod'
));

/* ---------------------------------------------------------
Panel & Sections
----------------------------------------------------------- */

Kirki::add_panel( $kirki_prefix . 'theme_settings', array(
    'priority'    => 10,
    'title'       => esc_html__( 'Theme Settings', 'maori' )
));

Kirki::add_section( $kirki_prefix . 'general', array(
    'title'     => esc_html__( 'General', 'maori' ),
    'panel'     => $kirki_prefix . 'theme_settings',
    'priority'  => 1,
));

Kirki::add_section( $kirki_prefix . 'colors', array(
    'title'     => esc_html__( 'Backgrounds & Colors', 'maori' ),
    'panel'     => $kirki_prefix . 'theme_settings',
    'priority'  => 2,
));

Kirki::add_section( $kirki_prefix . 'typography', array(
    'title'     => esc_html__( 'Typography', 'maori'),
    'panel'     => $kirki_prefix . 'theme_settings',
    'priority'  => 3,
));

Kirki::add_section( $kirki_prefix . 'artists', array(
    'title'     => esc_html__( 'Artists', 'maori'),
    'panel'     => $kirki_prefix . 'theme_settings',
    'priority'  => 4,
));

Kirki::add_section( $kirki_prefix . 'woocommerce', array(
    'title'     => esc_html__( 'Woocommerce', 'maori'),
    'panel'     => $kirki_prefix . 'theme_settings',
    'priority'  => 5,
));

Kirki::add_section( $kirki_prefix . 'footer', array(
    'title'     => esc_html__( 'Footer', 'maori'),
    'panel'     => $kirki_prefix . 'theme_settings',
    'priority'  => 6,
));

/* ---------------------------------------------------------
Fields
----------------------------------------------------------- */

/* Site Title */

Kirki::add_field( 'theme_config_id', array(
	'type'        => 'image',
	'settings'    => $kirki_prefix . 'mobile_logo',
	'label'       => esc_attr__( 'Mobile Logo', 'maori' ),
	'description' => esc_attr__( 'Mobile version of your logo', 'maori' ),
	'section'     => 'title_tagline'
) );

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'number',
	'settings'    => $kirki_prefix . 'logo_width',
	'label'       => esc_html__( 'Logo Width', 'maori'),
    'description' => esc_html__( 'Maximum logo width in pixels.', 'maori'),
	'section'     => 'title_tagline',
	'default'     => 240,
	'choices'     => array(
		'min'  => 50,
		'max'  => 480,
		'step' => 1,
	),
));

/* General */

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
    'type'        => 'text',
    'settings'     => $kirki_prefix . 'phone',
	'label'       => esc_html__( 'Phone Number', 'maori'),
	'section'     => $kirki_prefix . 'general',
    'default'     => '',
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'number',
	'settings'    => $kirki_prefix . 'panel_width',
	'label'       => esc_html__( 'Sliding Panel Width', 'maori'),
    'description' => esc_html__( 'Maximum Sliding Panel width in pixels.', 'maori'),
	'section'     => $kirki_prefix . 'general',
	'default'     => 480,
    'choices'     => array(
		'min'  => 200,
		'max'  => 1200,
		'step' => 1,
	),
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'toggle',
	'settings'    => $kirki_prefix . 'remove_featured_img',
	'label'       => esc_html__( 'Use featured images for only post thumbnails', 'maori'),
	'section'     => $kirki_prefix . 'general',
	'default'     => 0
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'toggle',
	'settings'    => $kirki_prefix . 'img_animation',
	'label'       => esc_html__( 'Disable Image MouseOver Animations', 'maori'),
	'section'     => $kirki_prefix . 'general',
	'default'     => 0
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'select',
	'settings'    => $kirki_prefix . 'masonry_thumbnail',
	'label'       => esc_html__( 'Masonry Thumbnail Size', 'maori'),
    'description' => esc_html__( 'Default Thumbnail Size for Masonry Layout', 'maori'),
	'section'     => $kirki_prefix . 'general',
	'default'     => 'large',
    'choices'     => array(
		'maori-slide' => esc_html__( '1200x600 px', 'maori' ),
        'maori-thumbnail' => esc_html__( '900x600 px', 'maori' ),
        'full' => esc_html__( 'Full', 'maori' ),
        'large' => esc_html__( 'Large', 'maori' ),
        'medium' => esc_html__( 'Medium', 'maori' )
	),
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'select',
	'settings'    => $kirki_prefix . 'archive_page_layout',
	'label'       => esc_html__( 'Archive Page Layout', 'maori'),
    'description' => esc_html__( 'Category, archive and search pages', 'maori'),
	'section'     => $kirki_prefix . 'general',
	'default'     => '2column',
    'choices'     => array(
		'fullwidth' => esc_html__( 'Fullwidth', 'maori'),
		'2column' => esc_html__( '2 Column', 'maori'),
        '3column' => esc_html__( '3 Column', 'maori')
	),
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'toggle',
	'settings'    => $kirki_prefix . 'enable_sharing',
	'label'       => esc_html__( 'Social Media Sharing Buttons', 'maori'),
	'section'     => $kirki_prefix . 'general',
	'default'     => 0
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'number',
	'settings'    => $kirki_prefix . 'blog_masonry_at_most',
	'label'       => esc_html__( 'Blog 2 Column Page Template', 'maori'),
    'description' => esc_html__( 'Maximum number of the posts.', 'maori'),
	'section'     => $kirki_prefix . 'general',
	'default'     => 8,
	'choices'     => array(
		'min'  => 1,
		'max'  => 99,
		'step' => 1,
	),
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'number',
	'settings'    => $kirki_prefix . 'blog_masonry_3_at_most',
	'label'       => esc_html__( 'Blog 3 Column Page Template', 'maori'),
    'description' => esc_html__( 'Maximum number of the posts.', 'maori'),
	'section'     => $kirki_prefix . 'general',
	'default'     => 12,
	'choices'     => array(
		'min'  => 1,
		'max'  => 99,
		'step' => 1,
	),
));

/* Backgrounds & Colors */

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'custom',
	'settings'    => $kirki_prefix . 'title_1',
	'section'     => $kirki_prefix . 'colors',
	'default'     => '<h2>' . esc_html__( 'Skin', 'maori' ) . '</h2>'
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'color',
	'settings'    => $kirki_prefix . 'skin_color',
	'label'       => esc_html__( 'Main', 'maori'),
	'section'     => $kirki_prefix . 'colors',
	'default'     => '#f7d18d',
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'color',
	'settings'    => $kirki_prefix . 'second_skin_color',
	'label'       => esc_html__( 'Secondary', 'maori'),
	'section'     => $kirki_prefix . 'colors',
	'default'     => '#cdad75',
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'custom',
	'settings'    => $kirki_prefix . 'title_2',
	'section'     => $kirki_prefix . 'colors',
	'default'     => '<h2>' . esc_html__( 'Links', 'maori' ) . '</h2>'
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'color',
	'settings'    => $kirki_prefix . 'link_color',
	'label'       => esc_html__( 'Default', 'maori'),
	'section'     => $kirki_prefix . 'colors',
	'default'     => '#f7d18d',
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'color',
	'settings'    => $kirki_prefix . 'link_hover_color',
	'label'       => esc_html__( 'Default Hover', 'maori'),
	'section'     => $kirki_prefix . 'colors',
	'default'     => '#cdad75',
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'custom',
	'settings'    => $kirki_prefix . 'title_4',
	'section'     => $kirki_prefix . 'colors',
	'default'     => '<h2>' . esc_html__( 'Body', 'maori' ) . '</h2>'
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'background',
	'settings'    => $kirki_prefix . 'main_bg',
	'section'     => $kirki_prefix . 'colors',
	'default'     => array(
		'background-color'      => '#191919',
		'background-image'      => get_template_directory_uri() . "/images/bg.png",
		'background-repeat'     => 'repeat',
		'background-position'   => 'left top',
		'background-size'       => 'auto',
		'background-attachment' => 'scroll',
	),
) );

/* Typography */

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'toggle',
	'settings'    => $kirki_prefix . 'disable_external_script',
	'label'       => esc_html__( 'Stop Using Google CDN', 'maori'),
    'description' => esc_html__( 'The default fonts of the theme (Oswald and Open Sans) are loaded via Google CDN.', 'maori'),
	'section'     => $kirki_prefix . 'typography',
	'default'     => 0
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'number',
	'settings'    => $kirki_prefix . 'default_font_size',
	'label'       => esc_html__( 'Default Browser Font Size (px)', 'maori'),
    'description' => esc_html__( 'All font-sizes in the theme will scaled according to this value.', 'maori'),
	'section'     => $kirki_prefix . 'typography',
	'default'     => 16,
	'choices'     => array(
		'min'  => 1,
		'max'  => 99,
		'step' => 1,
	),
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'typography',
	'settings'    => $kirki_prefix . 'body_fonts',
	'label'       => esc_html__( 'Body', 'maori' ),
	'section'     => $kirki_prefix . 'typography',
	'default'     => array(
		'font-family'    => 'Open Sans',
		'variant'        => 'regular',
        'subsets'        => array( 'latin-ext' ),
		'line-height'    => '1.8',
		'letter-spacing' => '0',
		'color'          => '#aaaaaa'
	),
	'output' => array(
		array(
			'element' => 'body',
		),
	),
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'typography',
	'settings'    => $kirki_prefix . 'heading_fonts',
	'label'       => esc_html__( 'Headings', 'maori' ),
	'section'     => $kirki_prefix . 'typography',
	'default'     => array(
		'font-family'    => 'Oswald',
		'variant'        => '700',
        'subsets'        => array( 'latin-ext' ),
		'line-height'    => '1.3',
		'letter-spacing' => '0',
		'color'          => '#ffffff'
	),
	'output' => array(
		array(
			'element' => 'h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6,.card-title,.card-title a',
		),
	),
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'color',
	'settings'    => $kirki_prefix . 'other_light_texts',
	'label'       => esc_html__( 'Other Light Texts (Menu, Icons etc.)', 'maori'),
	'section'     => $kirki_prefix . 'typography',
	'default'     => '#ffffff',
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'typography',
	'settings'    => $kirki_prefix . 'subtitle_fonts',
	'label'       => esc_html__( 'Menus, Buttons, Subtitles etc.', 'maori' ),
	'section'     => $kirki_prefix . 'typography',
	'default'     => array(
		'font-family'    => 'Oswald',
        'subsets'        => array( 'latin-ext' )
	),
	'output' => array(
		array(
            'element' => '.card-footer,.card-horizontal-meta,.card-date,.badge,.card-category,.maori-menu-ul > li > a,.maori-page-title-meta,#maori-sidebar .maori-logo-link,.btn,input[type="submit"],input[type="button"],button,.maori_fn,.maori_comment_links,#maori-menu-toggle,span.onsale,.maori-out-of-stock,body.maori div.product .card p.price,body.maori div.product .card span.price,.nav-tabs,.woocommerce-MyAccount-navigation ul,.woocommerce-message,.button,.woocommerce-Message,.alert,.woocommerce table.shop_table th,.maori-post-nav-wrapper,#maori-share-buttons,.progress,span.maori-post-price,.maori-carousel-view-more,.woocommerce div.product .out-of-stock,.woocommerce div.product .stock,.maori_comments_rss,.maori-author-subtitle,#maori-phone-icon,.maori-faq-menu li a,.wp-block-cover-image-text,.maori-feature-title,.sow-more-text a',
		),
	),
));

/* Artists */

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'select',
	'settings'    => $kirki_prefix . 'artists_masonry_thumbnail',
	'label'       => esc_html__( 'Masonry Thumbnail Size', 'maori'),
    'description' => esc_html__( 'Default Thumbnail Size for Masonry Layout', 'maori'),
	'section'     => $kirki_prefix . 'artists',
	'default'     => 'large',
    'choices'     => array(
		'maori-slide' => esc_html__( '1200x600 px', 'maori' ),
        'maori-thumbnail' => esc_html__( '900x600 px', 'maori' ),
        'full' => esc_html__( 'Full', 'maori' ),
        'large' => esc_html__( 'Large', 'maori' ),
        'medium' => esc_html__( 'Medium', 'maori' )
	),
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'select',
	'settings'    => $kirki_prefix . 'artists_archive_page_layout',
	'label'       => esc_html__( 'Category page layout', 'maori'),
    'description' => esc_html__( 'Artist category page', 'maori'),
	'section'     => $kirki_prefix . 'artists',
	'default'     => '2column',
    'choices'     => array(
		'fullwidth' => esc_html__( 'Fullwidth', 'maori'),
		'2column' => esc_html__( '2 Column', 'maori'),
        '3column' => esc_html__( '3 Column', 'maori')
	),
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'toggle',
	'settings'    => $kirki_prefix . 'artists_enable_sharing',
	'label'       => esc_html__( 'Social Media Sharing Buttons', 'maori'),
	'section'     => $kirki_prefix . 'artists',
	'default'     => 0
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
    'type'        => 'text',
    'settings'     => $kirki_prefix . 'artist_btn_text',
	'label'       => esc_html__( 'Button Text', 'maori'),
	'section'     => $kirki_prefix . 'artists',
    'default'     => esc_html__( 'Learn More', 'maori' ),
));


/* Woocommerce */

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'select',
	'settings'    => $kirki_prefix . 'shop_layout',
	'label'       => esc_html__( 'Product layout', 'maori'),
	'section'     => $kirki_prefix . 'woocommerce',
	'default'     => 'threecolumns',
    'choices'     => array(
		'twocolumns' => esc_html__( 'Two Columns', 'maori'),
		'threecolumns' => esc_html__( 'Three Columns', 'maori')
	),
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'select',
	'settings'    => $kirki_prefix . 'product_thumbnail',
	'label'       => esc_html__( 'Product Thumbnail Size', 'maori'),
	'section'     => $kirki_prefix . 'woocommerce',
	'default'     => 'large',
    'choices'     => array(
		'large' => esc_html__( 'Large', 'maori'),
		'full' => esc_html__( 'Full', 'maori'),
        'medium' => esc_html__( 'Medium', 'maori'),
        'maori-thumbnail' => esc_html__( 'Maori Thumbnail', 'maori'),
        'shop_single' => esc_html__( 'Default', 'maori')
	),
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'select',
	'settings'    => $kirki_prefix . 'product_image',
	'label'       => esc_html__( 'Single Product Image Size', 'maori'),
	'section'     => $kirki_prefix . 'woocommerce',
	'default'     => 'full',
    'choices'     => array(
		'large' => esc_html__( 'Large', 'maori'),
		'full' => esc_html__( 'Full', 'maori'),
        'medium' => esc_html__( 'Medium', 'maori'),
        'shop_single' => esc_html__( 'Default', 'maori')
	),
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'slider',
	'settings'    => $kirki_prefix . 'product_img_size',
	'label'       => esc_html__( 'Single Product Image Column Size in Percents', 'maori' ),
	'section'     => $kirki_prefix . 'woocommerce',
	'default'     => 50,
	'choices'     => array(
		'min'  => '30',
		'max'  => '70',
		'step' => '1',
	),
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'image',
	'settings'    => $kirki_prefix . 'woo_placeholder',
	'label'       => esc_html__( 'Placeholder Image', 'maori'),
	'section'     => $kirki_prefix . 'woocommerce',
	'default'     => get_template_directory_uri() . '/images/woocommerce-placeholder.png',
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'toggle',
	'settings'    => $kirki_prefix . 'remove_related',
	'label'       => esc_html__( 'Related Products', 'maori'),
	'section'     => $kirki_prefix . 'woocommerce',
	'default'     => 1
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'number',
	'settings'    => $kirki_prefix . 'related_at_most',
	'label'       => esc_html__( 'Number of related products', 'maori'),
    'description' => esc_html__( 'Maximum number of related products.', 'maori'),
	'section'     => $kirki_prefix . 'woocommerce',
	'default'     => 3,
	'choices'     => array(
		'min'  => 1,
		'max'  => 99,
		'step' => 1,
	),
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'toggle',
	'settings'    => $kirki_prefix . 'enable_product_sharing',
	'label'       => esc_html__( 'Social Media Sharing Buttons', 'maori'),
	'section'     => $kirki_prefix . 'woocommerce',
	'default'     => 0
));

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
	'type'        => 'number',
	'settings'    => $kirki_prefix . 'shop_at_most',
	'label'       => esc_html__( 'Shop page show at most', 'maori'),
    'description' => esc_html__( 'Maximum number of the products.', 'maori'),
	'section'     => $kirki_prefix . 'woocommerce',
	'default'     => 9,
	'choices'     => array(
		'min'  => 1,
		'max'  => 99,
		'step' => 1,
	),
));

/* Footer */

Kirki::add_field( $kirki_prefix . 'theme_config_id', array(
    'type'        => 'textarea',
    'settings'     => $kirki_prefix . 'footermessage',
	'label'       => esc_html__( 'Credits', 'maori'),
	'section'     => $kirki_prefix . 'footer',
    'default'     => '',
));
?>
Page not found – Hello World !