experiments->is_feature_active( 'e_optimized_markup' ); } protected function is_dynamic_content(): bool { return false; } protected function register_controls() { $this->start_controls_section( 'section_layout', [ 'label' => __('Layout', 'pixel-gallery'), 'tab' => Controls_Manager::TAB_CONTENT, ] ); //Global $this->register_grid_controls('ruby'); $this->register_global_height_controls('ruby'); /** * Justified Gallery Controls */ $this->register_justified_gallery_controls(); $this->register_title_tag_controls(); $this->register_show_meta_controls(); $this->register_alignment_controls('ruby'); $this->register_thumbnail_size_controls(); //Global Lightbox Controls $this->register_lightbox_controls(); $this->register_link_target_controls(); $this->end_controls_section(); //Repeater $this->start_controls_section( 'section_item_content', [ 'label' => __('Items', 'pixel-gallery'), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $repeater = new Repeater(); $repeater->start_controls_tabs('tabs_item_content'); $repeater->start_controls_tab( 'tab_item_content', [ 'label' => esc_html__('Content', 'pixel-gallery'), ] ); $this->register_repeater_media_controls($repeater); $this->register_repeater_title_controls($repeater); $this->register_repeater_meta_controls($repeater); $this->register_repeater_readmore_controls($repeater); $this->register_repeater_custom_url_controls($repeater); $this->register_repeater_hidden_item_controls($repeater); $repeater->end_controls_tab(); $repeater->start_controls_tab( 'tab_item_grid', [ 'label' => esc_html__('Grid', 'pixel-gallery'), ] ); $this->register_repeater_grid_controls($repeater, 'ruby'); $this->register_repeater_item_height_controls($repeater, 'ruby'); $repeater->end_controls_tab(); $repeater->end_controls_tabs(); $this->register_repeater_items_controls($repeater); $this->end_controls_section(); //Style $this->start_controls_section( 'pg_section_style', [ 'label' => esc_html__('Items', 'pixel-gallery'), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'item_bg_color', [ 'label' => esc_html__('Background Color', 'pixel-gallery'), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .pg-ruby-content' => 'background-color: {{VALUE}};', '{{WRAPPER}} .pg-ruby-item, {{WRAPPER}} .pg-ruby-content' => 'box-shadow: 0 0 0 0px {{VALUE}};', '{{WRAPPER}} .pg-ruby-item:hover, {{WRAPPER}} .pg-ruby-item:hover .pg-ruby-content' => 'box-shadow: 0 0 0 10px {{VALUE}};', ], ] ); $this->add_responsive_control( 'content_padding', [ 'label' => esc_html__('Padding', 'pixel-gallery'), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => ['px', 'em', '%'], 'selectors' => [ '{{WRAPPER}} .pg-ruby-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); //Global Title Controls $this->register_title_controls('ruby'); //Global meta Controls $this->register_meta_controls('ruby'); //Global Readmore Controls $this->register_readmore_controls('ruby'); //Clip Path Controls $this->register_clip_path_controls('ruby'); } public function render_items() { $settings = $this->get_settings_for_display(); $id = 'pg-ruby-' . $this->get_id(); $slide_index = 1; foreach ($settings['items'] as $index => $item) : $attr_name = 'grid-item' . $index; $this->add_render_attribute($attr_name, 'class', 'pg-ruby-item pg-item elementor-repeater-item-' . esc_attr($item['_id']), true); /** * Render Video Inject Here * Video Would be work on Media File & Lightbox * @since 1.0.0 */ if ($item['media_type'] == 'video') { $this->render_video_frame($item, $attr_name, $id); } ?>