403Webshell
Server IP : 27.254.66.5  /  Your IP : 216.73.217.39
Web Server : Apache/2
System : Linux cs82.hostneverdie.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User : technic2 ( 1951)
PHP Version : 7.4.30
Disable Function : apache_child_terminate, apache_setenv, define_syslog_variables, escapeshellarg, escapeshellcmd,exec, fp, fput, highlight_file, ini_alter, ini_restore, inject_code, passthru,phpAds_remoteInfo, phpAds_XmlRpc,phpAds_xmlrpcDecode, phpAds_xmlrpcEncode, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid,posix_setuid, posix_setuid, posix_uname,proc_open,proc_close, proc_get_status, proc_nice, proc_terminate, shell_exec, syslog, system, xmlrpc_entity_decode, show_source,sleep,pcntl_exec,virtual,suexec,dbmopen,dl,symlink,disk_free_space,diskfreespace,leak
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/technic2/public_html/old-website/wp-content/plugins/polylang/modules/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/technic2/public_html/old-website/wp-content/plugins/polylang/modules/plugins/as3cf.php
<?php

/**
 * A class to manage the integration with WP Offload Media Lite.
 * Version tested: 2.1.1
 *
 * @since 2.6
 */
class PLL_AS3CF {
	private $is_media_translated;

	/**
	 * Initializes filters and actions.
	 *
	 * @since 2.6
	 */
	public function init() {
		add_filter( 'pll_copy_post_metas', array( $this, 'copy_post_metas' ) );
		add_action( 'delete_attachment', array( $this, 'check_translated_media' ), 5 ); // Before Polylang deletes the translations information.
		add_action( 'delete_attachment', array( $this, 'prevent_file_deletion' ), 15 ); // Between Polylang and WP Offload Media.
	}

	/**
	 * Synchronizes post metas
	 *
	 * @since 2.6
	 *
	 * @param array $metas List of custom fields names.
	 * @return array
	 */
	public function copy_post_metas( $metas ) {
		$metas[] = 'amazonS3_info';
		$metas[] = 'as3cf_filesize_total';
		return $metas;
	}

	/**
	 * Checks if the deleted attachment was translated and stores the information.
	 *
	 * @since 2.6
	 *
	 * @param int $post_id Id of the attachment being deleted.
	 */
	public function check_translated_media( $post_id ) {
		$this->is_media_translated[ $post_id ] = ( count( pll_get_post_translations( $post_id ) ) > 1 );
	}

	/**
	 * Deletes the WP Offload Media information from the attachment being deleted.
	 * That way WP Offload Media won't delete the file stored in the cloud.
	 * Done after Polylang has deleted the translations informations, to avoid the synchronization of the deletion
	 * and of course before WP Offload Media deletes the file, normally at priority 20.
	 *
	 * @since 2.6
	 *
	 * @param int $post_id Id of the attachment being deleted.
	 */
	public function prevent_file_deletion( $post_id ) {
		if ( ! empty( $this->is_media_translated[ $post_id ] ) ) {
			delete_post_meta( $post_id, 'amazonS3_info' );
			delete_post_meta( $post_id, 'as3cf_filesize_total' );
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit