How to: inspect global variables in WordPress

Or, if you’re lazy, just install the Debug Bar plugin.

It adds a button to the admin bar that, when clicked, reveals a panel with all kinds of useful information, including deprecation notices, WP_Query variables and an SQL query log.

Leave a Comment