芝麻web文件管理V1.00
编辑当前文件:/home/soundframestudio/www/wp-content/plugins/elementor/core/kits/documents/tabs/global-colors.php
start_controls_section( 'section_global_colors', [ 'label' => esc_html__( 'Global Colors', 'elementor' ), 'tab' => $this->get_id(), ] ); $repeater = new Repeater(); $repeater->add_control( 'title', [ 'type' => Controls_Manager::TEXT, 'label_block' => true, 'required' => true, ] ); // Color Value $repeater->add_control( 'color', [ 'type' => Controls_Manager::COLOR, 'label_block' => true, 'selectors' => [ '{{WRAPPER}}' => '--e-global-color-{{_id.VALUE}}: {{VALUE}}', ], 'global' => [ 'active' => false, ], ] ); $default_colors = [ [ '_id' => 'primary', 'title' => esc_html__( 'Primary', 'elementor' ), 'color' => '#6EC1E4', ], [ '_id' => 'secondary', 'title' => esc_html__( 'Secondary', 'elementor' ), 'color' => '#54595F', ], [ '_id' => 'text', 'title' => esc_html__( 'Text', 'elementor' ), 'color' => '#7A7A7A', ], [ '_id' => 'accent', 'title' => esc_html__( 'Accent', 'elementor' ), 'color' => '#61CE70', ], ]; $this->add_control( 'heading_system_colors', [ 'type' => Controls_Manager::HEADING, 'label' => esc_html__( 'System Colors', 'elementor' ), ] ); $this->add_control( 'system_colors', [ 'type' => Global_Style_Repeater::CONTROL_TYPE, 'fields' => $repeater->get_controls(), 'default' => $default_colors, 'item_actions' => [ 'add' => false, 'remove' => false, ], 'separator' => 'after', ] ); $this->add_control( 'heading_custom_colors', [ 'type' => Controls_Manager::HEADING, 'label' => esc_html__( 'Custom Colors', 'elementor' ), ] ); $this->add_control( 'custom_colors', [ 'type' => Global_Style_Repeater::CONTROL_TYPE, 'fields' => $repeater->get_controls(), ] ); $this->end_controls_section(); } }