Skip to content

Commit 1f04562

Browse files
committed
Revert to using count
Signed-off-by: Michel Mendiola <suki@missallsunday.com>
1 parent 2679725 commit 1f04562

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Sources/OharaYTEmbed.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,26 +90,28 @@ function OYTE_bbc_add_code(&$codes)
9090
// The bbc button.
9191
function OYTE_bbc_add_button(&$buttons)
9292
{
93-
global $txt, $modSettings;
93+
global $txt, $modSettings;
9494

95-
loadLanguage('OharaYTEmbed');
95+
loadLanguage('OharaYTEmbed');
9696

97-
if (empty($modSettings['OYTE_master']))
98-
return;
97+
if (empty($modSettings['OYTE_master']))
98+
return;
9999

100-
array_push($buttons, [
100+
$buttons[count($buttons) - 1][] = [
101101
'image' => 'youtube',
102102
'code' => 'youtube',
103103
'before' => '[youtube]',
104104
'after' => '[/youtube]',
105105
'description' => $txt['OYTE_desc'],
106-
], [
106+
];
107+
108+
$buttons[count($buttons) - 1][] = [
107109
'image' => 'vimeo',
108110
'code' => 'vimeo',
109111
'before' => '[vimeo]',
110112
'after' => '[/vimeo]',
111113
'description' => $txt['OYTE_vimeo_desc'],
112-
]);
114+
];
113115
}
114116

115117
// Don't bother on create a whole new page for this, let's use integrate_general_mod_settings ^o^.

0 commit comments

Comments
 (0)