register_controls_section(); $this->style_tab_content(); } protected function register_controls_section() { $this->start_controls_section( 'be_section_text', [ 'label' => esc_html__('Section Text', 'being'), 'description' => esc_html__('Add text', 'being'), // 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'be_clients_title', [ 'label' => esc_html__('Title', 'being'), 'type' => \Elementor\Controls_Manager::TEXT, 'default' => esc_html__('Title', 'being'), 'placeholder' => esc_html__('Title', 'being'), ] ); $this->end_controls_section(); $this->start_controls_section("be_client_section", [ "label" => __("Client Item", "being"), "tab" => Controls_Manager::TAB_CONTENT, ]); $this->add_control( 'be_client_invert', [ 'label' => esc_html__('Invert Image on Dark Mode', 'being'), 'type' => Controls_Manager::SWITCHER, 'default' => "yes", 'description' => esc_html__('Enable to invert image', 'being'), ] ); $repeater = new Repeater(); $repeater->add_control("be_client_image", [ "label" => esc_html__("Upload Client Image", "being"), "type" => Controls_Manager::MEDIA, "default" => [ "url" => Utils::get_placeholder_image_src(), ], ]); $this->add_control("be_client_row", [ "show_label" => false, "type" => Controls_Manager::REPEATER, "fields" => $repeater->get_controls(), "title_field" => esc_html__("Client Item", "being"), "default" => [[]], ]); $this->end_controls_section(); } // style_tab_content protected function style_tab_content() { $this->section_title_style_controls( $this->style_control_id, "Title Color" ); $this->section_style_controls( $this->style_control_id, "Section - Style", ".being-section", "", "", "", false ); } /** * 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(); $invert = ($settings['be_client_invert']=="yes") ? "invert" : ""; ?>

$item) : if (empty($item['be_client_image']["id"])) { $be_client_image = BE_ADDONS_URL . 'assets/img/placeholder.jpg'; $be_client_image_alt = "default image"; } else { $be_client_image = wp_get_attachment_image_url($item['be_client_image']['id'], 'full'); $be_client_image_alt = get_post_meta($item["be_client_image"]["id"], "_wp_attachment_image_alt", true); } ?>
<?php echo esc_attr($be_client_image_alt); ?>
register(new BE_Clients());