Skip to content

Instantly share code, notes, and snippets.

View holisticnetworking's full-sized avatar
😎
Makin' teh codz.

Thomas Belknap holisticnetworking

😎
Makin' teh codz.
View GitHub Profile
@holisticnetworking
holisticnetworking / Makefile
Created February 13, 2020 17:11 — forked from pwenzel/Makefile
Wordpress Makefile Workflow
.PHONY: install
install: clean wordpress phpunit wp-cli
git submodule init;
@echo "\n\nNOTICE: You may need to configure a MySQL database for your Wordpress installation. Just run:"
@echo " mysql -u root -p;"
@echo " CREATE DATABASE example_site; \n"
wordpress: latest.tar.gz
tar -zxvf latest.tar.gz;
@holisticnetworking
holisticnetworking / wp.responsive.images.php
Last active October 18, 2018 07:07 — forked from rezen/wp.filter.php
Filter Image insert for WordPress
public function hn_insert_image( $html, $id, $caption, $title, $align, $url ) {
$html5 = "<figure id='post-$id media-$id' class='align-$align'>";
$html5 .= "<img src='$url' alt='$title' />";
$html5 .= "<figcaption class="wp-caption">$caption</figcaption>";
$html5 .= "</figure>";
return $html5;
}
add_filter( 'image_send_to_editor', array( &$this, 'hn_insert_image' ), 10, 9 );