advanced code snippet search
florent on 10/21/11
debug wordpress
10/21/11 02:30am
To make things even easier, I put this inside one function in my functions.php so it helps me a lot:1 <?php2 function debug($var) {3 if ( ! is_string($var) ) {4 echo "<pre>";5 print_r($var);6 echo "</pre>";7 } else {8 echo "DEBUG: ".$var;9 }10 }11 ?>
Report this snippet Tweet
Comment:
You need to login to post a comment.