/** * [_ddhook description] * @param [type] $return [description] * @return [type] [description] */ function _ddhook($return) { $DD = DevDebug::get_instance(); $args = func_get_args(); $hook = current_filter(); $trace = debug_backtrace(false); $DD->analyze($args, array('backtrace' => $trace, 'title' => "{$hook} args")); $DD->analyze($GLOBALS['wp_filter'][$hook], array('backtrace' => $trace, 'title' => $hook)); return $return; }
private function __construct() { // load internal logging //require_once "DevDebug_Logger.php"; $this->dir = dirname(dirname(__FILE__)); $this->uri = plugins_url('', "{$this->dir}/dev-debug.php"); $this->doing_ajax = (bool) self::const_value('DOING_AJAX'); /** * Set the directory for to write debug log file to * filter 'ddbug/logging/path' */ $log_dir = apply_filters('ddbug/logging/path', WP_CONTENT_DIR); $this->log_filepath = path_join($log_dir, '.htdev-debug.log'); self::$logger = new DevDebug_Logger($this->log_filepath, self::$log_level); // init add_action('init', array($this, 'init')); // output! add_action('shutdown', array($this, 'output_captured')); do_action('ddbug/ready', $this); }
function init() { $this->api = DevDebug::get_instance(); }
function init() { $this->api = DevDebug::get_instance(); $this->title('DevDebug Log'); $this->_visible = (bool) filesize($this->api->log_filepath); }