at path:
ROOT
/
wp-content
/
plugins
/
elementor
/
core
/
wp-api.php
run:
R
W
Run
admin
DIR
2026-02-06 04:31:44
R
W
Run
app
DIR
2026-02-06 04:31:44
R
W
Run
base
DIR
2026-02-06 04:31:44
R
W
Run
behaviors
DIR
2026-02-06 04:31:43
R
W
Run
breakpoints
DIR
2026-02-06 04:31:44
R
W
Run
common
DIR
2026-02-06 04:31:44
R
W
Run
database
DIR
2026-02-06 04:31:44
R
W
Run
debug
DIR
2026-02-06 04:31:44
R
W
Run
document-types
DIR
2026-02-06 04:31:44
R
W
Run
dynamic-tags
DIR
2026-02-06 04:31:44
R
W
Run
editor
DIR
2026-02-06 04:31:44
R
W
Run
experiments
DIR
2026-02-06 04:31:44
R
W
Run
files
DIR
2026-02-06 04:31:44
R
W
Run
frontend
DIR
2026-02-06 04:31:44
R
W
Run
isolation
DIR
2026-02-06 04:31:44
R
W
Run
kits
DIR
2026-02-06 04:31:44
R
W
Run
logger
DIR
2026-02-06 04:31:44
R
W
Run
page-assets
DIR
2026-02-06 04:31:44
R
W
Run
responsive
DIR
2026-02-06 04:31:44
R
W
Run
role-manager
DIR
2026-02-06 04:31:44
R
W
Run
settings
DIR
2026-02-06 04:31:44
R
W
Run
upgrade
DIR
2026-02-06 04:31:44
R
W
Run
utils
DIR
2026-02-06 04:31:44
R
W
Run
documents-manager.php
20.34 KB
2026-02-06 04:31:44
R
W
Run
Delete
Rename
modules-manager.php
3.46 KB
2026-02-06 04:31:44
R
W
Run
Delete
Rename
wp-api.php
1.32 KB
2026-02-06 04:31:44
R
W
Run
Delete
Rename
error_log
up
📄
wp-api.php
Save
<?php namespace Elementor\Core; use Elementor\Core\Utils\Collection; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * This class is responsible for the interaction with WordPress Core API. * The main benefit is making it easy to mock in testing * and it can help to create unit tests without the hustle of mocking WordPress itself. */ class Wp_Api { /** * @var Collection */ private $plugins; /** * @return Collection */ public function get_plugins() { if ( ! function_exists( 'get_plugins' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } if ( ! $this->plugins ) { $this->plugins = new Collection( get_plugins() ); } return $this->plugins; } /** * @return Collection */ public function get_active_plugins() { return $this->get_plugins() ->only( get_option( 'active_plugins' ) ); } /** * @return object|array */ public function plugins_api( $action, $args ) { return plugins_api( $action, $args ); } /** * @return bool */ public function is_plugin_active( $plugin ) { return is_plugin_active( $plugin ); } /** * @return bool|int|null|true */ public function activate_plugin( $plugin ) { return activate_plugin( $plugin ); } public function wp_attachment_is_image( $post = null ) { return wp_attachment_is_image( $post ); } }