HEX
Server: Apache/2
System: Linux server-27-254-144-72.da.direct 5.10.0-33-amd64 #1 SMP Debian 5.10.226-1 (2024-10-03) x86_64
User: pokaorgani (1114)
PHP: 8.1.33
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/pokaorgani/public_html/wp-content/themes/sydney/inc/integrations/wpml/class-sydney-wpml.php
<?php

/**
 * Integration with WPML for custom Elementor blocks
 */

class Sydney_WPML {

    public function __construct() {
		add_filter( 'wpml_elementor_widgets_to_translate', array( $this, 'translatable_widgets' ) );
	}

	public function translatable_widgets( $widgets ) {

		$widgets[ 'athemes-testimonials' ] = [
			'conditions' => [ 'widgetType' => 'athemes-testimonials' ],
			'fields'     => [],
			'integration-class' => 'Sydney_WPML_Elementor_Testimonials',
		];

		$widgets[ 'athemes-employee-carousel' ] = [
			'conditions' => [ 'widgetType' => 'athemes-employee-carousel' ],
			'fields'     => [],
			'integration-class' => 'Sydney_WPML_Elementor_Employees',
		];
		
		$widgets[ 'athemes-portfolio' ] = [
			'conditions' => [ 'widgetType' => 'athemes-portfolio' ],
			'fields'     => [],
			'integration-class' => 'Sydney_WPML_Elementor_Portfolio',
		];		

		$widgets[ 'athemes-posts' ] = [
			'conditions' => [ 'widgetType' => 'athemes-posts' ],
			'fields'     => [
				[
					'field'       => 'see_all_text',
					'type'        => __( '[aThemes Posts] See all button text', 'sydney' ),
					'editor_type' => 'LINE'
				],			 		  
			],
		];
					
		$this->load_integration_classes();

		return $widgets;
	}
	
	private function load_integration_classes() {
		require get_template_directory() . '/inc/integrations/wpml/class-sydney-wpml-testimonials.php';
		require get_template_directory() . '/inc/integrations/wpml/class-sydney-wpml-employee-carousel.php';
		require get_template_directory() . '/inc/integrations/wpml/class-sydney-wpml-portfolio.php';
	}
}

$sydney_wpml = new Sydney_WPML();