]> git.mxchange.org Git - friendica-addons.git/blobdiff - calc/calc.php
This addon will replace "youtube.com" with the chosen Invidious instance
[friendica-addons.git] / calc / calc.php
index 7019a80f0d04d4470216869c5f404fca1b469dad..a8a340c4dd3dd3b1769b914d92404dd722f86808 100644 (file)
@@ -5,6 +5,8 @@
  * Version: 1.0
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  */
+
+use Friendica\App;
 use Friendica\Core\Hook;
 use Friendica\DI;
 
@@ -12,19 +14,21 @@ function calc_install() {
        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">
 /**************************************
@@ -354,6 +358,5 @@ $o .=  <<< EOT
 </td></tr></tbody></table>
 
 EOT;
-return $o;
-
+       return $o;
 }