How to inspect global variables in WordPress?

Posted by Prem Tiwari | Updated on

Want to inspect global variables in WordPress? Use following code in your theme’s functions.php file OR in site specific plugin.

’;
}

// Query on public facing pages
add_action( ‘shutdown’, ‘inspect_wp_query’, 999 );

// Query in admin UI
add_action( ‘admin_footer’, ‘inspect_wp_query’, 999 );

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers