Skip to content

Instantly share code, notes, and snippets.

@unclecheese
unclecheese / code, Page.php
Created October 1, 2014 21:56
Custom login for SilverStripe
class Page extends SiteTree {
public function IsLostPassword() {
return in_array(Controller::curr()->getRequest()->param('Action'), array("lostpassword","passwordsent","changepassword"));
}
}
@tjhole
tjhole / WORDPRESS: Base64 Image to Wordpress Uploads directory
Created May 9, 2014 12:35
WORDPRESS: Base64 Image to Wordpress Uploads directory
function tattoo_submit() {
if (isset($_POST["addtattoo"])) {
$title = "Tattoo : ". $_POST["tatooInput"];
$my_post = array(
'post_title' => $title,
'post_status' => 'publish',
'post_author' => 1,