I would like to dump the content of the $wp_admin_bar
object in order to remove some menu items with the remove_menu()
method.
What is the suggested way to do it without printing anything on the website?
I have enabled WP_DEBUG
and WP_DEBUG_LOG
in wp-config.php
.
I was thinking about printing it in debug.log
Thanks for the suggestions!