'بررسی وضعیت', 'text_color' => '#ffffff', 'text_size' => '16', 'button_bg_color' => '#0073aa', ), $atts); ob_start(); ?>
start_controls_section('section_content', [ 'label' => 'Button Settings', ]); $this->add_control('button_text', [ 'label' => 'Button Text', 'type' => \Elementor\Controls_Manager::TEXT, 'default' => 'بررسی وضعیت', ]); $this->add_control('text_color', [ 'label' => 'Text Color', 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#ffffff', ]); $this->add_control('button_bg_color', [ 'label' => 'Button Background Color', 'type' => \Elementor\Controls_Manager::COLOR, 'default' => '#0073aa', ]); $this->add_control('text_size', [ 'label' => 'Text Size (px)', 'type' => \Elementor\Controls_Manager::NUMBER, 'default' => 16, ]); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); echo do_shortcode('[postex_tracking_form button_text="' . esc_attr($settings['button_text']) . '" text_color="' . esc_attr($settings['text_color']) . '" button_bg_color="' . esc_attr($settings['button_bg_color']) . '" text_size="' . esc_attr($settings['text_size']) . '" ]'); } } $widgets_manager->register(new Postexketab_Tracking_Widget()); }); function postexketab_tracking_vc_map() { if (function_exists('vc_map')) { vc_map(array( 'name' => 'Postex Tracking', 'base' => 'postex_tracking_form', 'category' => 'Postex', 'params' => array( array( 'type' => 'textfield', 'heading' => 'Button Text', 'param_name' => 'button_text', 'value' => 'بررسی وضعیت' ), array( 'type' => 'colorpicker', 'heading' => 'Text Color', 'param_name' => 'text_color', 'value' => '#ffffff' ), array( 'type' => 'colorpicker', 'heading' => 'Button Background Color', 'param_name' => 'button_bg_color', 'value' => '#0073aa' ), array( 'type' => 'textfield', 'heading' => 'Text Size (px)', 'param_name' => 'text_size', 'value' => '16' ) ) )); } } add_action('vc_before_init', 'postexketab_tracking_vc_map');