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

use Templately\Core\Platform\Elementor;
use WP_Error;
use WP_REST_Request;
use WP_REST_Response;

/**
 * As SavedTemplates is enabled in Elementor.
 * So, this class will represent Elementor's Templates Feature.
 *
 * @method Elementor platform( $id )
 *
 * @since 2.0.0
 *
 * @link https://templately.com
 */
class SavedTemplates extends API {
	private $endpoint = 'saved-templates';

	public function permission_check( WP_REST_Request $request ) {
		$this->request = $request;
		$_route        = $request->get_route();
		$_id           = (int) $this->get_param( 'id', 0 );

		if( $_route === "/templately/v1/saved-templates/delete" && ! (current_user_can( 'delete_post', $_id ) && get_post_type($_id) === "elementor_library")) {
			return $this->error('invalid_permission', __( 'Sorry, you do not have permission to delete this template.', 'templately' ), 'saved-templates/delete', 403 );
		}
		return true;
	}

	public function register_routes() {
		$this->get( $this->endpoint, [ $this, 'get_saved_templates' ] );
		$this->post($this->endpoint . '/delete', [ $this, 'delete' ] );
	}

	/**
	 * Get all the saved templates from Elementor library.
	 *
	 * @param WP_REST_Request $request
	 *
	 * @return array
	 */
	public function get_saved_templates( WP_REST_Request $request) {
		$platform = $this->get_param( 'platform', 'elementor' );
		return $this->platform( $platform )->get_saved_templates( $request->get_params() );
	}

	/**
	 * Delete saved template.
	 *
	 * @param WP_REST_Request $request
	 *
	 * @return WP_Error|WP_REST_Response
	 */
	public function delete( WP_REST_Request $request ){
		$platform = $this->get_param( 'platform', 'elementor' );
		return $this->platform( $platform )->delete( $request->get_params() );
	}
}

Filemanager

Name Type Size Permission Actions
AIContent.php File 25.11 KB 0640
API.php File 6.33 KB 0640
Categories.php File 1.06 KB 0640
Conditions.php File 3.87 KB 0640
Dependencies.php File 12.41 KB 0640
FullSiteImport.php File 252 B 0640
Import.php File 6.81 KB 0640
Items.php File 14.25 KB 0640
Login.php File 8.08 KB 0640
MyClouds.php File 7.71 KB 0640
Profile.php File 5.42 KB 0640
SavedTemplates.php File 1.73 KB 0640
SignUp.php File 2.64 KB 0640
Tags.php File 866 B 0640
TemplateTypes.php File 1.85 KB 0640
ThemeBuilderApi.php File 1.82 KB 0640
WorkSpaces.php File 9.79 KB 0640
Filemanager