Created
February 26, 2018 03:08
-
-
Save CatEntangler/d813ba89bd730653de77b4a8adb38e8d to your computer and use it in GitHub Desktop.
WordPress dashboard front-end logging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This usually goes in an mu-plugins file but for now here it is on its own | |
* This will pretty print anything to the screen (so you can safely have WP_DEBUG_DISPLAY FALSE | |
* The styles are specific to the default dashboard layouts | |
*/ | |
if( ! function_exists( '_frontlog' ) ) { | |
function _frontlog( $message ) { | |
echo "<pre style='background-color:white;margin-left:159px;border:1px solid black;padding:15px;'>"; | |
print_r( $message ); | |
echo "</pre>"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment