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
=== 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 | |
/** | |
* 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
<?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 | |
$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 | |
/** | |
* 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 | |
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; |
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 | |
/** | |
* Override default image downsize rules with a custom resizing service | |
* | |
* Defaults to false (no third-party downsizing), but can pass an indexed | |
* array of image details to use in place of WP's default downsizing rules | |
* and short-circuit the remainder of the function. | |
* | |
* @since 2.5.0 |
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 | |
/** | |
* Return the ID of the uploaded attachment of a given type | |
* | |
* @since 2.5.0 | |
* | |
* @param int $id The uploaded attachment ID | |
* @return int The uploaded attachment ID | |
*/ |
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 | |
// Disable support for SB Slideshows | |
function remove_sb_slideshows() { | |
remove_theme_support( 'sb-slideshows' ); | |
} | |
add_action( 'after_setup_theme', 'remove_sb_slideshows' ); |