Tribe__Dependency::add_registered_plugin( string $main_class, null|string $version = null, null|string $path = null, array $dependencies = array() )

Adds a plugin to the active list


Parameters

$main_class

(string) (Required) Main/base class for this plugin

$version

(null|string) (Optional) Version number of plugin

Default value: null

$path

(null|string) (Optional) Path to the main plugin/bootstrap file

Default value: null

$dependencies

(array) (Optional) An array of dependencies for a plugin

Default value: array()


Top ↑

Source

File: src/Tribe/Dependency.php

		public function add_registered_plugin( $main_class, $version = null, $path = null, $dependencies = array() ) {

			$plugin = array(
				'class'        => $main_class,
				'version'      => $version,
				'path'         => $path,
				'dependencies' => $dependencies,
			);

			$this->registered_plugins[ $main_class ] = $plugin;

			if ( $path ) {
				$this->admin_messages[ $main_class ] = new Tribe__Admin__Notice__Plugin_Download( $path );
			}

		}

Top ↑

Changelog

Changelog
Version Description
4.9 Introduced.