start_controls_section( '_section_Sirv', [ 'label' => __( 'Sirv Content Settings', 'allembed' ), ] ); $this->add_control( 'Sirv_link', [ 'label' => esc_html__( 'Sirv Link', 'allembed' ), 'label_block' => true, 'type' => Controls_Manager::TEXT, 'placeholder' => esc_html__( 'https://your-link.com', 'allembed' ), 'default' =>'https://keepenso.sirv.com/Spins/Trainers/Trainers.spin', ] ); $this->end_controls_section(); $this->start_controls_section( 'Sirv_ttabb', [ 'label' =>esc_html__( 'Sirv Other Settings', 'allembed' ), ] ); $this->add_control( 'width', [ 'label' => esc_html__( 'Width', 'allembed' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ '%', 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1500, 'step' => 5, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 600, ], 'selectors' => [ '{{WRAPPER}} .sirvi iframe' => 'max-width: {{SIZE}}{{UNIT}}', ], ] ); $this->add_control( 'height', [ 'label' => esc_html__( 'Height', 'allembed' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ '%', 'px' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1500, 'step' => 5, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'default' => [ 'unit' => 'px', 'size' => 160, ], 'selectors' => [ '{{WRAPPER}} .sirvi iframe' => 'height: {{SIZE}}{{UNIT}}', ], ] ); $this->end_controls_section(); } /** * 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(); $Sirv_link = $settings['Sirv_link']; ?>