Elementor\Element_Section::before_render PHP Метод

before_render() публичный Метод

public before_render ( )
    public function before_render()
    {
        $section_type = $this->get_data('isInner') ? 'inner' : 'top';
        $this->add_render_attribute('wrapper', 'class', ['elementor-section', 'elementor-element', 'elementor-element-' . $this->get_id(), 'elementor-' . $section_type . '-section']);
        $settings = $this->get_settings();
        foreach ($this->get_class_controls() as $control) {
            if (empty($settings[$control['name']])) {
                continue;
            }
            if (!$this->is_control_visible($control)) {
                continue;
            }
            $this->add_render_attribute('wrapper', 'class', $control['prefix_class'] . $settings[$control['name']]);
        }
        if (!empty($settings['animation'])) {
            $this->add_render_attribute('wrapper', 'data-animation', $settings['animation']);
        }
        $this->add_render_attribute('wrapper', 'data-element_type', $this->get_name());
        ?>
		<section <?php 
        echo $this->get_render_attribute_string('wrapper');
        ?>
>
			<?php 
        if ('video' === $settings['background_background']) {
            if ($settings['background_video_link']) {
                $video_id = Utils::get_youtube_id_from_url($settings['background_video_link']);
                ?>
					<div class="elementor-background-video-container elementor-hidden-phone">
						<?php 
                if ($video_id) {
                    ?>
							<div class="elementor-background-video" data-video-id="<?php 
                    echo $video_id;
                    ?>
"></div>
						<?php 
                } else {
                    ?>
							<video class="elementor-background-video elementor-html5-video" src="<?php 
                    echo $settings['background_video_link'];
                    ?>
" autoplay loop muted></video>
						<?php 
                }
                ?>
					</div>
				<?php 
            }
        }
        if ('classic' === $settings['background_overlay_background']) {
            ?>
				<div class="elementor-background-overlay"></div>
			<?php 
        }
        ?>
			<div class="elementor-container elementor-column-gap-<?php 
        echo esc_attr($settings['gap']);
        ?>
">
				<div class="elementor-row">
		<?php 
    }