* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
+
+use Friendica\App;
use Friendica\Core\Hook;
use Friendica\DI;
Hook::register('app_menu', 'addon/calc/calc.php', 'calc_app_menu');
}
-function calc_app_menu($a,&$b) {
+function calc_app_menu(array &$b)
+{
$b['app_menu'][] = '<div class="app-title"><a href="calc">Calculator</a></div>';
}
-
+/**
+ * This is a statement rather than an actual function definition. The simple
+ * existence of this method is checked to figure out if the addon offers a
+ * module.
+ */
function calc_module() {}
-
-
-
-function calc_init($a) {
-
-$x = <<< EOT
+function calc_init()
+{
+ $x = <<< EOT
<script language="JavaScript">
/**************************************
</td></tr></tbody></table>
EOT;
-return $o;
-
+ return $o;
}