wpbp/debug

将您的插件添加到 Query Monitor

1.1.4 2024-07-11 10:36 UTC

This package is auto-updated.

Last update: 2024-09-11 10:58:34 UTC


README

License Downloads

此包是 Query Monitor 的包装器

  • 为 Query Monitor 内部的日志内容创建自定义替代面板
  • 添加使用 Query Monitor 内部功能的计时器方法
  • 添加在 Query Monitor 内部日志面板中打印的方法

安装

composer require wpbp/debug:dev-master

示例

$debug = new WPBP_Debug( __( 'Name of the panel', 'your-textdomain' ) );
$debug->log( __( 'Plugin Loaded', 'your-textdomain' ) );
$debug->qm_log( __( 'Error inside the log panel of Query Monitor', 'your-textdomain' ), 'error' );
$debug->qm_timer( 'profile_that_callback', function () { echo 'I need to be profiled!'; } );