1 | <?php |
||
16 | class Plugin { |
||
17 | |||
18 | /** |
||
19 | * List of the keys allowed as arguments |
||
20 | * |
||
21 | * @var array |
||
22 | */ |
||
23 | private $arguments_whitelist = array( |
||
24 | 'url_info', |
||
25 | ); |
||
26 | |||
27 | /** |
||
28 | * Plugin slug. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | private $slug; |
||
33 | |||
34 | /** |
||
35 | * Initialize the plugin manager. |
||
36 | * |
||
37 | * @param string $slug Plugin slug. |
||
38 | */ |
||
39 | public function __construct( $slug ) { |
||
42 | |||
43 | /** |
||
44 | * Add the plugin connection info into Jetpack. |
||
45 | * |
||
46 | * @param string $name Plugin name, required. |
||
47 | * @param array $args Plugin arguments, optional. |
||
48 | * |
||
49 | * @return $this |
||
50 | * @see $this->arguments_whitelist |
||
51 | */ |
||
52 | public function add( $name, array $args = array() ) { |
||
59 | |||
60 | /** |
||
61 | * Remove the plugin connection info from Jetpack. |
||
62 | * |
||
63 | * @return $this |
||
64 | */ |
||
65 | public function remove() { |
||
70 | |||
71 | /** |
||
72 | * Determine if this plugin connection is the only one active at the moment, if any. |
||
73 | * |
||
74 | * @return bool |
||
75 | */ |
||
76 | public function is_only() { |
||
81 | |||
82 | } |
||
83 |