function __construct() { self::$file = __FILE__; self::$dir_path = plugin_dir_path(__FILE__); // Fire AJAX requests immediately include_once self::$dir_path . 'inc/class-ajax.php'; // Load once we're sure everything's been loaded. add_action('plugins_loaded', array(&$this, 'require_files')); add_action('init', array(&$this, 'init')); // Use the `wunderground_log_debug` action for logging add_action('wunderground_log_debug', array('Wunderground_Plugin', 'log_debug'), 10, 2); }