[ SYSTEM ]: Linux wordpress 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
[ SERVER ]: Apache/2.4.66 (Debian) | PHP: 8.2.30
[ USER ]: www-data | IP: 172.19.30.54
GEFORCE FILE MANAGER
/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
elementor
/
app
/
modules
/
import-export
/
runners
/
import
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 elementor-content.php
4,440 B
SET
[ EDIT ]
|
[ DEL ]
📄 import-runner-base.php
1,144 B
SET
[ EDIT ]
|
[ DEL ]
📄 plugins.php
1,686 B
SET
[ EDIT ]
|
[ DEL ]
📄 taxonomies.php
3,828 B
SET
[ EDIT ]
|
[ DEL ]
📄 templates.php
2,436 B
SET
[ EDIT ]
|
[ DEL ]
📄 wp-content.php
3,400 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: plugins.php
<?php namespace Elementor\App\Modules\ImportExport\Runners\Import; use Elementor\Core\Utils\Collection; use Elementor\Core\Utils\Plugins_Manager; use Elementor\Core\Utils\Str; class Plugins extends Import_Runner_Base { /** * @var Plugins_Manager */ private $plugins_manager; public function __construct( $plugins_manager = null ) { if ( $plugins_manager ) { $this->plugins_manager = $plugins_manager; } else { $this->plugins_manager = new Plugins_Manager(); } } public static function get_name(): string { return 'plugins'; } public function should_import( array $data ) { return ( isset( $data['include'] ) && in_array( 'plugins', $data['include'], true ) && ! empty( $data['manifest']['plugins'] ) && ! empty( $data['selected_plugins'] ) ); } public function import( array $data, array $imported_data ) { $plugins = $data['selected_plugins']; $plugins_collection = ( new Collection( $plugins ) ) ->map( function ( $item ) { if ( ! Str::ends_with( $item['plugin'], '.php' ) ) { $item['plugin'] .= '.php'; } return $item; } ); $slugs = $plugins_collection ->map( function ( $item ) { return $item['plugin']; } ) ->all(); $installed = $this->plugins_manager->install( $slugs ); $activated = $this->plugins_manager->activate( $installed['succeeded'] ); $ordered_activated_plugins = $plugins_collection ->filter( function ( $item ) use ( $activated ) { return in_array( $item['plugin'], $activated['succeeded'], true ); } ) ->map( function ( $item ) { return $item['name']; } ) ->all(); $result['plugins'] = $ordered_activated_plugins; return $result; } }