Skip to content

Commit

Permalink
v4.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
pryley committed Feb 13, 2023
1 parent 31626bd commit 207fc18
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 57 deletions.
Binary file modified +/assets/banner-1544x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified +/assets/banner-1880x609.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified +/assets/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified +/assets/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions +/main.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import "../node_modules/@highlightjs/cdn-assets/styles/atom-one-dark.min.css";

.glbb-close::before {
content: "\f335";
font-size: 26px;
Expand Down Expand Up @@ -316,11 +318,13 @@ body.blackbar #adminmenu {
}
#glbb table td {
background: transparent;
border-width: 0;
line-height: 1.5;
padding: 10px 15px;
vertical-align: top;
}


#glbb table.glbb-grid thead {
position: sticky;
top: 0;
Expand Down Expand Up @@ -358,6 +362,9 @@ body.blackbar #adminmenu {
padding: 0;
white-space: nowrap;
}
#glbb table.glbb-grid tr th:first-child {
text-align: left;
}
#glbb table.glbb-grid tr td.glbb-row-details {
background-color: var(--glbb-color-darker-border);
display: grid;
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

![Black Bar banner](+/assets/banner-1880x609.png)

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](https://wordpress.org/plugins/blackbox-debug-bar/) by [Grzegorz Winiarski](https://profiles.wordpress.org/gwin) which appears to be abandoned as it has not been updated since 2013.
Black Bar is an unobtrusive Debug Bar for WordPress developers. It collects and displays errors, executed SQL queries, slow actions and hooks, theme templates, global variables, and provides a profiler.

### How it helps you with development

- Debug both the front-end and admin area
- 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 50 slowest action and filter hooks
- Displays the loaded template files of the active theme
- Inspect global variables (COOKIE, GET, POST, SERVER, SESSION)
- Use the Profiler for measuring performance of your plugins and themes
- Debug your code with the Console
- Inspect global variables (COOKIE, GET, POST, SERVER, SESSION, WP_Screen)
- Measure performance of your code with the Profiler
- View any PHP errors that occur when loading a page in the Console
- View executed MySQL queries along with execution time and backtrace
- View template files of the active theme in loaded order
- View the 50 slowest action and filter hooks along with callbacks ordered by priority

### Minimum plugin requirements

Expand Down
2 changes: 1 addition & 1 deletion assets/main.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion assets/syntax.css

This file was deleted.

10 changes: 6 additions & 4 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
= 4.0.0 (2023-02-15) =
= 4.0.0 (2023-02-13) =

- Added console level filters
- Added trace information to SQL queries
- Added sorting to Action/Filter Hooks
- Added syntax highlighting to console entries
- Fixed SQL formating
- Added trace information to SQL queries
- Beautified SQL formating
- Changed Profiler usage (use the "trace:start" and "trace:stop" hooks)
- Improved Profiler, it is now also more accurate
- Refreshed UI
- Updated Profiler (now uses "trace:start" and "trace:stop" hooks)
- Requires PHP >= 7.3

= 3.1.0 (2023-02-05) =

Expand Down
5 changes: 2 additions & 3 deletions plugin/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ public function __construct(Application $app)
*/
public function enqueueAssets(): void
{
wp_enqueue_script(Application::ID, $this->app->url('assets/main.js'));
wp_enqueue_style(Application::ID, $this->app->url('assets/main.css'), ['dashicons']);
wp_enqueue_style(Application::ID.'-syntax', $this->app->url('assets/syntax.css'));
wp_enqueue_script(Application::ID, $this->app->url('assets/main.js'), [], '4.0.0');
wp_enqueue_style(Application::ID, $this->app->url('assets/main.css'), ['dashicons'], '4.0.0');
}

/**
Expand Down
41 changes: 18 additions & 23 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,25 @@ Stable tag: 4.0.0
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Black Bar is a Debug Bar for WordPress developers. It collects and displays errors, executed queries, globals, theme templates, and provides a profiler.
Black Bar is an unobtrusive Debug Bar for WordPress developers that attaches itself to the bottom of the browser window.

== Description ==

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](https://wordpress.org/plugins/blackbox-debug-bar/) by [Grzegorz Winiarski](https://profiles.wordpress.org/gwin) which appears to be abandoned as it has not been updated since 2013.
Black Bar is an unobtrusive Debug Bar for WordPress developers. It collects and displays errors, executed SQL queries, slow actions and hooks, theme templates, global variables, and provides a profiler.

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 50 slowest action and filter hooks
- 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
- Debug your code with the Console
- Inspect global variables (COOKIE, GET, POST, SERVER, SESSION, WP_Screen)
- Measure performance of your code with the Profiler
- View any PHP errors that occur when loading a page in the Console
- View executed MySQL queries along with execution time and backtrace
- View template files of the active theme in loaded order
- View the 50 slowest action and filter hooks along with callbacks ordered by priority

== Installation ==

= 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](https://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).
If you have never installed a WordPress plugin before, you can [read instructions on how to do this here](https://wordpress.org/documentation/article/manage-plugins/).

== Frequently Asked Questions ==

Expand All @@ -43,7 +35,7 @@ To add entries to the console, insert the following line of PHP anywhere in your

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

You can also add a specific log level like this:
You can also add an optional log level like this:

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

Expand All @@ -63,19 +55,22 @@ To use the profiler, insert the following lines of PHP _before_ and _after_ the

= How do I enable the plugin for non-administrators? =

By default, Black Bar is only visible to administrator users. To enable it for all logged-in users, add the following code to your child theme's functions.php file:

`add_filter('blackbar/enabled', 'is_user_logged_in');`

== Changelog ==

= 4.0.0 (2023-02-15) =
= 4.0.0 (2023-02-13) =

- Added console level filters
- Added trace information to SQL queries
- Added sorting to Action/Filter Hooks
- Added syntax highlighting to console entries
- Fixed SQL formating
- Added trace information to SQL queries
- Beautified SQL formating
- Changed Profiler usage (use the "trace:start" and "trace:stop" hooks)
- Improved Profiler, it is now also more accurate
- Refreshed UI
- Requires PHP >= 7.3
- Updated Profiler (now uses "trace:start" and "trace:stop" hooks)

[See changelog for all versions](https://raw.githubusercontent.com/pryley/blackbar/main/changelog.txt).
17 changes: 0 additions & 17 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,4 @@ export default [
}),
]
},
{
input: 'node_modules/@highlightjs/cdn-assets/styles/atom-one-dark.min.css',
onwarn (warning, warn) {
if (warning.code === 'FILE_NAME_CONFLICT') return
warn(warning)
},
output: {
file: 'assets/syntax.css',
},
plugins: [
filesize(),
postcss({
extract: true,
minimize: true,
}),
]
},
]

0 comments on commit 207fc18

Please sign in to comment.