CleanUp
This commit is contained in:
@ -20,41 +20,21 @@ define('STATIFYBLACKLIST_DIR', dirname(__FILE__));
|
||||
define('STATIFYBLACKLIST_BASE', plugin_basename(__FILE__));
|
||||
|
||||
/* System Hooks */
|
||||
add_action(
|
||||
'plugins_loaded',
|
||||
array(
|
||||
'StatifyBlacklist',
|
||||
'instance'
|
||||
)
|
||||
);
|
||||
add_action('plugins_loaded', array('StatifyBlacklist', 'instance'));
|
||||
|
||||
register_activation_hook(
|
||||
STATIFYBLACKLIST_FILE,
|
||||
array(
|
||||
'StatifyBlacklist_System',
|
||||
'install'
|
||||
)
|
||||
);
|
||||
register_activation_hook(STATIFYBLACKLIST_FILE, array('StatifyBlacklist_System', 'install'));
|
||||
|
||||
register_deactivation_hook(
|
||||
STATIFYBLACKLIST_FILE,
|
||||
array(
|
||||
'StatifyBlacklist_System',
|
||||
'deactivate'
|
||||
)
|
||||
);
|
||||
|
||||
register_uninstall_hook(
|
||||
STATIFYBLACKLIST_FILE,
|
||||
array(
|
||||
'StatifyBlacklist_System',
|
||||
'uninstall'
|
||||
)
|
||||
);
|
||||
register_uninstall_hook(STATIFYBLACKLIST_FILE, array('StatifyBlacklist_System', 'uninstall'));
|
||||
|
||||
/* Autoload */
|
||||
spl_autoload_register('statifyBlacklist_autoload');
|
||||
|
||||
/**
|
||||
* Autoloader for StatifyBlacklist classes.
|
||||
*
|
||||
* @param $class
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function statifyBlacklist_autoload($class) {
|
||||
$plugin_classes = array(
|
||||
'StatifyBlacklist',
|
||||
@ -62,13 +42,7 @@ function statifyBlacklist_autoload($class) {
|
||||
'StatifyBlacklist_System'
|
||||
);
|
||||
|
||||
if ( in_array($class, $plugin_classes) ) {
|
||||
require_once(
|
||||
sprintf(
|
||||
'%s/inc/%s.class.php',
|
||||
STATIFYBLACKLIST_DIR,
|
||||
strtolower($class)
|
||||
)
|
||||
);
|
||||
if (in_array($class, $plugin_classes)) {
|
||||
require_once(sprintf('%s/inc/%s.class.php', STATIFYBLACKLIST_DIR, strtolower($class)));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user