remove THISPLUGIN definition - not used and doesn't work
This commit is contained in:
parent
94f3aef1ea
commit
8184de9c78
1 changed files with 0 additions and 11 deletions
|
@ -9,9 +9,6 @@ function uninstall_plugin($plugin){
|
||||||
dbesc($plugin)
|
dbesc($plugin)
|
||||||
);
|
);
|
||||||
|
|
||||||
// define THISPLUGIN, make life easy to plugin devs :-)
|
|
||||||
define("THISPLUGIN", 'addon/' . $plugin . '/' . $plugin . '.php');
|
|
||||||
|
|
||||||
@include_once('addon/' . $plugin . '/' . $plugin . '.php');
|
@include_once('addon/' . $plugin . '/' . $plugin . '.php');
|
||||||
if(function_exists($plugin . '_uninstall')) {
|
if(function_exists($plugin . '_uninstall')) {
|
||||||
$func = $plugin . '_uninstall';
|
$func = $plugin . '_uninstall';
|
||||||
|
@ -23,9 +20,6 @@ if (! function_exists('install_plugin')){
|
||||||
function install_plugin($plugin) {
|
function install_plugin($plugin) {
|
||||||
// silently fail if plugin was removed
|
// silently fail if plugin was removed
|
||||||
|
|
||||||
// define THISPLUGIN, make life easy to plugin devs :-)
|
|
||||||
define("THISPLUGIN", 'addon/' . $plugin . '/' . $plugin . '.php');
|
|
||||||
|
|
||||||
if(! file_exists('addon/' . $plugin . '/' . $plugin . '.php'))
|
if(! file_exists('addon/' . $plugin . '/' . $plugin . '.php'))
|
||||||
return false;
|
return false;
|
||||||
logger("Addons: installing " . $plugin);
|
logger("Addons: installing " . $plugin);
|
||||||
|
@ -83,9 +77,6 @@ function reload_plugins() {
|
||||||
|
|
||||||
$fname = 'addon/' . $pl . '/' . $pl . '.php';
|
$fname = 'addon/' . $pl . '/' . $pl . '.php';
|
||||||
|
|
||||||
// define THISPLUGIN, make life easy to plugin devs :-)
|
|
||||||
define("THISPLUGIN", $fname);
|
|
||||||
|
|
||||||
if(file_exists($fname)) {
|
if(file_exists($fname)) {
|
||||||
$t = @filemtime($fname);
|
$t = @filemtime($fname);
|
||||||
foreach($installed as $i) {
|
foreach($installed as $i) {
|
||||||
|
@ -171,8 +162,6 @@ function call_hooks($name, &$data = null) {
|
||||||
|
|
||||||
if((is_array($a->hooks)) && (array_key_exists($name,$a->hooks))) {
|
if((is_array($a->hooks)) && (array_key_exists($name,$a->hooks))) {
|
||||||
foreach($a->hooks[$name] as $hook) {
|
foreach($a->hooks[$name] as $hook) {
|
||||||
// define THISPLUGIN, make life easy to plugin devs :-)
|
|
||||||
define("THISPLUGIN", $hook[0]);
|
|
||||||
@include_once($hook[0]);
|
@include_once($hook[0]);
|
||||||
if(function_exists($hook[1])) {
|
if(function_exists($hook[1])) {
|
||||||
$func = $hook[1];
|
$func = $hook[1];
|
||||||
|
|
Loading…
Reference in a new issue