- Table of contents
- General information
- Terms
- General structure of a test
- WordPress-specific assertions and test functions
- enqueues
- creating posts
- creating terms
- attaching images
- ?
sub, sup { | |
/* Specified in % so that the sup/sup is the | |
right size relative to the surrounding text */ | |
font-size: 75%; | |
/* Zero out the line-height so that it doesn't | |
interfere with the positioning that follows */ | |
line-height: 0; | |
/* Where the magic happens: makes all browsers position |
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
# Bash-Completion script for PHPUnit | |
# | |
# Created by Henrique Moody <[email protected]> | |
# | |
_phpunit() | |
{ | |
COMPREPLY=() | |
local cur="${COMP_WORDS[COMP_CWORD]}" | |
local prev="${COMP_WORDS[COMP_CWORD-1]}" |
.blur { | |
-webkit-filter: blur(3px); | |
-moz-filter: blur(3px); | |
-ms-filter: blur(3px); | |
-o-filter: blur(3px); | |
/* FF doesn't support blur filter, but SVG */ | |
filter: url("data:image/svg+xml;utf8,<svg height='0' xmlns='http://www.w3.org/2000/svg'><filter id='svgBlur' x='-5%' y='-5%' width='110%' height='110%'><feGaussianBlur in='SourceGraphic' stdDeviation='5'/></filter></svg>#svgBlur"); | |
filter: progid: DXImageTransform.Microsoft.Blur(PixelRadius = '3'); | |
filter: blur(3px); | |
} |
$client = new Client(); | |
$array = []; | |
$res = $client->request('POST', $url, [ | |
'body' => json_encode($array), | |
'headers' => [ | |
'Content-Type' => 'application/json', | |
] | |
]); |
<?php | |
// This can be found in the Symfony\Component\HttpFoundation\Response class | |
const HTTP_CONTINUE = 100; | |
const HTTP_SWITCHING_PROTOCOLS = 101; | |
const HTTP_PROCESSING = 102; // RFC2518 | |
const HTTP_OK = 200; | |
const HTTP_CREATED = 201; | |
const HTTP_ACCEPTED = 202; |
// Changes Gravity Forms Ajax Spinner (next, back, submit) to a transparent image | |
// this allows you to target the css and create a pure css spinner like the one used below in the style.css file of this gist. | |
add_filter( 'gform_ajax_spinner_url', 'spinner_url', 10, 2 ); | |
function spinner_url( $image_src, $form ) { | |
return 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; // relative to you theme images folder | |
} |