芝麻web文件管理V1.00
编辑当前文件:/home/dcqnetm/novia/wp-content/plugins/image-optimization/modules/optimization/module.php
get_css_assets_url( 'control' ), [], IMAGE_OPTIMIZATION_VERSION, ); wp_enqueue_script( 'image-optimization-control', $this->get_js_assets_url( 'control' ), $asset_file['dependencies'], IMAGE_OPTIMIZATION_VERSION, true ); wp_set_script_translations( 'image-optimization-control', 'image-optimization' ); wp_localize_script( 'image-optimization-control', 'imageOptimizerControlSettings', [ 'optimizeSingleImageNonce' => wp_create_nonce( Optimize_Single_Image::NONCE_NAME ), 'restoreSingleImageNonce' => wp_create_nonce( Restore_Single::NONCE_NAME ), ] ); } public static function load_template( $path, $name, $args = [] ): bool { $templates_path = sprintf( '%s/templates/%s/%s.php', dirname( __FILE__ ), $path, $name ); try { load_template( $templates_path, false, $args ); } catch ( Throwable $t ) { return false; } return true; } /** * Module constructor. */ public function __construct() { $this->register_components(); $this->register_routes(); add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_scripts' ] ); add_action( 'elementor/editor/after_enqueue_scripts', [ $this, 'enqueue_scripts' ] ); } }