Skip to content

Instantly share code, notes, and snippets.

View brichards's full-sized avatar

Brian Richards brichards

View GitHub Profile

Chatpen

Multiuser chat built with React and Firebase. Note that this is on the Firebase free plan, so if more than 50 users are on it things may go south.

A Pen by Brad Daily on CodePen.

License.

<?php
$url = esc_url( get_post_meta( $post->ID, '_project-url', true ) );
if ( ! empty( $url ) {
printf( '<p>%s</p>', $url );
}
?>
<?php
/**
* Output HTML markup for forum post list.
*
* @since 1.0.0
*
* @param integer $post_count Post count.
*/
function skbp_output_forum_posts_list( $post_count = 5 ) {
#!/usr/bin/php
<?php
echo PHP_EOL;
echo 'Starting unit tests' . PHP_EOL;
exec( 'phpunit', $test_output, $returnCode );
if ( 0 !== $returnCode ) {
echo implode( PHP_EOL, $test_output );
echo PHP_EOL;
@brichards
brichards / gist:7517250
Last active December 28, 2015 14:49 — forked from jaredatch/gist:7517176
=== Almost always running ===
Google Chrome (10 tabs average)
Vagrant (running VirtualBox)
SublimeText 2
iTerm2
Alfred
Dropbox
Skype
Tweetbot
Hipchat
<?php
/**
* Change "Featured Image" to "Achievement Image" throughout media modal.
*
* @since 1.3.0
*
* @param array $strings All strings passed to media modal.
* @param object $post Post object.
* @return array Potentially modified strings.
*/
<?php
/*
Pages
Short description
Since x.x.x
*/
/* Pages
* Short description
<?php
/**
* This is a docblock.
* With two lines of text.
*/
/*
* This is a multiline inline comment.
* With two lines of notes about something.
<?php
class HHW_WP_CLI_Commands extends WP_CLI_Command {
/**
* Update post meta for all posts that have sdac_post_thumbnail key.
* Move associated meta value to featured image.
*/
function fix_images() {
global $wpdb;
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* This is forked from https://gist.github.com/luetkemj/2023628, just in case the original ever gets zapped
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/query.php
*/