diff --git a/ymir.php b/ymir.php index 814cafe..1a39654 100644 --- a/ymir.php +++ b/ymir.php @@ -24,13 +24,15 @@ global $ymir; +// Load "is_plugin_active" function used by the plugin +if (!function_exists('is_plugin_active')) { + require_once ABSPATH.'wp-admin/includes/plugin.php'; +} + // Add load plugin action -add_action('after_setup_theme', array($ymir, 'load')); +$ymir->load(); // Load Ymir pluggable functions if the plugin is active -if (!function_exists('is_plugin_active')) { - require_once ABSPATH . 'wp-admin/includes/plugin.php'; -} if (is_plugin_active(plugin_basename(__FILE__))) { require_once __DIR__.'/pluggable.php'; }