--- /dev/null
+<?php
+class Plugin {
+ private $link;
+ private $host;
+
+ function __construct($host) {
+ $this->link = $host->get_link();
+ $this->host = $host;
+ }
+}
+?>
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);
<?php
-class Flattr {
+class Flattr extends Plugin {
private $link;
private $host;
<?php
-class GooglePlus {
+class GooglePlus extends Plugin {
private $link;
private $host;
<?php
-class Identica {
+class Identica extends Plugin {
private $link;
private $host;
<?php
-class Mail {
+class Mail extends Plugin {
private $link;
private $host;
<?php
-class Note {
+class Note extends Plugin {
private $link;
private $host;
<?php
-class Pinterest {
+class Pinterest extends Plugin {
private $link;
private $host;
<?php
-class Pocket {
+class Pocket extends Plugin {
private $link;
private $host;
<?php
-class RedditImgur {
+class RedditImgur extends Plugin {
private $link;
private $host;
<?php
-class Share {
+class Share extends Plugin {
private $link;
private $host;