- report 16 (needs patch) are tickets looking for help
- svn diff > [ticket number].diff
- e.g.
23456.diff
- e.g.
- cp ~/path/to/downloaded/patch.diff ./trunk/
patch -p0 < file.diff
- how do you know where to start?
- find a ticket in a section of WP you want to work in.
- patience.
- get in IRC
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
add_action( 'pre_get_posts', 'rns_get_headlines_zone', 10 ); | |
/** | |
* Get the posts in the 'Headlines' zone in the front page main query | |
* | |
* @param obj $query The query to pass to the database | |
* @see Zoninator's get_zone_query() | |
*/ | |
function rns_get_headlines_zone( $query ) { | |
if ( ! is_admin() && $query->is_main_query() && $query->is_home() ) { | |
global $zoninator; |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
// [other stuff...] | |
compass: { | |
options: { | |
sassDir: 'sass', | |
javascriptsDir: 'javascripts', |
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
add_action( 'wp_head', 'my_bwp_recent_comments_template' ); | |
function my_bwp_recent_comments_template() { | |
global $bwp_rc; | |
$bwp_rc->options['template_comment'] = '<p>My template here</p>'; | |
} |
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
sudo ln -s /usr/local/Cellar/php54/5.4.11/lib/php/texy/src/texy.php /usr/local/Cellar/php54/5.4.11/lib/php |
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 | |
# 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 | |
do |
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 | |
/* | |
Plugin Name: Members | |
*/ | |
function member_init() { | |
register_post_type( 'member', array( | |
'labels' => array( | |
'name' => __( 'Members', 'foobar' ), | |
'singular_name' => __( 'Member', 'foobar' ), |
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_action( 'send_headers', function ( $wp ) { | |
if ( ! empty( $wp->query_vars['feed'] ) ) { | |
header( 'Cache-Control: no-cache, no-store, must-revalidate' ); | |
} | |
}, 100 ); | |
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 | |
/** | |
* Print syndication debugging information about a post. | |
* | |
* ## OPTIONS | |
* | |
* <id> | |
* : Post ID. | |
* |