HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wptrinityconsulting/wp-content/plugins/finbuzz-core/elementor/widgets/rt-parallax.php
<?php
/**
 * @author  RadiusTheme
 * @since   1.0
 * @version 1.0
 */

namespace radiustheme\Finbuzz_Core;
use Elementor\Widget_Base;
use Elementor\Controls_Manager;



if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class RT_Parallax extends Widget_Base {
    private function rt_load_scripts(){
		wp_enqueue_script( 'tweenmax' );
        wp_enqueue_script( 'rt-wow' );
        wp_enqueue_style( 'animate' );
	}
    public function get_name() {
		return 'rt-parallax';
	}

	public function get_title() {
		return 'RT Parallax Animation';
	}

	public function get_icon() {
		return 'fa fa-registered';
	}

	public function get_categories() {
		return array( FINBUZZ_CORE_THEME_PREFIX . '-widgets' );
	}
	protected function register_controls() {
		$this->start_controls_section(
			'sec_general',
			[
				'label' => esc_html__( 'General', 'finbuzz-core' ),
				'tab'   => Controls_Manager::TAB_CONTENT,
			]
		);

	


		$repeater = new \Elementor\Repeater();

		$repeater->add_control(
			'animated_image',
			[
				'label'   => __( 'Animated Image', 'finbuzz-core' ),
				'type'    => \Elementor\Controls_Manager::MEDIA,
				'default' => [
					'url' => \Elementor\Utils::get_placeholder_image_src(),
				],
			]
		);

		$this->add_control(
			'animation_list',
			[
				'label'  => __( 'Animated Image List', 'finbuzz-core' ),
				'type'   => \Elementor\Controls_Manager::REPEATER,
				'fields' => $repeater->get_controls(),
			]
		);

		$this->end_controls_section();

	}

	protected function render() {
		$data = $this->get_settings();
        $this->rt_load_scripts();
		$animated_list = $data['animation_list'];
		if ( $animated_list ):
			$img_count = 1;
			foreach ( $animated_list as $list ) {
				if ( $list['animated_image']['id'] ) {
					?>
					<div class="motion-effects-wrap rt-parallax-img">
						<ul class="element-list d-none d-xl-block">
							<li class="motion-effects1">
							
								<img
											src="<?php echo esc_url( $list['animated_image']['url'] ); ?>"
											alt="<?php echo esc_attr( 'Animated Image' ) ?>"
									>
						
							</li>
						</ul>
					</div>
                   
					<?php
					$img_count ++;
				}
			}
		endif;
	}

}