Updated modules to allow for partial overrides without errors
Only define functions if they have not been defined before, e.g. in themes. This makes it possible to override parts of a module and still use the other functions.
This commit is contained in:
parent
a81d929cdf
commit
db949bb802
123 changed files with 768 additions and 471 deletions
11
mod/cb.php
11
mod/cb.php
|
|
@ -4,21 +4,28 @@
|
|||
* General purpose landing page for plugins/addons
|
||||
*/
|
||||
|
||||
|
||||
if(! function_exists('cb_init')) {
|
||||
function cb_init(&$a) {
|
||||
call_hooks('cb_init');
|
||||
}
|
||||
}
|
||||
|
||||
if(! function_exists('cb_post')) {
|
||||
function cb_post(&$a) {
|
||||
call_hooks('cb_post', $_POST);
|
||||
}
|
||||
}
|
||||
|
||||
if(! function_exists('cb_afterpost')) {
|
||||
function cb_afterpost(&$a) {
|
||||
call_hooks('cb_afterpost');
|
||||
}
|
||||
}
|
||||
|
||||
if(! function_exists('cb_content')) {
|
||||
function cb_content(&$a) {
|
||||
$o = '';
|
||||
call_hooks('cb_content', $o);
|
||||
return $o;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue