thut9g
Last Updated: February 25, 2016
·
1.381K
· olivopablo
9004748db63abcb73e8aa0019f08fabd

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 :

  1. Install chromephp extension from Link.
  2. Download ChromePhp.php Link, and then put this file on /wp-content/plugins/).
  3. 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
*/
  1. Activate plugin.
  2. Use it i.e. ChromePhp::log($post->ID)
Say Thanks
Respond

1 Response
Add your response

17729
49e049f73ecf58ecfb150634a9097bbf

Yes, this is quite awesome! Thank you!

over 1 year ago ·