403Webshell
Server IP : 31.214.179.3  /  Your IP : 216.73.217.110
Web Server : Apache
System : Linux hostingsrv125.dondominio.com 6.12.96+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.96-1 (2026-07-20) x86_64
User :  ( 1156851)
PHP Version : 8.5.8
Disable Function : system,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,exec,ini_alter,show_source,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,mail,eval
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /hosting/www/thermatron.es/public/wp-content/plugins/complianz-gdpr/integrations/services/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /hosting/www/thermatron.es/public/wp-content/plugins/complianz-gdpr/integrations/services/vimeo.php
<?php
defined( 'ABSPATH' ) || die( 'you do not have access to this page!' );

add_filter( 'cmplz_known_script_tags', 'cmplz_vimeo_iframetags' );
function cmplz_vimeo_iframetags( $tags ) {
	$tags[] = array(
		'name'        => 'vimeo',
		'placeholder' => 'vimeo',
		'category'    => 'statistics',
		'urls'        => array(
			'vimeo.com',
			'i.vimeocdn.com',
		),
	);
	return $tags;
}

add_filter( 'cmplz_whitelisted_script_tags', 'cmplz_vimeo_whitelist' );
function cmplz_vimeo_whitelist( $tags ) {
	$tags[] = 'dnt=1';
	$tags[] = 'dnt=true';
	return $tags;
}

function cmplz_vimeo_placeholder( $placeholder_src, $src ) {
	// Get id, used only for storing in transient.
	$vimeo_pattern
		= '/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:[a-zA-Z0-9_\-]+)?/i';
	if ( preg_match( $vimeo_pattern, $src, $matches ) ) {
		$vimeo_id = $matches[1];
		$new_src  = cmplz_get_transient( "cmplz_vimeo_image_$vimeo_id" );
		if ( ! $new_src || ! cmplz_file_exists_on_url( $new_src ) ) {
			$response = wp_remote_get( 'http://vimeo.com/api/oembed.json?url=' . $src );
			if ( ! is_wp_error( $response ) && 200 === wp_remote_retrieve_response_code( $response ) ) {
				$data = json_decode( wp_remote_retrieve_body( $response ) );
				if ( ! empty( $data ) && ! empty( $data->thumbnail_url ) ) {
					$thumbnail_url = $data->thumbnail_url;

					// Clean the URL by removing query parameters that might cause issues.
					$parsed_url = wp_parse_url( $thumbnail_url );
					$clean_url  = $parsed_url['scheme'] . '://' . $parsed_url['host'] . $parsed_url['path'];

					// Download the clean URL.
					$placeholder_src = cmplz_download_to_site( $clean_url, 'vimeo' . $vimeo_id );

					// Basic validation - check if it's actually an image.
					if ( $placeholder_src && function_exists( 'getimagesize' ) ) {
						$image_info = getimagesize( $placeholder_src );
						if ( false === $image_info ) {
							// Invalid image, don't use it.
							$placeholder_src = false;
						}
					}

					if ( $placeholder_src ) {
						cmplz_set_transient( "cmplz_vimeo_image_$vimeo_id", $placeholder_src, WEEK_IN_SECONDS );
					}
				}
			}
		} else {
			$placeholder_src = $new_src;
		}
	}
	return $placeholder_src;
}

add_filter( 'cmplz_placeholder_vimeo', 'cmplz_vimeo_placeholder', 10, 2 );

Youez - 2016 - github.com/yon3zu
LinuXploit