mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-09 18:08:49 +00:00
Update function names
update function names and hook calls
This commit is contained in:
parent
0afd633346
commit
c71f7b0e1a
50 changed files with 356 additions and 348 deletions
|
@ -33,25 +33,28 @@ function communityhome_getopts() {
|
|||
];
|
||||
}
|
||||
|
||||
function communityhome_plugin_admin(&$a, &$o) {
|
||||
$tpl = get_markup_template( 'settings.tpl', 'addon/communityhome/' );
|
||||
function communityhome_addon_admin(&$a, &$o)
|
||||
{
|
||||
$tpl = get_markup_template('settings.tpl', 'addon/communityhome/');
|
||||
|
||||
$opts = communityhome_getopts();
|
||||
$ctx = [
|
||||
'$submit' => t("Submit"),
|
||||
'$fields' => [],
|
||||
];
|
||||
foreach($opts as $k=>$v) {
|
||||
|
||||
foreach ($opts as $k => $v) {
|
||||
$ctx['fields'][] = ['communityhome_'.$k, $v, Config::get('communityhome', $k)];
|
||||
}
|
||||
$o = replace_macros($tpl, $ctx);
|
||||
}
|
||||
|
||||
function communityhome_plugin_admin_post(&$a,&$b) {
|
||||
if(x($_POST,'communityhome-submit')) {
|
||||
function communityhome_addon_admin_post(&$a, &$b)
|
||||
{
|
||||
if (x($_POST, 'communityhome-submit')) {
|
||||
$opts = communityhome_getopts();
|
||||
foreach($opts as $k=>$v) {
|
||||
Config::set('communityhome', $k, x($_POST,'communityhome_'.$k));
|
||||
foreach ($opts as $k => $v) {
|
||||
Config::set('communityhome', $k, x($_POST, 'communityhome_'.$k));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue