Révision 13c3c9b4
Ajouté par Assos Assos il y a environ 9 ans
drupal7/sites/all/modules/advanced_forum/includes/plugins.inc | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
|
3 |
|
|
4 | 3 |
/** |
5 | 4 |
* @file |
6 | 5 |
* Allows modules to contribute styles. |
7 | 6 |
*/ |
8 | 7 |
|
9 |
// ----------------------------------------------------------------------- |
|
10 |
// REQUEST FUNCTIONS |
|
11 |
|
|
12 | 8 |
/** |
13 |
* Fetch an advanced forum style plugin |
|
9 |
* Fetch an advanced forum style plugin.
|
|
14 | 10 |
* |
15 |
* @param $style |
|
11 |
* @param string $style
|
|
16 | 12 |
* Name of the style plugin |
17 | 13 |
* |
18 |
* @return |
|
14 |
* @return array
|
|
19 | 15 |
* An array with information about the requested style plugin. |
20 | 16 |
*/ |
21 | 17 |
function advanced_forum_get_style($style) { |
... | ... | |
25 | 21 |
/** |
26 | 22 |
* Collate information about all available advanced_forum styles. |
27 | 23 |
* |
28 |
* @return |
|
24 |
* @return array
|
|
29 | 25 |
* An array with information about the requested forum style. |
30 | 26 |
*/ |
31 | 27 |
function advanced_forum_get_styles() { |
... | ... | |
33 | 29 |
} |
34 | 30 |
|
35 | 31 |
// ----------------------------------------------------------------------- |
36 |
// MASTER HANDLER |
|
37 |
|
|
32 |
// MASTER HANDLER. |
|
38 | 33 |
/** |
39 | 34 |
* Fetch a group of plugins by name. |
40 | 35 |
* |
41 |
* @param $plugin |
|
36 |
* @param string $plugin
|
|
42 | 37 |
* This is the name of the plugin, and also the name of the directory. |
43 |
* @param $hook |
|
38 |
* |
|
39 |
* @param string $hook |
|
44 | 40 |
* This is the hook to call to get the info for the plugin. |
45 | 41 |
* |
46 |
* @return |
|
42 |
* @return array
|
|
47 | 43 |
* An array of information arrays about the plugins received. |
48 | 44 |
*/ |
49 | 45 |
function advanced_forum_get_plugins($plugin, $hook, $id = NULL) { |
... | ... | |
67 | 63 |
} |
68 | 64 |
} |
69 | 65 |
|
70 |
// ----------------------------------------------------------------------- |
|
71 |
// WORKER/RETRIEVER FUNCTIONS |
|
72 |
|
|
73 | 66 |
/** |
74 |
* Load plugin info for all hooks; this is handled separately from plugins |
|
75 |
* from files. |
|
67 |
* Load plugin info for all hooks; this is handled separately from plugins from files. |
|
76 | 68 |
* |
77 |
* @param $hook |
|
69 |
* @param string $hook
|
|
78 | 70 |
* The hook being invoked. |
79 | 71 |
* |
80 |
* @return |
|
72 |
* @return array
|
|
81 | 73 |
* An array of info supplied by any hook implementations. |
82 | 74 |
*/ |
83 | 75 |
function advanced_forum_load_hooks($hook) { |
... | ... | |
94 | 86 |
/** |
95 | 87 |
* Process a single hook implementation of a advanced_forum plugin. |
96 | 88 |
* |
97 |
* @param $module |
|
89 |
* @param string $module
|
|
98 | 90 |
* The module that owns the hook. |
99 |
* @param $identifier |
|
91 |
* |
|
92 |
* @param string $identifier |
|
100 | 93 |
* Either the module or 'advanced_forum_' . $file->name |
101 |
* @param $hook |
|
94 |
* |
|
95 |
* @param string $hook |
|
102 | 96 |
* The name of the hook being invoked. |
97 |
* |
|
98 |
* @return array|null |
|
99 |
* Data about module. |
|
103 | 100 |
*/ |
104 | 101 |
function _advanced_forum_process_plugin($module, $identifier, $path, $hook) { |
105 | 102 |
$function = $identifier . '_' . $hook; |
... | ... | |
125 | 122 |
} |
126 | 123 |
|
127 | 124 |
return !empty($result) ? $result : NULL; |
128 |
} |
|
125 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules