PluginProbe
Pods – Custom Content Types and Fields / 2.8.23.5
Pods – Custom Content Types and Fields v2.8.23.5
2.7.31.4 2.8.23.5 2.9.19.5 3.0.10.5 3.1.4.3 3.2.8.4 3.3.9.2 2.8.23.4 2.9.19.4 3.0.10.4 3.1.4.2 3.2.8.3 3.3.9.1 trunk 1.14.8 2.7.31.3 2.8.23.3 2.9.19.3 3.0.10.3 3.1.4.1 3.2.0 3.2.1 3.2.1.1 3.2.2 3.2.4 All 42 releases
pods / tribe-common / src / Tribe / Abstract_Plugin_Register.php
Abstract_Plugin_Register.php
72 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Base Plugin register
5 *
6 * Register all plugins to Dependency Class
7 *
8 * @package Tribe
9 * @since 4.9
10 *
11 */
12 abstract class Tribe__Abstract_Plugin_Register {
13
14 /**
15 * The absolute path to the plugin file, the one that contains the plugin header.
16 *
17 * @var string
18 */
19 protected $base_dir;
20
21 /**
22 * @var string
23 */
24 protected $main_class;
25
26 /**
27 * @var string
28 */
29 protected $version;
30
31 /**
32 * @since 4.9.17
33 *
34 * @var array
35 */
36 protected $classes_req = [];
37
38 /**
39 * @var array
40 */
41 protected $dependencies = [
42 'parent-dependencies' => [],
43 'co-dependencies' => [],
44 'addon-dependencies' => [],
45 ];
46
47 /**
48 * Registers a plugin with dependencies
49 */
50 public function register_plugin() {
51 tribe_register_plugin(
52 $this->base_dir,
53 $this->main_class,
54 $this->version,
55 $this->classes_req,
56 $this->dependencies
57 );
58 }
59
60 /**
61 * Returns whether or not the dependencies have been met
62 *
63 * This is basically an aliased function - register_plugins, upon
64 * second calling, returns whether or not a plugin should load.
65 *
66 * @deprecated since 4.9.17 It is unused by any Tribe plugins and returned void.
67 * @todo remove in 4.11
68 */
69 public function has_valid_dependencies() {
70 _deprecated_function( __METHOD__, '4.9.17' );
71 }
72 }