esc_html__( 'In Focus', 'brighter-blog' ), 'panel' => 'font-page-settings', ) ); //enable disable In Focus new \Kirki\Field\Checkbox_Switch( [ 'label' => esc_html__( 'Enable In Focus', 'brighter-blog' ), 'section' => 'in_focus_options', 'settings' => 'enable_in_focus_section', 'default' => 'on', 'choices' => [ 'on' => esc_html__( 'Enable', 'brighter-blog' ), 'off' => esc_html__( 'Disable', 'brighter-blog' ), ], ] ); new \Kirki\Field\Text( [ 'settings' => 'in_focus_section_title', 'label' => esc_html__( 'In Focus', 'brighter-blog' ), 'default' => 'In Focus', 'section' => 'in_focus_options', 'active_callback' => [ [ 'setting' => 'enable_in_focus_section', 'operator' => '==', 'value' => true, ], ], 'partial_refresh' => [ 'in_focus_title_refresh' => [ 'selector' => 'h2.in-focus-title.section-title', 'render_callback' => 'brighter_blog_in_focus_customizer_quick_edit', ], ], ] ); // Toggle Field: Choose between Category or Latest Post new \Kirki\Field\Radio( [ 'settings' => 'in_focus_choose_cat_or_latest', 'label' => esc_html__( 'Select Content Type', 'brighter-blog' ), 'section' => 'in_focus_options', 'default' => 'latest', 'choices' => [ 'latest' => esc_html__( 'Latest Post', 'brighter-blog' ), 'category' => esc_html__( 'Category', 'brighter-blog' ), ], 'active_callback' => [ [ 'setting' => 'enable_in_focus_section', 'operator' => '==', 'value' => true, ], ], ] ); Kirki::add_field('theme_config_id', [ 'type' => 'select', 'settings' => 'in_focus_post_category', 'label' => __('Select Category', 'brighter-blog'), 'section' => 'in_focus_options', 'default' => '', 'choices' => array_merge(['' => __('All Categories', 'brighter-blog')], wp_list_pluck(get_categories(), 'name', 'slug')), 'active_callback' => [ [ 'setting' => 'enable_in_focus_section', 'operator' => '==', 'value' => true, ], [ 'setting' => 'in_focus_choose_cat_or_latest', 'operator' => '==', 'value' => 'category', ], ], ]); // Select Post order new \Kirki\Field\Select( [ 'settings' => 'in_focus_post_order', 'label' => esc_html__( 'Select In Focus Post Order', 'brighter-blog' ), 'section' => 'in_focus_options', 'default' => 'desc', 'placeholder' => esc_html__( 'Choose an option', 'brighter-blog' ), 'active_callback' => [ [ 'setting' => 'enable_in_focus_section', 'operator' => '==', 'value' => true, ], ], 'choices' => [ 'asc' => esc_html__( 'ASC', 'brighter-blog' ), 'desc' => esc_html__( 'DESC', 'brighter-blog' ), ], ] ); //Select Post order by new \Kirki\Field\Select( [ 'settings' => 'in_focus_post_orderby', 'label' => esc_html__( 'Select Post Order By', 'brighter-blog' ), 'section' => 'in_focus_options', 'default' => 'date', 'placeholder' => esc_html__( 'Choose an option', 'brighter-blog' ), 'active_callback' => [ [ 'setting' => 'enable_in_focus_section', 'operator' => '==', 'value' => true, ], ], 'choices' => [ 'none' => esc_html__( 'None', 'brighter-blog' ), 'ID' => esc_html__( 'ID', 'brighter-blog' ), 'date' => esc_html__( 'Date', 'brighter-blog' ), 'name' => esc_html__( 'Name', 'brighter-blog' ), 'title' => esc_html__( 'Title', 'brighter-blog' ), 'comment_count' => esc_html__( 'Comment count', 'brighter-blog' ), 'rand' => esc_html__( 'Random', 'brighter-blog' ), ], ] ); // visible items new \Kirki\Field\Number( [ 'settings' => 'in_focus_post_display_number', 'label' => esc_html__( 'Visible Number Of Items', 'brighter-blog' ), 'section' => 'in_focus_options', 'default' => 4, 'choices' => [ 'min' => 1, 'max' => 10, 'step' => 1, ], 'active_callback' => [ [ 'setting' => 'enable_in_focus_section', 'operator' => '==', 'value' => true, ], ], ] ); // In Focus btn text Discover More new \Kirki\Field\Text( [ 'settings' => 'in_focus_btn_text', 'label' => esc_html__( 'Button Text', 'brighter-blog' ), 'default' => 'Discover More', 'section' => 'in_focus_options', 'active_callback' => [ [ 'setting' => 'enable_in_focus_section', 'operator' => '==', 'value' => true, ], ], ] ); //Text Color new \Kirki\Field\Color( [ 'settings' => 'in_focus_btn_text_color', 'label' => esc_html__( 'Text Color', 'brighter-blog' ), 'description' => esc_html__( 'Add Button Text Color', 'brighter-blog' ), 'section' => 'in_focus_options', 'default' => '', 'output' => array( array( 'element' => '.in-focus .news-card-content> a.news-card-button', 'property' => 'color', ), ), 'active_callback' => [ [ 'setting' => 'enable_in_focus_section', 'operator' => '==', 'value' => true, ], ], ] ); //Button bg color new \Kirki\Field\Color( [ 'settings' => 'in_focus_btn_bg_color', 'label' => esc_html__( 'Button Background Color', 'brighter-blog' ), 'description' => esc_html__( 'Change Button Background Color', 'brighter-blog' ), 'section' => 'in_focus_options', 'default' => '', 'output' => array( array( 'element' => '.in-focus .news-card-content> a.news-card-button', 'property' => 'background', ), ), 'active_callback' => [ [ 'setting' => 'enable_in_focus_section', 'operator' => '==', 'value' => true, ], ], ] ); // Button Color on Hover new \Kirki\Field\Color( [ 'settings' => 'in_focus_btn_text_hover_color', 'label' => esc_html__( 'Button Hover Background Color', 'brighter-blog' ), 'description' => esc_html__( 'Add Button Background Hover Color', 'brighter-blog' ), 'section' => 'in_focus_options', 'default' => '', 'output' => [ [ 'element' => '.in-focus .news-card-content > a.news-card-button:hover', 'property' => 'background', ], ], 'active_callback' => [ [ 'setting' => 'enable_in_focus_section', 'operator' => '==', 'value' => true, ], ], ] );