HEX
Server: Apache
System: Linux uyu7574470001-7d78c9ff74-xfpwm 4.19.91-21.al7.x86_64 #1 SMP Wed Sep 2 19:47:49 CST 2020 x86_64
User: ()
PHP: 7.4.16
Disabled: chmod,exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,dl,popen,pcntl_exec,socket_accept,socket_bind,socket_clear_error,socket_close,socket_connect,socket_create_listen,socket_create_pair,socket_create,socket_get_option,socket_getpeername,socket_getsockname,socket_last_error,socket_listen,socket_read,socket_recv,socket_recvfrom,socket_select,socket_send,socket_sendto,socket_set_block,socket_set_nonblock,socket_set_option,socket_shutdown,socket_strerror,socket_write,stream_socket_client,stream_socket_server,pfsockopen,disk_total_space,disk_free_space,chown,diskfreespace,getrusage,get_current_user,getmyuid,getmypid,dl,leak,listen,chgrp,link,symlink,dlopen,proc_nice,proc_get_stats,proc_terminate,shell_exec,sh2_exec,posix_getpwuid,posix_getgrgid,posix_kill,ini_restore,mkfifo,dbmopen,dbase_open,filepro,filepro_rowcount,posix_mkfifo,putenv,sleep,fsockopen
Upload Files
File: /usr/home/uyu7574470001/htdocs/wp-content/plugins/tiny-compress-images/src/class-tiny-wp-base.php
<?php
/*
* Tiny Compress Images - WordPress plugin.
* Copyright (C) 2015-2018 Tinify B.V.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

abstract class Tiny_WP_Base {
	const NAME   = 'tiny-compress-images';
	const PREFIX = 'tinypng_';

	private static $wp_version;

	public static function wp_version() {
		if ( is_null( self::$wp_version ) ) {
			// Try to use unmodified version
			include ABSPATH . WPINC . '/version.php';
			if ( isset( $wp_version ) ) {
				self::$wp_version = $wp_version;
			} else {
				self::$wp_version = $GLOBALS['wp_version'];
			}
		}
		return self::$wp_version;
	}

	public static function check_wp_version( $version ) {
		return floatval( self::wp_version() ) >= $version;
	}

	protected function is_xmlrpc_request() {
		return defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST;
	}

	protected function doing_ajax_request() {
		return defined( 'DOING_AJAX' ) && DOING_AJAX;
	}

	protected function is_cli() {
		return defined( 'WP_CLI' ) && WP_CLI;
	}

	protected static function get_prefixed_name( $name ) {
		return self::PREFIX . $name;
	}

	public function __construct() {
		add_action( 'init', $this->get_method( 'init' ) );
		add_action( 'rest_api_init', $this->get_method( 'rest_init' ) );

		if ( self::is_xmlrpc_request() ) {
			add_action( 'init', $this->get_method( 'xmlrpc_init' ) );
		} elseif ( self::doing_ajax_request() ) {
			add_action( 'admin_init', $this->get_method( 'ajax_init' ) );
		} elseif ( is_admin() ) {
			add_action( 'admin_init', $this->get_method( 'admin_init' ) );
			add_action( 'admin_menu', $this->get_method( 'admin_menu' ) );
		}

		if ( self::is_cli() ) {
			add_action( 'cli_init', $this->get_method( 'cli_init' ) );
		}
	}

	protected function get_method( $name ) {
		return array( $this, $name );
	}

	protected function get_static_method( $name ) {
		return array( get_class( $this ), $name );
	}

	protected function get_user_id() {
		return get_current_user_id();
	}

	protected function check_ajax_referer() {
		return check_ajax_referer( 'tiny-compress', '_nonce', false );
	}

	public function init() {
	}

	public function xmlrpc_init() {
	}

	public function ajax_init() {
	}

	public function admin_init() {
	}

	public function admin_menu() {
	}

	public function rest_init() {
	}

	public function cli_init() {
	}
}