芝麻web文件管理V1.00
编辑当前文件:/home/seolotod/critterchoice.com/wp-content/themes/rehub-theme/rehub-elementor/wpsm-box.php
start_controls_section( 'section_control_wpsm_box', [ 'label' => esc_html__('Control', 'rehub-theme'), ] ); $this->add_control( 'type', [ 'label' => esc_html__('Box type', 'rehub-theme'), 'type' => Controls_Manager::SELECT, 'default' => 'green', 'options' => [ 'title' => esc_html__('Titlebox', 'rehub-theme'), 'info' => esc_html__('Info', 'rehub-theme'), 'warning' => esc_html__('Warning', 'rehub-theme'), 'error' => esc_html__('Error', 'rehub-theme'), 'download' => esc_html__('Download', 'rehub-theme'), 'green' => esc_html__('Green color box', 'rehub-theme'), 'gray' => esc_html__('Gray color box', 'rehub-theme'), 'blue' => esc_html__('Blue color box', 'rehub-theme'), 'red' => esc_html__('Red color box', 'rehub-theme'), 'yellow' => esc_html__('Yellow color box', 'rehub-theme'), 'dashed_border' => esc_html__('Dashed', 'rehub-theme'), 'solid_border' => esc_html__('Solid border', 'rehub-theme'), ] ] ); $this->add_control( 'title', [ 'label' => esc_html__('Title', 'rehub-theme'), 'type' => Controls_Manager::TEXT, 'default' => 'Title', 'condition' => [ 'type' => 'title' ], ] ); $this->add_control( 'color', [ 'label' => esc_html__( 'Color', 'rehub-theme' ), 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#fb7203', 'condition' => [ 'type' => 'title' ], 'selectors' => [ '{{WRAPPER}} .wpsm-titlebox' => 'border-color: {{VALUE}}', '{{WRAPPER}} .wpsm-titlebox > strong:first-child' => 'color: {{VALUE}}', ], ]); $this->add_control( 'float', [ 'label' => esc_html__('Box float', 'rehub-theme'), 'type' => Controls_Manager::SELECT, 'default' => 'none', 'options' => [ 'none' => esc_html__('None', 'rehub-theme'), 'left' => esc_html__('Left', 'rehub-theme'), 'right' => esc_html__('Right', 'rehub-theme'), ] ] ); $this->add_control( 'textalign', [ 'label' => esc_html__('Text align', 'rehub-theme'), 'type' => Controls_Manager::SELECT, 'default' => 'left', 'options' => [ 'left' => esc_html__('Left', 'rehub-theme'), 'right' => esc_html__('Right', 'rehub-theme'), 'justify' => esc_html__('Justify', 'rehub-theme'), 'center' => esc_html__('Center', 'rehub-theme'), ] ] ); $this->add_control( 'content', [ 'label' => esc_html__( 'Content', 'rehub-theme' ), 'type' => Controls_Manager::WYSIWYG, 'default' => esc_html__( 'Box Content', 'rehub-theme' ), 'show_label' => false, ] ); $this->end_controls_section(); } /* Widget output Rendering */ protected function render() { $settings = $this->get_settings_for_display(); ?>
get_render_attribute_string( "content" ).'>'.$settings['content'].'
';?>
widgets_manager->register( new Widget_Wpsm_Box );