*/ public function get_keywords(): array { return ['shop', 'product', 'filter', 'filters', 'ajax', 'woocommerce', 'acf', 'meta', 'sku', 'faceted', 'smart filters']; } public function get_icon(): string { return 'king-addons-icon king-addons-facet-meta'; } public function get_categories(): array { return ['king-addons']; } public function get_script_depends(): array { return [KING_ADDONS_ASSETS_UNIQUE_KEY . '-facet-meta-script']; } public function get_style_depends(): array { return [KING_ADDONS_ASSETS_UNIQUE_KEY . '-facet-meta-style']; } public function get_custom_help_url() { return 'mailto:bug@kingaddons.com?subject=Bug Report - King Addons&body=Please describe the issue'; } protected function register_controls(): void { $this->start_controls_section( 'section_content', [ 'label' => esc_html__('Content', 'king-addons'), 'tab' => Controls_Manager::TAB_CONTENT, ] ); Core::renderUpgradeProSection($this, Controls_Manager::RAW_HTML, 'facet-meta', 'facet_meta_pro_notice'); $this->add_control( 'query_id', [ 'label' => esc_html__('Shop Filters ID', 'king-addons'), 'type' => Controls_Manager::TEXT, 'description' => esc_html__('Must match the Shop Filters ID on the product grid.', 'king-addons'), ] ); $this->add_control( 'meta_key', [ 'label' => esc_html__('Meta/ACF key', 'king-addons'), 'type' => Controls_Manager::TEXT, 'placeholder' => 'custom_field', ] ); $this->add_control( 'control_type', [ 'label' => esc_html__('Control type', 'king-addons'), 'type' => Controls_Manager::SELECT, 'options' => [ 'text' => esc_html__('Text', 'king-addons'), 'select' => esc_html__('Select', 'king-addons'), 'range' => esc_html__('Range', 'king-addons'), ], 'default' => 'text', ] ); $this->add_control( 'placeholder', [ 'label' => esc_html__('Placeholder', 'king-addons'), 'type' => Controls_Manager::TEXT, ] ); $this->end_controls_section(); require_once KING_ADDONS_PATH . 'includes/helpers/Faceted/Style_Controls.php'; Facet_Style_Controls::fields($this, '{{WRAPPER}} .ka-facet-meta__input, {{WRAPPER}} .ka-facet-meta__select, {{WRAPPER}} .ka-facet-meta__range input'); } protected function render(): void { if (!function_exists('king_addons_can_use_pro') || !king_addons_can_use_pro()) { if (class_exists(Woo_Context::class) && Woo_Context::is_editor()) { echo '