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
var postL10n = { | |
comma: ',' | |
} | |
jQuery( function() { | |
module( 'post-tags-metabox' ); | |
// mock the tags div | |
var tagsDiv = jQuery( '<div />' ).addClass('tagsdiv').append( | |
jQuery( '<textarea>' ).val( 'tag1,tag2,"tag,with,comma"' ).addClass('the-tags') |
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
v() { | |
DIR=`echo $PWD | sed 's,.*/projects,,'` | |
ARGS=$* | |
ssh -t [email protected] "cd /srv/www${DIR} ; ${ARGS}" 2> /dev/null | |
} | |
alias wp="v wp" | |
alias grunt="v grunt" |
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
$value = sanitize_text_field( $_POST['value'] ); | |
$id = (int) $_POST['id']; | |
$list_id = 1; | |
$meta = get_post_meta( $list_id, 'item' ); | |
$old_value = $meta[$id]; | |
update_post_meta( $lit_id, 'item', $value, $old_value ); |
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
php5-xdebug: | |
pkg: | |
- installed | |
/etc/php5/fpm/conf.d/20-xdebug.ini: | |
file.managed: | |
- contents: "zend_extension=/usr/lib/php5/20100525+lfs/xdebug.so\nxdebug.remote_enable=1\nxdebug.remote_handler = dbgp\nxdebug.remote_connect_back = on\nxdebug.remote_host=10.0.2.2" | |
- user: root | |
- group: root | |
- mode: 644 |
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
{ | |
"name": "AwkwardFamilyPhotos", | |
"version": "0.0.0", | |
"description": "", | |
"main": "Gruntfile.js", | |
"dependencies": { | |
"grunt": "~0.4.1", | |
"grunt-contrib-concat": "~0.3.0", | |
"grunt-contrib-less": "~0.7.0", | |
"grunt-contrib-uglify": "~0.2.2" |
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/sh | |
set -e | |
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' | | |
while read path_key path | |
do | |
url_key=$(echo $path_key | sed 's/\.path/.url/') | |
url=$(git config -f .gitmodules --get "$url_key") | |
git submodule add $url $path |
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 | |
add_filter( 'wpthumb_post_image_path', function() { | |
return WP_CONTENT_DIR . '/uploads/' . rand( 0, 2 ) . '.jpg'; | |
}); | |
add_filter( 'get_attached_file', function( $path ) { | |
return WP_CONTENT_DIR . '/uploads/' . rand( 0, 2 ) . '.jpg'; | |
}); |
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
server { | |
listen 80; | |
server_name clickbankpowered.dev *.clickbankpowered.dev; | |
root /Users/joe/Sites/bailey-bridge; | |
index index.php; | |
rewrite ^(/wp-(admin|includes)/(.*))$ /wordpress$1 last; | |
rewrite ^(/wp-[^/]*\.php)$ /wordpress$1 last; | |
location /dashboard/api/upload-video { |
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 | |
/* Path to the WordPress codebase you'd like to test. Add a backslash in the end. */ | |
//define( 'ABSPATH', getenv( 'WP_CORE_DIR' ) . '/' ); | |
define( 'ABSPATH', '../../../../wordpress/' ); | |
define( 'WP_CONTENT_DIR', ABSPATH . '../content' ); | |
// Set path to MU Plugins. | |
//define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins-mu' ); |
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 | |
hm_add_rewrite_rule( array( | |
'request_method' => 'DELETE', | |
'regex' => '/api/v3/posts/([^/]+)', | |
'query' => 'post_id=$matches[1]', | |
'request_callback' => function( WP $wp ) { | |
wp_delete_post( $wp->query_vars['post_id'] ); |