A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
| <?php | |
| /** | |
| * == About this Gist == | |
| * | |
| * Code to add to wp-config.php to enhance information available for debugging. | |
| * | |
| * You would typically add this code below the database, language and salt settings | |
| * | |
| * Oh.. and *do* make sure you change the path to the log file to a proper file path on your server (make sure it exists). | |
| * |
| <?php | |
| /* | |
| * This code is modified from the original here | |
| * https://github.com/Hube2/acf-filters-and-functions/blob/master/acf-reciprocal-relationship.php | |
| * | |
| * Some comments may not be useful anymore since the modifications | |
| */ | |
| <?php | |
| /** | |
| * Grab the url of a publicly embeddable video hosted on vimeo | |
| * @param str $video_url The "embed" url of a video | |
| * @return str The url of the thumbnail, or false if there's an error | |
| */ | |
| function grab_vimeo_thumbnail($vimeo_url){ | |
| if( !$vimeo_url ) return false; | |
| $data = json_decode( file_get_contents( 'http://vimeo.com/api/oembed.json?url=' . $vimeo_url ) ); |