✏️ 正在编辑: datis_faq.php
路径:
/home/h359620/public_html/wp-content/themes/datis/inc/elementor/widgets/datis_faq/datis_faq.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php namespace Datis\Widgets; if (!defined('ABSPATH')) exit; use Elementor\Widget_Base; use Elementor\Controls_Manager; use Elementor\Repeater; use Elementor\Group_Control_Typography; use Elementor\Group_Control_Border; use Elementor\Group_Control_Box_Shadow; use Elementor\Group_Control_Background; class Datis_FAQ extends Widget_Base { public function get_name() { return 'datis_faq'; } public function get_title() { return __('FAQ', 'datis'); } public function get_icon() { return 'eicon-accordion'; } public function get_categories() { return ['datis-widgets']; } /* ---------------- Controls ---------------- */ protected function register_controls() { /* ---------- CONTENT ---------- */ $this->start_controls_section('sec_content', [ 'label' => __('Content', 'datis'), 'tab' => Controls_Manager::TAB_CONTENT, ]); $rep = new Repeater(); $rep->add_control('question', [ 'label' => __('Question', 'datis'), 'type' => Controls_Manager::TEXT, 'default' => __('Question', 'datis'), 'label_block' => true, ]); $rep->add_control('answer', [ 'label' => __('Answer', 'datis'), 'type' => Controls_Manager::WYSIWYG, 'default' => __('Answer content goes here.', 'datis'), ]); $rep->add_control('open_by_default', [ 'label' => __('Open by default', 'datis'), 'type' => Controls_Manager::SWITCHER, 'default' => '', ]); $this->add_control('items', [ 'label' => __('Items', 'datis'), 'type' => Controls_Manager::REPEATER, 'fields' => $rep->get_controls(), 'title_field' => '{{{ question }}}', 'default' => [], ]); $this->end_controls_section(); /* ---------- ICONS / SVG ---------- */ $this->start_controls_section('sec_icons', [ 'label' => __('Icons (SVG)', 'datis'), 'tab' => Controls_Manager::TAB_CONTENT, ]); $this->add_control('icon_plus_svg', [ 'label' => __('Plus Icon (Closed state)', 'datis'), 'type' => Controls_Manager::MEDIA, 'description' => __('Upload an SVG icon for the closed state (plus). Will be rendered inline.', 'datis'), ]); $this->add_control('icon_minus_svg', [ 'label' => __('Minus Icon (Open state)', 'datis'), 'type' => Controls_Manager::MEDIA, 'description' => __('Upload an SVG icon for the open state (minus). Will be rendered inline.', 'datis'), ]); $this->end_controls_section(); /* ---------- STYLE: WRAPPER ---------- */ $this->start_controls_section('sec_style_wrapper', [ 'label' => __('Wrapper', 'datis'), 'tab' => Controls_Manager::TAB_STYLE, ]); $this->add_control('wrapper_max_width', [ 'label' => __('Max Width', 'datis'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', '%'], 'range' => [ 'px' => ['min' => 0, 'max' => 1600], '%' => ['min' => 0, 'max' => 100], ], 'selectors' => [ '{{WRAPPER}} .datis-faq' => 'max-width: {{SIZE}}{{UNIT}};', ], ]); $this->add_control('wapper_gap', [ 'label' => __('Space Between Items', 'datis'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => ['min' => 0, 'max' => 60], ], 'selectors' => [ '{{WRAPPER}} .datis-faq' => 'gap: {{SIZE}}{{UNIT}};', ], ]); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'wrapper_background', 'label' => __('Background', 'datis'), 'types' => ['classic', 'gradient'], 'selector' => '{{WRAPPER}} .datis-faq', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'wrapper_border', 'selector' => '{{WRAPPER}} .datis-faq', ] ); $this->add_control('wrapper_radius', [ 'label' => __('Border Radius', 'datis'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => [ '{{WRAPPER}} .datis-faq' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ]); $this->add_control('wrapper_padding', [ 'label' => __('Padding', 'datis'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .datis-faq' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ]); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'wrapper_shadow', 'selector' => '{{WRAPPER}} .datis-faq', ] ); $this->end_controls_section(); /* ---------- STYLE: ITEM (با تب Normal / Hover / Active) ---------- */ $this->start_controls_section('sec_style_item', [ 'label' => __('Item Container', 'datis'), 'tab' => Controls_Manager::TAB_STYLE, ]); // ابعاد کلی آیتم $this->add_control('item_radius', [ 'label' => __('Border Radius', 'datis'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => [ '{{WRAPPER}} .datis-faq-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ]); $this->add_control('item_margin_bottom', [ 'label' => __('Space Between Items', 'datis'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => ['min' => 0, 'max' => 60], ], 'selectors' => [ '{{WRAPPER}} .datis-faq-item' => 'gap: {{SIZE}}{{UNIT}};', ], ]); $this->add_control('item_padding', [ 'label' => __('Item Inner Padding', 'datis'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .datis-faq-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ]); // تبهای حالتها $this->start_controls_tabs('item_state_tabs'); // Normal $this->start_controls_tab('item_state_normal', [ 'label' => __('Normal', 'datis'), ]); $this->add_group_control( Group_Control_Background::get_type(), [ 'name' => 'item_bg_normal', 'label' => __('Background', 'datis'), 'types' => ['classic', 'gradient'], 'selector' => '{{WRAPPER}} .datis-faq-item', ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'item_border_normal', 'selector' => '{{WRAPPER}} .datis-faq-item', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'item_shadow_normal', 'selector' => '{{WRAPPER}} .datis-faq-item', ] ); $this->end_controls_tab(); // Hover $this->start_controls_tab('item_state_hover', [ 'label' => __('Hover', 'datis'), ]); $this->add_control('item_bg_hover_color', [ 'label' => __('Background Color', 'datis'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .datis-faq-item:hover' => 'background-color: {{VALUE}};', ], ]); $this->add_control('item_border_hover_color', [ 'label' => __('Border Color', 'datis'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .datis-faq-item:hover' => 'border-color: {{VALUE}};', ], ]); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'item_shadow_hover', 'selector' => '{{WRAPPER}} .datis-faq-item:hover', ] ); $this->end_controls_tab(); // Active (is-open) $this->start_controls_tab('item_state_active', [ 'label' => __('Active (Open)', 'datis'), ]); $this->add_control('item_bg_active_color', [ 'label' => __('Background Color', 'datis'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .datis-faq-item.is-open' => 'background-color: {{VALUE}};', ], ]); $this->add_control('item_border_active_color', [ 'label' => __('Border Color', 'datis'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .datis-faq-item.is-open' => 'border-color: {{VALUE}};', ], ]); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'item_shadow_active', 'selector' => '{{WRAPPER}} .datis-faq-item.is-open', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); /* ---------- STYLE: QUESTION (با تب Normal / Hover / Active) ---------- */ $this->start_controls_section('sec_style_question', [ 'label' => __('Question Row', 'datis'), 'tab' => Controls_Manager::TAB_STYLE, ]); // تایپو و چیدمان $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'question_typography', 'selector' => '{{WRAPPER}} .datis-faq-toggle .datis-faq-q', ] ); $this->add_control('question_align', [ 'label' => __('Alignment', 'datis'), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'flex-start' => [ 'title' => __('Left', 'datis'), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => __('Center', 'datis'), 'icon' => 'eicon-text-align-center', ], 'flex-end' => [ 'title' => __('Right', 'datis'), 'icon' => 'eicon-text-align-right', ], ], 'selectors' => [ '{{WRAPPER}} .datis-faq-toggle' => 'justify-content: {{VALUE}};', ], 'toggle' => true, ]); $this->add_control('question_padding', [ 'label' => __('Padding', 'datis'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .datis-faq-toggle' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ]); $this->add_control('question_radius', [ 'label' => __('Border Radius', 'datis'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => [ '{{WRAPPER}} .datis-faq-toggle' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ]); // تبها $this->start_controls_tabs('question_state_tabs'); // Normal $this->start_controls_tab('question_state_normal', [ 'label' => __('Normal', 'datis'), ]); $this->add_control('question_text_color', [ 'label' => __('Text Color', 'datis'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .datis-faq-toggle .datis-faq-q' => 'color: {{VALUE}};', ], ]); $this->add_control('question_bg_color', [ 'label' => __('Background Color', 'datis'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .datis-faq-toggle' => 'background-color: {{VALUE}};', ], ]); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'question_border_normal', 'selector' => '{{WRAPPER}} .datis-faq-toggle', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'question_shadow_normal', 'selector' => '{{WRAPPER}} .datis-faq-toggle', ] ); $this->end_controls_tab(); // Hover $this->start_controls_tab('question_state_hover', [ 'label' => __('Hover', 'datis'), ]); $this->add_control('question_text_hover_color', [ 'label' => __('Text Color', 'datis'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .datis-faq-toggle:hover .datis-faq-q' => 'color: {{VALUE}};', '{{WRAPPER}} .datis-faq-item:hover .datis-faq-toggle .datis-faq-q' => 'color: {{VALUE}};', ], ]); $this->add_control('question_bg_hover_color', [ 'label' => __('Background Color', 'datis'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .datis-faq-toggle:hover' => 'background-color: {{VALUE}};', '{{WRAPPER}} .datis-faq-item:hover .datis-faq-toggle' => 'background-color: {{VALUE}};', ], ]); $this->add_control('question_border_hover_color', [ 'label' => __('Border Color', 'datis'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .datis-faq-toggle:hover' => 'border-color: {{VALUE}};', '{{WRAPPER}} .datis-faq-item:hover .datis-faq-toggle' => 'border-color: {{VALUE}};', ], ]); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'question_shadow_hover', 'selector' => '{{WRAPPER}} .datis-faq-toggle:hover, {{WRAPPER}} .datis-faq-item:hover .datis-faq-toggle', ] ); $this->end_controls_tab(); // Active $this->start_controls_tab('question_state_active', [ 'label' => __('Active (Open)', 'datis'), ]); $this->add_control('question_text_active_color', [ 'label' => __('Text Color', 'datis'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .datis-faq-item.is-open .datis-faq-toggle .datis-faq-q' => 'color: {{VALUE}};', ], ]); $this->add_control('question_bg_active_color', [ 'label' => __('Background Color', 'datis'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .datis-faq-item.is-open .datis-faq-toggle' => 'background-color: {{VALUE}};', ], ]); $this->add_control('question_border_active_color', [ 'label' => __('Border Color', 'datis'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .datis-faq-item.is-open .datis-faq-toggle' => 'border-color: {{VALUE}};', ], ]); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'question_shadow_active', 'selector' => '{{WRAPPER}} .datis-faq-item.is-open .datis-faq-toggle', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); /* ---------- STYLE: ANSWER ---------- */ $this->start_controls_section('sec_style_answer', [ 'label' => __('Answer Content', 'datis'), 'tab' => Controls_Manager::TAB_STYLE, ]); $this->add_responsive_control('answer_height', [ 'label' => __('Height', 'datis'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => ['min' => 0, 'max' => 400], ], 'selectors' => [ '{{WRAPPER}} .datis-faq-panel' => 'height: {{SIZE}}{{UNIT}};', ], ]); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'answer_typography', 'selector' => '{{WRAPPER}} .datis-faq-a', ] ); $this->add_control('answer_color', [ 'label' => __('Text Color', 'datis'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .datis-faq-a' => 'color: {{VALUE}};', ], ]); $this->add_control('answer_bg_color', [ 'label' => __('Background', 'datis'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .datis-faq-panel' => 'background-color: {{VALUE}};', ], ]); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'answer_border', 'selector' => '{{WRAPPER}} .datis-faq-panel', ] ); $this->add_control('answer_radius', [ 'label' => __('Border Radius', 'datis'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', '%'], 'selectors' => [ '{{WRAPPER}} .datis-faq-panel' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ]); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'answer_shadow', 'selector' => '{{WRAPPER}} .datis-faq-panel', ] ); $this->add_control('answer_padding', [ 'label' => __('Padding', 'datis'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .datis-faq-panel' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ]); $this->end_controls_section(); /* ---------- STYLE: ICON ---------- */ $this->start_controls_section('sec_style_icon', [ 'label' => __('Icon', 'datis'), 'tab' => Controls_Manager::TAB_STYLE, ]); $this->add_control('icon_box_width', [ 'label' => __('Icon Width', 'datis'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => ['min' => 16, 'max' => 120], ], 'default' => [ 'size' => 32, 'unit' => 'px', ], 'selectors' => [ '{{WRAPPER}} .datis-faq-icn' => 'width: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .datis-faq-icn .icn-plus' => 'width: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .datis-faq-icn .icn-minus' => 'width: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .datis-faq-icn svg' => 'width: {{SIZE}}{{UNIT}};', ], ]); $this->add_control('icon_box_height', [ 'label' => __('Icon Height', 'datis'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => ['min' => 16, 'max' => 120], ], 'default' => [ 'size' => 32, 'unit' => 'px', ], 'selectors' => [ '{{WRAPPER}} .datis-faq-icn' => 'height: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .datis-faq-icn .icn-plus' => 'height: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .datis-faq-icn .icn-minus' => 'height: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .datis-faq-icn svg' => 'height: {{SIZE}}{{UNIT}};', ], ]); $this->add_control('icon_color', [ 'label' => __('Icon Color (Default SVG)', 'datis'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .datis-faq-icn svg path' => 'stroke: {{VALUE}};', ], ]); $this->add_control('icon_spacing', [ 'label' => __('Space Between Icon & Text', 'datis'), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px'], 'range' => [ 'px' => ['min' => 0, 'max' => 40], ], 'default' => [ 'size' => 16, 'unit' => 'px', ], 'selectors' => [ '{{WRAPPER}} .datis-faq-toggle .datis-faq-icn' => 'margin-inline-start: {{SIZE}}{{UNIT}};', ], ]); $this->end_controls_section(); } /* ---------------- Render ---------------- */ protected function render() { $s = $this->get_settings_for_display(); $items = $s['items'] ?? []; if (empty($items)) { echo '<div class="datis-empty">' . esc_html__('No items found.', 'datis') . '</div>'; return; } $cfg = [ 'accordion' => true, 'rtl' => is_rtl(), ]; echo '<div class="datis-faq" data-settings=\'' . esc_attr(wp_json_encode($cfg)) . '\'>'; foreach ($items as $i => $it) { $is_open = !empty($it['open_by_default']); $qid = $this->get_id() . '-q-' . $i; $aid = $this->get_id() . '-a-' . $i; echo '<div class="datis-faq-item' . ($is_open ? ' is-open' : '') . '">'; echo ' <button type="button" class="datis-faq-toggle" aria-expanded="' . ($is_open ? 'true' : 'false') . '" aria-controls="' . esc_attr($aid) . '" id="' . esc_attr($qid) . '">'; echo ' <span class="datis-faq-icn" aria-hidden="true">'; echo ' <span class="icn-plus">' . $this->get_icon_plus_svg() . '</span>'; echo ' <span class="icn-minus">' . $this->get_icon_minus_svg() . '</span>'; echo ' </span>'; echo ' <span class="datis-faq-q">' . esc_html($it['question'] ?? '') . '</span>'; echo ' </button>'; echo ' <div class="datis-faq-panel" id="' . esc_attr($aid) . '" role="region" aria-labelledby="' . esc_attr($qid) . '"' . ($is_open ? '' : ' hidden') . '>'; echo ' <div class="datis-faq-a">' . wp_kses_post($it['answer'] ?? '') . '</div>'; echo ' </div>'; echo '</div>'; } echo '</div>'; } /* ---------------- Icons Helpers ---------------- */ private function get_icon_plus_svg() { $s = $this->get_settings_for_display(); if (!empty($s['icon_plus_svg']['id'])) { $svg = $this->get_inline_svg_from_media($s['icon_plus_svg']); if (!empty($svg)) { return $svg; } } // Default plus icon return ' <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M20 16L16 16M16 16L12 16M16 16L16 12M16 16L16 20" stroke="#FF5F06" stroke-width="1.5" stroke-linecap="round"/> <path d="M9.33333 4.45051C11.2945 3.31604 13.5714 2.66675 16 2.66675C23.3638 2.66675 29.3333 8.63628 29.3333 16.0001C29.3333 23.3639 23.3638 29.3334 16 29.3334C8.6362 29.3334 2.66666 23.3639 2.66666 16.0001C2.66666 13.5715 3.31596 11.2946 4.45043 9.33342" stroke="#FF5F06" stroke-width="1.5" stroke-linecap="round"/> </svg>'; } private function get_icon_minus_svg() { $s = $this->get_settings_for_display(); if (!empty($s['icon_minus_svg']['id'])) { $svg = $this->get_inline_svg_from_media($s['icon_minus_svg']); if (!empty($svg)) { return $svg; } } // Default minus icon return ' <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M20 16L12 16" stroke="#090625" stroke-width="1.5" stroke-linecap="round"/> <path d="M9.33333 4.45051C11.2945 3.31604 13.5714 2.66675 16 2.66675C23.3638 2.66675 29.3333 8.63628 29.3333 16.0001C29.3333 23.3639 23.3638 29.3334 16 29.3334C8.6362 29.3334 2.66666 23.3639 2.66666 16.0001C2.66666 13.5715 3.31596 11.2946 4.45043 9.33342" stroke="#090625" stroke-width="1.5" stroke-linecap="round"/> </svg>'; } private function get_inline_svg_from_media($media) { if (empty($media['id'])) { return ''; } $file_path = get_attached_file($media['id']); if (!$file_path || !file_exists($file_path)) { return ''; } $svg = file_get_contents($file_path); if (!$svg) { return ''; } $mime = get_post_mime_type($media['id']); if (strpos($mime, 'svg') === false) { return ''; } return $svg; } /* ---------------- Assets ---------------- */ public function __construct($data = [], $args = null) { parent::__construct($data, $args); add_action('elementor/editor/before_enqueue_scripts', [$this, 'enqueue_assets']); add_action('elementor/editor/before_enqueue_styles', [$this, 'enqueue_assets']); add_action('elementor/frontend/before_enqueue_scripts', [$this, 'enqueue_assets']); add_action('elementor/frontend/before_enqueue_styles', [$this, 'enqueue_assets']); } public function enqueue_assets() { wp_enqueue_style( 'datis-faq', DATIS_URI . '/inc/elementor/widgets/datis_faq/css/faq.css', [], DATIS_VER ); wp_enqueue_script( 'datis-faq', DATIS_URI . '/inc/elementor/widgets/datis_faq/js/faq.js', ['jquery'], DATIS_VER, true ); } }
💾 保存文件
← 返回文件管理器