Add ChromePhp to Wordpress
ChromePhp is very useful php class to debug code, get variable value, or see json variable in readable format than just using 'echo' or 'print_r()'.
The result will be outputted on Chrome Console(inspect element).
Installation on Wordpress :
- Install chromephp extension from Link.
- Download ChromePhp.php Link, and then put this file on /wp-content/plugins/).
- Add this code right after
<?php
tags on ChromePhp.php.
/*
Plugin Name: ChromePhp
Plugin URI: https://github.com/ccampbell/chromephp
Description: Server Side Chrome PHP debugger class
Author: Craig Campbell <iamcraigcampbell@gmail.com>
Version: 1
Author URI: https://github.com/ccampbell
*/
- Activate plugin.
- Use it i.e.
ChromePhp::log($post->ID)
Written by olivo pablo
Related protips
1 Response
Yes, this is quite awesome! Thank you!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Log
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#