이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

Black Bar

설명

Black Bar is an unobtrusive Debug Bar for WordPress developers that attaches itself to the bottom of the browser window. It is a rewrite of blackbox-debug-bar by Grzegorz Winiarski which appears to be abandoned as it has not been updated since 2013.

How it helps you with development:

  • Displays any PHP errors that occur when loading a page
  • Displays executed MySQL queries and the time it took to execute each query
  • Displays the loaded template files of the active theme
  • Inspect global variables (COOKIE, GET, POST, SERVER, SESSION)
  • Use the Console for debugging your plugins and themes
  • Use the Profiler for measuring the performance of your plugins and themes

설치

Automatic installation

Log in to your WordPress dashboard, navigate to the Plugins menu and click “Add New”.

In the search field type “Black Bar” and click Search Plugins. Once you have found the plugin you can view details about it such as the point release, rating and description. You can install it by simply clicking “Install Now”.

Manual installation

Download the Black Bar plugin and uploading it to your server via your favorite FTP application. The WordPress codex contains instructions on how to do this here.

FAQ

How do I add entries to the Console?

To add entries to the console, simply put the following line of PHP anywhere in your code:

apply_filters( 'console', 'Enter something to debug here' );

You can also add a specific log level like this:

apply_filters( 'console', 'Enter something to debug here', 'error' );

The available log levels are: debug, info, notice, warning, error, critical, alert, and emergency.

How do I use the Profiler?

To use the profiler, simply put the following line of PHP before and after the code you wish to profile:

apply_filters( 'profile', 'Enter a description of what you are profiling here' );

How do I restrict the plugin to logged-in administrators?

To restrict the plugin to logged-in administrators, use the following filter in your theme’s functions.php file:

/**
 * @return boolean
 */
add_filter( 'blackbar/enabled', function( $bool ) {
    $bool = is_user_logged_in()
        ? current_user_can( 'administrator' )
        : false;
    return $bool;
});

후기

2019년 7월 23일 1 reply
Thank you for giving new life to BlackBox Debug Bar! Not only the usefulness of this plugin, but the beautiful PHP coding leads me to write this review. I have learnt a lot from your code.
2019년 1월 19일
This plugin can make life easier when a quick debug is needed. I use it specially to inspect what my $_GET, $_POST, $_SESSION, $_COOKIES variables look like.
모든 6 평가 읽기

기여자 & 개발자

“Black Bar”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

“Black Bar”(이)가 1(으)로 번역되었습니다. 기여해 주셔서 번역자님께 감사드립니다.

자국어로 “Black Bar”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

2.2.1 (2019-03-11)

  • Fixed CSS styles

2.2.0 (2019-03-10)

  • Added ability to add a log level to the console (i.e. ‘debug’, ‘warning’, ‘error’, etc.)
  • Fixed CSS styles

2.1.4 (2019-02-15)

  • Fixed CSS styles

2.1.3 (2019-01-28)

  • Updated plugin URL

2.1.2 (2019-01-18)

  • Fixed javascript error when SAVEQUERIES is not enabled

2.1.1 (2018-12-26)

  • Fixed code highlighting

2.1.0 (2018-09-08)

  • Added a “blackbar/enabled” filter hook which returns true or false. This can be used in your theme’s functions.php file to restrict the blackbar from displaying for specific users (or non-logged-in users).

2.0.0 (2018-07-18)

  • Added a console tab (replaces the Errors tab, see the FAQ on how to use)
  • Fixed SQL execution time filter
  • Fixed miscellaneous styling issues
  • Press ESC to close the blackbar panel
  • Updated activation requirements check
  • Updated minimum requirements to PHP 5.6/WP 4.7

1.2.0 (2018-04-23)

  • Display loaded templates from the active theme
  • Fixed CSS styles

1.1.0 (2018-04-21)

  • Lowered PHP requirement to 5.4
  • Fixed CSS styles
  • Fixed plugin activation class
  • Fixed query logging

1.0.0 (2018-02-22)

  • Initial plugin release