This file contains hidden or 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
ul { | |
list-style:none; | |
padding: 0 0 0 2em; /* padding includes space for character and its margin */ | |
/* IE7 and lower use default */ | |
*list-style: disc; | |
*padding: 0 0 0 1em; | |
} | |
ul li:before { | |
content: '\25BA'; |
This file contains hidden or 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
<?php | |
/** | |
* Same as implode, but escape the separator when it exists in the array elements being imploded | |
* If the separator is longer than 1 character, only the first character need be escaped (not every character of the delimiter). | |
* | |
* @param string $sep delimiter to stich the array together with | |
* @param array $arr array to combine | |
* @param char $escape escape character to escape any found delimiters with | |
* @return imploded string |
This file contains hidden or 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
<?php | |
/** | |
* Works around an issue where the multibyte string extension | |
* can be configured to shadow strlen(), and no longer returns pure | |
* bytelength. | |
* @param string $str string to get byte length of | |
* @return int | |
*/ | |
function bytelen($str) | |
{ |
This file contains hidden or 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
<?php | |
function isNumeric($arr) | |
{ | |
return array_keys($arr) !== range(0, count($arr) - 1); | |
} |
This file contains hidden or 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
<?php | |
function extname($path) | |
{ | |
return substr($path, strrpos($path, '.') + 1); | |
} |
This file contains hidden or 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
function initPlaceholderCompat() | |
{ | |
var test = document.createElement('input'), | |
placeholderSupport = 'placeholder' in test; | |
if (placeholderSupport) { | |
return; | |
} | |
$(document).on('focus', '[placeholder]', function() { |
This file contains hidden or 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
<?php | |
global $WPMUPermastructFix; | |
$WPMUPermastructFix = new MultisitePermastructFix(); | |
class MultisitePermastructFix | |
{ | |
public function __construct() | |
{ | |
// start the checking process for main multisite blog. Will strip forced '/blog/' from the start. |
This file contains hidden or 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
@BASE_FONT_SIZE : 16px; | |
// translate units by parent element ratio | |
.emsize(@property, @desired, @base : @BASE_FONT_SIZE) { | |
@{property}: 1em * (unit(@desired) / unit(@base)); | |
} | |
// a wrapper for setting font size | |
.emfz(@desired, @base : @BASE_FONT_SIZE) { | |
.emsize(font-size, @desired, @base); |
This file contains hidden or 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
SET @FROMDOMAIN = 'myolddomain.com'; | |
SET @TODOMAIN = 'mynewdomain.com'; | |
SET @FROMSCHEME = 'http'; | |
SET @TOSCHEME = 'http'; | |
#-------------- STANDARD TABLES -------------# | |
UPDATE wp_options |
This file contains hidden or 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
#!/bin/bash | |
#------------------------------------------------------------------------------# | |
# CONFIGURATION | |
# You will need the following variables set in the git repository to deploy from: | |
# git config --bool receive.denyCurrentBranch false | |
# git config --bool core.bare false | |
# git config --path core.worktree [DEPLOYMENT_DIR] |