PHP 8.2.30
Preview: wp-api.php Size: 1.32 KB
//proc/thread-self/root/home/byroehnu/geniuskidsacademy.org/wp-content/plugins/elementor/core/wp-api.php

<?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 );
	}
}

Directory Contents

Dirs: 23 × Files: 3

Name Size Perms Modified Actions
admin DIR
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
app DIR
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
base DIR
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
behaviors DIR
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
common DIR
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
database DIR
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
debug DIR
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
editor DIR
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
files DIR
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
frontend DIR
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
isolation DIR
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
kits DIR
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
logger DIR
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
settings DIR
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
upgrade DIR
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
utils DIR
- drwxr-xr-x 2026-03-16 08:30:56
Edit Download
20.34 KB lrw-r--r-- 2026-02-04 08:59:27
Edit Download
3.46 KB lrw-r--r-- 2026-02-04 08:59:27
Edit Download
1.32 KB lrw-r--r-- 2026-02-04 08:59:27
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).