esc_html__( 'Top Category', 'brighter-blog' ), 'panel' => 'font-page-settings', ) ); // Top Category enable disable new \Kirki\Field\Checkbox_Switch( [ 'label' => esc_html__( 'Enable Top Category', 'brighter-blog' ), 'section' => 'top_category_options', 'settings' => 'top_category_enable', 'default' => 'on', 'choices' => [ 'on' => esc_html__( 'Enable', 'brighter-blog' ), 'off' => esc_html__( 'Disable', 'brighter-blog' ), ], ] ); new \Kirki\Field\Text( [ 'settings' => 'top_category_section_title', 'label' => esc_html__( 'Top Category', 'brighter-blog' ), 'default' => 'Top Category', 'section' => 'top_category_options', 'active_callback' => [ [ 'setting' => 'top_category_enable', 'operator' => '==', 'value' => true, ], ], 'partial_refresh' => [ 'top_category_title_refresh' => [ 'selector' => 'h2.top-category-title.section-title', 'render_callback' => 'brighter_blog_top_category_customizer_quick_edit', ], ], ] ); Kirki::add_field('brighter_blog_config', [ 'type' => 'select', 'settings' => 'top_selected_categories', 'label' => esc_html__('Top Categories', 'brighter-blog'), 'description' => esc_html__('Select categories to display. If no categories are selected, the latest categories will be shown.', 'brighter-blog'), 'section' => 'top_category_options', // Replace with your desired section 'multiple' => 10, // Allow multiple selection 'choices' => get_categories(['fields' => 'id=>name']), // Get all categories 'default' => [], // Default empty array 'active_callback' => [ [ 'setting' => 'top_category_enable', 'operator' => '==', 'value' => true, ], ], ]); Kirki::add_field( 'theme_config', [ 'type' => 'custom', 'settings' => 'top_categories_pro_feature_upgrade', 'section' => 'top_category_options', 'default' => '
' . esc_html__( 'Unlock exclusive features and customization options by upgrading to the Pro version.', 'brighter-blog' ) . '
' . esc_html__( 'Upgrade Now', 'brighter-blog' ) . '