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 | |
/* | |
* Plugin Name: WordPress.com Watermark Image Uploads | |
* Author: Alex Mills | |
* Author URI: http://automattic.com/ | |
*/ | |
class WPcom_Watermark_Uploads { | |
public $watermark; |
// Lefalet shortcuts for common tile providers - is it worth adding such 1.5kb to Leaflet core? | |
L.TileLayer.Common = L.TileLayer.extend({ | |
initialize: function (options) { | |
L.TileLayer.prototype.initialize.call(this, this.url, options); | |
} | |
}); | |
(function () { | |
<?php | |
# Register custom post types on the 'init' hook. | |
add_action( 'init', 'my_register_post_types' ); | |
/** | |
* Registers post types needed by the plugin. | |
* | |
* @since 1.0.0 | |
* @access public |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# This is how I used it: | |
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history | |
import sys | |
import time | |
<?php | |
//don't re add the php tag above | |
add_filter('wp_link_query', 'cab_add_custom_post_type_archive_link', 10, 2); | |
/** | |
* Add Custom Post Type archive to WordPress search link query | |
* Author: https://github.com/mthchz/editor-archive-post-link/blob/master/editor-archive-post-link.php | |
*/ | |
function cab_add_custom_post_type_archive_link( $results, $query ) { |
↗ |