Skip to content

Instantly share code, notes, and snippets.

@freshdevelop
freshdevelop / classes.php
Last active August 29, 2015 13:56
[WP CF7] - Additional Setting "on_mail_failed"
File path: contact-form-7/includes/classes.php
} else {
$result['status'] = 'mail_failed';
$result['message'] = $this->message( 'mail_sent_ng' );
// Edit start ---------------
$on_sent_failed = $this->additional_setting( 'on_sent_failed', false );
if ( ! empty( $on_sent_failed ) )
@freshdevelop
freshdevelop / Clean initializr main.css
Last active December 22, 2015 21:48
Initializr main.css w/out whitespaces, inline rules.
/*! HTML5 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */
html, button, input, select, textarea { color: #222; }
html { font-size: 1em; line-height: 1.4; }
::-moz-selection { background: #b3d4fc; text-shadow: none; }
::selection { background: #b3d4fc; text-shadow: none; }
hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
audio, canvas, img, video { vertical-align: middle; }
fieldset { border: 0; margin: 0; padding: 0; }
@freshdevelop
freshdevelop / Image resize
Created November 23, 2012 11:12
PHP image resizer
<?php
/*
This works like a callable url to embed in img tag that returns a jpeg image
resized proportionally and/or cropped accordingly to "width" and "height" parameters
Usage: resize.php?image=images/my-kitten-image.jpg&width=200&height=100
*/
$filename = $_GET['image'];