Hook::register('jot_tool', 'addon/smileybutton/smileybutton.php', 'smileybutton_jot_tool');
}
-function smileybutton_jot_tool(App $a, string &$body)
+function smileybutton_jot_tool(string &$body)
{
// Disable if theme is quattro
- // TODO add style for quattro
- if ($a->getCurrentTheme() == 'quattro') {
+ if (DI::app()->getCurrentTheme() == 'quattro') {
return;
}
$s .= '</tr></table>';
//Add css to header
- $css_file = __DIR__ . '/view/' . $a->getCurrentTheme() . '.css';
+ $css_file = __DIR__ . '/view/' . DI::app()->getCurrentTheme() . '.css';
if (!file_exists($css_file)) {
$css_file = __DIR__ . '/view/default.css';
}
DI::page()->registerStylesheet($css_file);
//Get the correct image for the theme
- $image = 'addon/smileybutton/view/' . $a->getCurrentTheme() . '.png';
+ $image = 'addon/smileybutton/view/' . DI::app()->getCurrentTheme() . '.png';
if (!file_exists($image)) {
$image = 'addon/smileybutton/view/default.png';
}