true, ]; } return $styles; } public function get_scripts() { return [ 'logo-grid', 'entrance' => [ 'condition' => [ 'animate_items' => 'ui-e-grid-animate' ], ] ]; } protected function register_controls() { $this->TRAIT_register_logo_repeater_controls('Logos'); // Repeater Controls $this->start_controls_section( 'section_grid_settings', [ 'label' => __( 'Grid Settings', 'uicore-elements' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'layout', [ 'label' => __( 'Grid Layout', 'uicore-elements' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'inner-border' => __( 'Inner Border', 'uicore-elements' ), 'outer-border' => __( 'Outer Border', 'uicore-elements' ), 'divider' => __( 'Inner Divider', 'uicore-elements' ), ], 'default' => 'inner-border', 'frontend_available' => true, 'style_transfer' => true, // enables the param to be copied/pasted even without selector => [] 'render_type' => 'template', ] ); $this->TRAIT_register_grid_layout_controls(); $this->end_controls_section(); $this->start_controls_section( 'section_logo_settings', [ 'label' => __( 'Logo Settings', 'uicore-elements' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->TRAIT_register_logo_adittional_controls(); $this->end_controls_section(); $this->start_controls_section( 'section_logo_grid', [ 'label' => __( 'Logo Grid', 'uicore-elements' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->TRAIT_register_logos_grid_style_controls(); $this->end_controls_section(); $this->start_controls_section( 'animation_style_grid', [ 'label' => __( 'Animations', 'uicore-elements' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->TRAIT_register_entrance_animations_controls(); $this->TRAIT_register_hover_animation_control( 'Item Hover Animation', [], ['underline'] ); $this->TRAIT_register_hover_animation_control( 'Logo Hover Animation', [], ['underline'] ); $this->end_controls_section(); // Updates and removes grid component controls $this->update_control('columns', [ 'default' => 4, 'desktop_default' => 4, 'tablet_default' => 2, 'mobile_default' => 2, 'render_type' => 'template', 'frontend_available' => true, 'selectors' => [ '{{WRAPPER}} .ui-e-grid' => 'grid-template-columns: repeat({{VALUE}}, minmax(0, 1fr))', ], ]); $this->update_control('gap', [ 'condition' => [ 'layout' => 'inner-border' ], ]); $this->remove_control('masonry'); } protected function render() { if(empty( $this->get_settings_for_display('logo_list'))) { return; } ?>