mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-02-10 16:01:33 +00:00
add and check plugin base class
This commit is contained in:
11
classes/plugin.php
Normal file
11
classes/plugin.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
class Plugin {
|
||||
private $link;
|
||||
private $host;
|
||||
|
||||
function __construct($host) {
|
||||
$this->link = $host->get_link();
|
||||
$this->host = $host;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -59,7 +59,7 @@ class PluginHost {
|
||||
|
||||
if (file_exists($file)) require_once $file;
|
||||
|
||||
if (class_exists($class)) {
|
||||
if (class_exists($class) && is_subclass_of($class, "Plugin")) {
|
||||
$plugin = new $class($this);
|
||||
|
||||
$this->register_plugin($class, $plugin);
|
||||
|
||||
Reference in New Issue
Block a user