-1, 'post_type' => 'wpcf7_contact_form'); $be_forms = get_posts($be_cf_args); $be_cfa = ['0' => esc_html__('Select Form', 'being')]; if ($be_forms) { foreach ($be_forms as $be_form) { $be_cfa[$be_form->ID] = $be_form->post_title; } } else { $be_cfa[esc_html__('No contact form found', 'being')] = 0; } return $be_cfa; } /** * Register the widget controls. * * Adds different input fields to allow the user to change and customize the widget settings. * * @since 1.0.0 * * @access protected */ protected function register_controls() { $this->register_controls_section(); $this->style_tab_content(); } protected function register_controls_section() { // layout Panel $this->start_controls_section( 'be_contact_title_control_setting', [ 'label' => esc_html__('Contact settings', 'being'), ] ); $this->add_control( 'be_contact_title', [ 'label' => esc_html__('Content Title', 'being'), 'description' => be_get_allowed_html_desc('intermediate'), 'type' => Controls_Manager::TEXT, 'default' => be_kses('Title', 'being'), 'label_block' => true, ] ); $repeater = new Repeater(); $repeater->add_control("be_contact_title", [ "label" => esc_html__("Title", "being"), 'type' => Controls_Manager::TEXT, 'default' => be_kses('Title', 'being'), 'label_block' => true, ]); $repeater->add_control( 'be_contact_description', [ 'label' => esc_html__('Description', 'textdomain'), 'type' => \Elementor\Controls_Manager::WYSIWYG, 'default' => esc_html__('Description', 'textdomain'), 'placeholder' => esc_html__('Type your description here', 'textdomain'), ] ); $this->add_control("be_contact_row", [ "show_label" => false, "type" => Controls_Manager::REPEATER, "fields" => $repeater->get_controls(), "title_field" => esc_html__("Contact Item", "being"), "default" => [[]], ]); $this->end_controls_section(); $this->start_controls_section( 'be_contact', [ 'label' => esc_html__('Contact Form', 'being'), ] ); $this->add_control( 'be_select_contact_form', [ 'label' => esc_html__('Select Form', 'being'), 'type' => Controls_Manager::SELECT, 'default' => '0', 'options' => $this->get_be_contact_form(), ] ); $this->end_controls_section(); } // style_tab_content protected function style_tab_content() { $this->section_style_controls( $this->style_control_id, "Section - Style", ".being-section", "", "", "", true ); } /** * Render the widget output on the frontend. * * Written in PHP and used to generate the final HTML. * * @since 1.0.0 * * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); ?>

' . esc_html__('Please Select contact form.', 'being') . '

'; ?>
    $item) : ?>
register(new BE_Contact());