mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-09 18:08:49 +00:00
[various] Replace HTML string by structured array in jot_networks hook
This commit is contained in:
parent
d29d356362
commit
c2970ad6d5
12 changed files with 128 additions and 96 deletions
|
@ -41,19 +41,21 @@ function blogger_uninstall()
|
|||
}
|
||||
|
||||
|
||||
function blogger_jot_nets(App $a, &$b)
|
||||
function blogger_jot_nets(App $a, array &$jotnets_fields)
|
||||
{
|
||||
if (!local_user()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$bl_post = PConfig::get(local_user(), 'blogger', 'post');
|
||||
|
||||
if (intval($bl_post) == 1) {
|
||||
$bl_defpost = PConfig::get(local_user(), 'blogger', 'post_by_default');
|
||||
$selected = ((intval($bl_defpost) == 1) ? ' checked="checked" ' : '');
|
||||
$b .= '<div class="profile-jot-net"><input type="checkbox" name="blogger_enable" ' . $selected . ' value="1" /> '
|
||||
. L10n::t('Post to blogger') . '</div>';
|
||||
if (PConfig::get(local_user(), 'blogger', 'post')) {
|
||||
$jotnets_fields[] = [
|
||||
'type' => 'checkbox',
|
||||
'field' => [
|
||||
'blogger_enable',
|
||||
L10n::t('Post to blogger'),
|
||||
PConfig::get(local_user(), 'blogger', 'post_by_default')
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue