mirror of
https://github.com/felixfoertsch/wordpress-dev-env.git
synced 2026-04-18 23:38:37 +02:00
Initial commit
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
namespace WCFE\SysPlugins;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Plugins
|
||||
{
|
||||
|
||||
/**
|
||||
* put your comment there...
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
protected static $instance;
|
||||
|
||||
/**
|
||||
* put your comment there...
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
protected $plugins;
|
||||
|
||||
/**
|
||||
* put your comment there...
|
||||
*
|
||||
*/
|
||||
private function __construct()
|
||||
{
|
||||
# Load Plugins
|
||||
$this->plugins[ ] = new SysFilters\Plugin();
|
||||
}
|
||||
|
||||
/**
|
||||
* put your comment there...
|
||||
*
|
||||
*/
|
||||
public static function & load()
|
||||
{
|
||||
|
||||
if ( ! self::$instance )
|
||||
{
|
||||
self::$instance = new Plugins();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* put your comment there...
|
||||
*
|
||||
*/
|
||||
public function runPlugins()
|
||||
{
|
||||
|
||||
foreach ( $this->plugins as $plugin )
|
||||
{
|
||||
$plugin->run();
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user