A jQuery plugin to clean input fields with common functionality, like trim, normalize whitespace, digits only. It is also easily extensible.
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 | |
/** | |
* WP-CLI script for moving a multi-site instance from one domain to another | |
* | |
* Example command usage: wp eval-file multisite-migrate.php old-domain.com new-domain.com | |
* Note: Currently, this script doesn't update all domain references, such as in post content. | |
* At this time, it is primarily used when creating a local copy of a multi-site instance in | |
* order to ensure everything will load on a local dev domain. | |
*/ |
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 | |
# args | |
MSG=${1-'deploy from git'} | |
BRANCH=${2-'trunk'} | |
# paths | |
SRC_DIR=$(git rev-parse --show-toplevel) | |
DIR_NAME=$(basename $SRC_DIR) | |
DEST_DIR=~/Sites/wp-plugins/$DIR_NAME/$BRANCH |
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 | |
/** | |
* Insert an array into another array before/after a certain key | |
* | |
* @param array $array The initial array | |
* @param array $pairs The array to insert | |
* @param string $key The certain key | |
* @param string $position Wether to insert the array before or after the key | |
* @return array |