PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/news36.travelguides4you.com/video2/wp-content/plugins/elementor/core/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //home/trave494/news36.travelguides4you.com/video2/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 ( ! $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 );
	}
}