This file contains 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
viewRmTimesheet = function() { | |
var timesheet_link = $('.bonus-time'); | |
if (timesheet_link.length > 0) { | |
ks_dispatcher.go(timesheet_link.attr('href')); | |
} | |
} | |
if ( ks_dispatcher && ks_dispatcher.ks_managers && ks_dispatcher.ks_managers.length && ks_dispatcher.ks_managers[0] && ks_dispatcher.ks_managers[0].keys ) { | |
ks_dispatcher.ks_managers[0].keys.t = { | |
press: viewRmTimesheet.bind(this), |
This file contains 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 add_video_post_type() { | |
$labels = array( | |
'name' => _x( 'Videos', 'Post Type General Name', 'kibble' ), | |
'singular_name' => _x( 'Video', 'Post Type Singular Name', 'kibble' ), | |
'menu_name' => __( 'Videos', 'kibble' ), | |
'parent_item_colon' => __( 'Parent Item:', 'kibble' ), | |
'all_items' => __( 'All Items', 'kibble' ), |
This file contains 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 get_html_attributes(s) { | |
var reg = /\s+([^\t\n\r\f \/>"'=]+)(?:\s*=\s*(['"])(.*?)\2)?/,attr = {}; | |
while ((result = reg.exec(s)) !== null) { | |
attr[result[1]] = result[3]; | |
s = s.replace(reg,''); | |
} | |
return attr; | |
} |
This file contains 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 | |
/** | |
* Check a file of email addresses against the user database to see if those | |
* email addresses are currently in use. | |
* | |
* ## OPTIONS | |
* | |
* <file> | |
* : The file of users to import. |
This file contains 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
var http = require("http") | |
, url = require("url") | |
, path = require("path") | |
, fs = require("fs") | |
, qs = require('querystring') | |
, tasks = {} | |
, port = process.argv[2] || 8888 | |
, next_id = 1 | |
; |
This file contains 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="$@" | |
DIR=`pwd 2>&1` | |
if [[ $DIR == *www* ]]; then | |
if [[ $ARGS != *--url* ]]; then | |
SITE=`pwd | sed 's/.*\/www\///' | cut -d "/" -f 1 2>&1` | |
if [[ $SITE == "wordpress" ]]; then | |
ARGS="$ARGS --url=wp.dev" | |
elif [[ $SITE == "trunk" ]]; then |
This file contains 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 | |
# Testing changes | |
# Usage: ./distribute_user.sh [username] [role] | |
ARGS="$@" | |
echo "Adding user $1 as $2 to all sites" | |
SITES=$(wp site list --field=url --format=csv) | |
for site in $SITES |
This file contains 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
<?xml version="1.0"?> | |
<ruleset name="WordPress Theme Coding Standards Configuration"> | |
<!-- Set a description for this ruleset. --> | |
<description>Code standard rules to check against a WordPress Theme.</description> | |
<exclude-pattern>tests/*</exclude-pattern> | |
<exclude-pattern>inc/cli.php</exclude-pattern> | |
<!-- Include the WordPress VIP ruleset --> | |
<rule ref="WordPress-VIP"> |
This file contains 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 | |
// put this in functions.php or an include file | |
add_action( 'fm_post_post', function() { | |
$fm = new Fieldmanager_Group( array( | |
'name' => 'contact_information', | |
'children' => array( | |
'name' => new Fieldmanager_Textfield( __( 'Name', 'your-domain' ) ), | |
'phone_number' => new Fieldmanager_Textfield( __( 'Phone Number', 'your-domain' ) ), | |
'website' => new Fieldmanager_Link( __( 'Website', 'your-domain' ) ), | |
), |
OlderNewer