Skip to content

Instantly share code, notes, and snippets.

Avatar

Hugh Lashbrooke hlashbrooke

View GitHub Profile
@hlashbrooke
hlashbrooke / functions.php
Created Oct 27, 2015
Seriously Simple Podcasting: Use raw audio file URL instead of custom rewrite
View functions.php
add_filter( 'ssp_episode_download_link', 'ssp_use_raw_audio_file_url', 10, 3 );
function ssp_use_raw_audio_file_url ( $url, $episode_id, $file ) {
return $file;
}
@hlashbrooke
hlashbrooke / .htaccess
Created Oct 8, 2015
Seriously Simple Podcasting: .htaccess line for FastCGI servers to enable password protection for feeds. This line to be added above the WordPress rules in the .htaccess file.
View .htaccess
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
View Scaling Community
*Talk title & abstract submitted for ScaleConf 2016: http://scaleconf.org/*
# Scaling Community
Working with any language or platform throws you into the community surrounding it whether you like it or not (even more so if it's an open-source platform), but how do you effectively engage with that community as your business grows? Do you even need to engage with it? What about user groups - are they worth it? Is joining one enough? Should you contribute anything back to the project itself - is that even worthwhile? And when have you done enough? What does it ultimately mean to belong to a technology community?
In this talk, we’ll look at how an empowered community enabled WordPress to grow to dominate 24.9% of the internet, along with a few case studies such as the exponential growth of the community surrounding WooCommerce and what that has done for the growth of the product itself.
## Bio
Hugh Lashbrooke is long-time member of both the PHP and WordPress communities. As the Woo Community Engagement Manager
@hlashbrooke
hlashbrooke / functions.php
Last active Feb 8, 2018
Seriously Simple Podcasting: Add blog categories to podcast episodes (frontend).
View functions.php
add_action( 'pre_get_posts', 'ssp_add_podcast_to_category_archives' );
function ssp_add_podcast_to_category_archives( $query ){
if( is_admin() ) {
return;
}
if( $query->is_tax('category') ) {
$query->set('post_type', array( 'post', 'podcast' ) );
}
@hlashbrooke
hlashbrooke / cache-exclusion
Last active Nov 11, 2015
Seriously Simple Podcasting: String to exclude episode files from W3 Total Cache as well as WP Super Cache
View cache-exclusion
/podcast-download/.+
/podcast-player/.+
@hlashbrooke
hlashbrooke / custom.css
Created May 18, 2015
Custom CSS for WordCamp Cape Town 2013 using Twenty Twelve as a base: https://capetown.wordcamp.org/2013/ - useful for getting a new WordCamp site design off the ground more quickly.
View custom.css
/*
* Custom CSS for WordCamp Cape Town 2013
* Base theme: Twenty Twelve
*/
html {
background: #000000;
}
body.custom-font-enabled {
@hlashbrooke
hlashbrooke / custom.css
Created May 18, 2015
Custom CSS for WordCamp Cape Town 2014 using Twenty Twelve as the base: https://capetown.wordcamp.org/2014/ - useful for getting a new WordCamp site design off the ground more quickly.
View custom.css
/*
* Custom CSS for WordCamp Cape Town 2014
* Base theme: Twenty Twelve
*/
/* Menu tickets link highlight (change ID once menu item is live) */
#menu-item-283629 a {
font-weight: bold;
color: #d54e21;
border-bottom: 2px solid #d54e21;
@hlashbrooke
hlashbrooke / functions.php
Created Apr 23, 2015
WordPress: Add oEmbed support for Speaker Deck presentations.
View functions.php
add_action( 'init', 'add_speakerdeck_oembed' );
function add_speakerdeck_oembed() {
wp_oembed_add_provider( 'https://speakerdeck.com/*/*', 'https://speakerdeck.com/oembed.json' );
}
@hlashbrooke
hlashbrooke / Slack theme for WooThemes
Created Mar 30, 2015
Slack theme for WooThemes. To use this theme, go to the 'Sidebar Theme' tab in your preferences pane and add this text to the custom theme field.
View Slack theme for WooThemes
#42A2CE,#255A8C,#71B02F,#FFFFFF,#255A8C,#E6E6E6,#71B02F,#71B02F
@hlashbrooke
hlashbrooke / Slack theme for ZA Tech
Last active Aug 29, 2015
Slack theme for ZA Tech. To use this theme, go to the 'Sidebar Theme' tab in your preferences pane and add this text to the custom theme field.
View Slack theme for ZA Tech
#007C59,#FCB514,#E23D28,#FFFFFF,#0C1C8C,#FFFFFF,#0C1C8C,#FCB514