start_controls_section( '_section_spotify', [ 'label' => __( 'Spotify Player Content Settings', 'allembed' ), ] ); $this->add_control( 'spotify_link', [ 'label' => esc_html__( 'Spotify Link', 'allembed' ), 'label_block' => true, 'type' => Controls_Manager::TEXT, 'placeholder' => esc_html__( 'https://your-link.com', 'allembed' ), 'default' =>'https://open.spotify.com/embed/album/0S0KGZnfBGSIssfF54WSJh', ] ); $this->end_controls_section(); $this->start_controls_section( 'you_ttabb', [ 'label' =>esc_html__( 'Spotify Player 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}} .spoty 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' => 490, ], 'selectors' => [ '{{WRAPPER}} .spoty 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(); $spotify_link = $settings['spotify_link']; ?>