- Add caching to Geocoder to limit the amount of API calls to convert locations to coordinates.
- Add custom weather emoji's based on the icon field from Dark Sky API.
- Add settings feature to handle units instead of hard coding them (i.e. mph vs. kmp, F vs. C)
- Add caching to Forecast_IO
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 | |
//* Do NOT include the opening php tag | |
/*--------------------------------------------------------------------------------------------*/ | |
/* Event Calendar Feed in full page width | |
/* Original Function by: jonahcoyote.com | |
/* Revised by Chuck Smith (polishedwp.com) to check for calendar monthly and event list views | |
/*--------------------------------------------------------------------------------------------*/ | |
add_filter('genesis_pre_get_option_site_layout', 'set_layouts'); | |
function set_layouts($layout) { |
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
<!-- Using inline CSS in mailchimp templates --> | |
<blockquote style="font-style:italic; padding:10px; border-left:4px solid #999;"> |
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 | |
/** | |
* This file adds new widget area called Home-ministry to the front page. | |
* | |
* Front page for the Utility Pro theme | |
* | |
* @package Utility_Pro | |
* @author Carrie Dils | |
* @license GPL-2.0+ | |
*/ |
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 | |
/** | |
* Register Multiple Taxonomies | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/code/register-multiple-taxonomies/ | |
*/ | |
function be_register_taxonomies() { |
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 | |
class MyTheme | |
{ | |
private function actionAfterSetup($function) | |
{ | |
add_action('after_setup_theme', function() use ($function) { | |
$function(); | |
}); | |
} |
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_filter( 'pre_get_posts', 'tgm_io_cpt_search' ); | |
/** | |
* This function modifies the main WordPress query to include an array of | |
* post types instead of the default 'post' post type. | |
* | |
* @param object $query The original query. | |
* @return object $query The amended query. | |
*/ | |
function tgm_io_cpt_search( $query ) { |
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 | |
/** | |
* Set up the Grid Loop | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/genesis-grid-loop-content/ | |
* | |
*/ | |
function child_grid_loop_helper() { | |
genesis_grid_loop( array( | |
'features' => 2, |
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
#!/usr/bin/env ruby | |
require 'csv' | |
# This assumes: | |
# - Ruby 1.9's CSV library, if you are using 1.8, use FasterCSV. | |
# | |
# https://raw.github.com/hadley/data-baby-names/master/baby-names.csv | |
csv_fname = "baby-names.csv" |
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
exports.createPages = ({ graphql, actions }) => { | |
return graphql(` | |
{ | |
site { | |
siteMetadata { | |
githubOrgs | |
} | |
} | |
} | |
`).then(result => { |
OlderNewer