[25027] | 1 | <?php
|
---|
| 2 | /**
|
---|
| 3 | * Utilities for handling plugins
|
---|
| 4 | *
|
---|
| 5 | * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
---|
| 6 | * @author Andreas Gohr <[email protected]>
|
---|
| 7 | */
|
---|
| 8 |
|
---|
| 9 | // plugin related constants
|
---|
| 10 | if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
|
---|
| 11 |
|
---|
| 12 | /**
|
---|
| 13 | * Original plugin functions, remain for backwards compatibility
|
---|
| 14 | */
|
---|
| 15 | function plugin_list($type='',$all=false) {
|
---|
| 16 | global $plugin_controller;
|
---|
| 17 | return $plugin_controller->getList($type,$all);
|
---|
| 18 | }
|
---|
| 19 | function &plugin_load($type,$name,$new=false,$disabled=false) {
|
---|
| 20 | global $plugin_controller;
|
---|
| 21 | return $plugin_controller->load($type,$name,$new,$disabled);
|
---|
| 22 | }
|
---|
| 23 | function plugin_isdisabled($plugin) {
|
---|
| 24 | global $plugin_controller;
|
---|
| 25 | return $plugin_controller->isdisabled($plugin);
|
---|
| 26 | }
|
---|
| 27 | function plugin_enable($plugin) {
|
---|
| 28 | global $plugin_controller;
|
---|
| 29 | return $plugin_controller->enable($plugin);
|
---|
| 30 | }
|
---|
| 31 | function plugin_disable($plugin) {
|
---|
| 32 | global $plugin_controller;
|
---|
| 33 | return $plugin_controller->disable($plugin);
|
---|
| 34 | }
|
---|
| 35 | function plugin_directory($plugin) {
|
---|
| 36 | global $plugin_controller;
|
---|
| 37 | return $plugin_controller->get_directory($plugin);
|
---|
| 38 | }
|
---|