- 'filter-names.txt' is just the filter names
- 'filter-locations.txt' is the location where the filter was found, and the line contents
- 'filter-everything.txt' is the other two files, tab-separated
body { | |
font-family: Georgia; | |
} | |
table { | |
border: 1px solid #ccc; | |
border-spacing: 0; | |
} | |
th { | |
font-family: Verdana; | |
padding: 5px; |
<?php | |
$now = time(); | |
$then = 12345; | |
$diff = $then - $now; | |
$days = floor( $diff / (60*60*24) ); | |
$time = date( __( 'G \h\o\u\r\s i \m\i\n\u\t\e\s'), $diff ); |
<?php | |
// add_action( 'all', array( __CLASS__, 'filter_it' ) ); | |
// add_action( 'wp_redirect', array( __CLASS__, 'die_it' ) ); | |
// static $actions = array(); | |
public static function filter_it() { | |
$args = func_get_args(); | |
self::$actions[] = $args; |
<?php | |
/* | |
* This solution assumes you've already set up your site so that the site domain is | |
* your "normal" (non-mobile) domain, and your theme is your non-mobile theme. | |
* | |
* In short, what it does it check to see if the site is being accessed through the | |
* mobile domain. If it is, the mobile theme is used instead of the normal theme, and | |
* all links point to the mobile domain (so navigatiion doesn't take visitors to the | |
* regular domain. |
<?php | |
register_activation_hook( __FILE__, 'halloween_store_install' ); | |
function halloween_store_install() { | |
//setup default option values | |
$default_options = array( | |
'currency_sign' => '$' | |
); |
To get the setup scripts to work, you'll need to configure Git to check out line-endings "as-is", rather than converting to Windows style CRLF endings. Vagrant seems to choke pretty hard on the Windows style line-endings. You can specify this option when you install git, but if you've already installed it, run the following command from inside a Git Bash before you clone the GitHub repo
git config --global core.autocrlf input
Vagrant doesn't support vagrant ssh
inside windows. You can use the following command from inside a "Git Bash" to connect to the VM:
ssh -i ~/.vagrant.d/insecure_private_key -p 2222 [email protected]
You can create a shortcut for this command by running the following:
normally you have to do multiple newlines
to get Markdown to break text apart
Otherwise it will simply join it together
But if you add two spaces at the end of a line
it will insert a <br /> tag
#!/bin/bash | |
# args | |
MSG=${1-'deploy from git'} | |
BRANCH=${2-'trunk'} | |
DRY=${3-''} | |
# paths | |
SRC_DIR=$(git rev-parse --show-toplevel) | |
DIR_NAME=$(basename $SRC_DIR) |
<?php | |
function hook_my_css() { | |
$screen = get_current_screen(); | |
if ('gravity-forms' == $screen->id ) { | |
wp_enqueue_style( 'my-css', plugins_url( '/my.css', __FILE__ ) ); | |
} | |
} | |
add_action( 'admin_print_scripts', 'hook_my_css' ); |