]> git.wh0rd.org - tt-rss.git/blobdiff - plugins/example/init.php
plugins: bump API version
[tt-rss.git] / plugins / example / init.php
index 926a57da82b9ed1d6c71d61c3d7f10f44c65c54a..67f502778706edd7ad11421450b9e73b9710fefe 100644 (file)
@@ -2,26 +2,24 @@
 class Example extends Plugin {
 
        // Demonstrates how to add a separate panel to the preferences screen and inject Javascript/save data using Dojo forms.
-
-       private $link;
        private $host;
 
        function about() {
                return array(1.0,
                        "Example plugin #1",
                        "fox",
-                       true);
+                       true,
+                       "http://site.com");
        }
 
        function init($host) {
-               $this->link = $host->get_link();
                $this->host = $host;
 
                $host->add_hook($host::HOOK_PREFS_TAB, $this);
        }
 
        function save() {
-               $example_value = db_escape_string($this->link, $_POST["example_value"]);
+               $example_value = db_escape_string($_POST["example_value"]);
 
                $this->host->set($this, "example", $example_value);
 
@@ -78,5 +76,10 @@ class Example extends Plugin {
 
                print "</div>"; #pane
        }
+
+       function api_version() {
+               return 2;
+       }
+
 }
 ?>