This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ); |