start_controls_section( 'section_content', [ 'label' => 'Addexion Ad', 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'slot', [ 'label' => __( 'Ad slot token', 'addexion-ads' ), 'type' => \Elementor\Controls_Manager::TEXT, 'placeholder' => 'abc123…', 'description' => __( 'Token of the ad slot, shown on your site page in your Addexion dashboard.', 'addexion-ads' ), 'label_block' => true, ] ); $this->add_control( 'align', [ 'label' => __( 'Alignment', 'addexion-ads' ), 'type' => \Elementor\Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => __( 'Left', 'addexion-ads' ), 'icon' => 'eicon-text-align-left' ], 'center' => [ 'title' => __( 'Center', 'addexion-ads' ), 'icon' => 'eicon-text-align-center' ], 'right' => [ 'title' => __( 'Right', 'addexion-ads' ), 'icon' => 'eicon-text-align-right' ], ], 'default' => 'center', 'toggle' => true, 'selectors' => [ '{{WRAPPER}} .addexion-slot' => 'text-align: {{VALUE}};', ], ] ); $this->end_controls_section(); } protected function render(): void { $settings = $this->get_settings_for_display(); $slot = sanitize_text_field( $settings['slot'] ?? '' ); if ( ! $slot ) { if ( \Elementor\Plugin::$instance->editor->is_edit_mode() ) { echo '