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 | |
/** | |
* This is a docblock. | |
* With two lines of text. | |
*/ | |
/* | |
* This is a multiline inline comment. | |
* With two lines of notes about something. |
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 | |
$terms = $wpdb->get_results( | |
" | |
SELECT term.term_id, | |
term.name, | |
term.slug, | |
taxonomy.term_taxonomy_id, | |
relationship.object_id | |
FROM $wpdb->terms as term |
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 | |
/* | |
Pages | |
Short description | |
Since x.x.x | |
*/ | |
/* Pages | |
* Short description |
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 | |
/** | |
* 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. | |
*/ |
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
=== Almost always running === | |
Google Chrome (10 tabs average) | |
Vagrant (running VirtualBox) | |
SublimeText 2 | |
iTerm2 | |
Alfred | |
Dropbox | |
Skype | |
Tweetbot | |
Hipchat |
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 | |
/** | |
* Wrap an embedded video with a container for simpler styling. | |
* | |
* @since 1.0.0 | |
* | |
* @param string $output HTML Markup. | |
* @param string $url oEmbed URL. |
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
#!/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; |
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 | |
/** | |
* 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 ) { |
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 | |
$url = esc_url( get_post_meta( $post->ID, '_project-url', true ) ); | |
if ( ! empty( $url ) { | |
printf( '<p>%s</p>', $url ); | |
} | |
?> |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f [NC] | |
RewriteRule ^(.*\.(js|css|png|jpe?g|gif|ico)) http://example.com/$1 [NC,P,L] | |
</IfModule> |