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
function cc_is_it_snowing() { | |
// Zip Code / City Name | |
$location = 'North Pole'; | |
$weather_data_api_url = 'http://api.openweathermap.org/data/2.5/weather?q=' . $location; | |
$weather_data_response = wp_remote_get( $weather_data_api_url ); | |
if ( is_wp_error( $weather_data_response ) ) { | |
// Errors are no joy. No joy, no snow. |
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 | |
/** | |
* Updates the walker arg with custom class for detecting parent nav elements. | |
*/ | |
function cc_add_menu_walker_arg( $args ) { | |
$args['walker'] = new CC_Detect_Parents(); | |
return $args; | |
} |
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
li > a::after { | |
content: '+'; | |
padding-left: 20px; | |
padding-left: 2rem; | |
} | |
li > a:only-child::after { | |
content: ''; | |
padding-left: 0; | |
padding-left: 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
/* OEMBED | |
-------------------- */ | |
.oembed-container { | |
position: relative; | |
height: 0; | |
margin-top: 1em; | |
padding-bottom: 56.25%; | |
overflow: hidden; | |
} | |
.oembed-container iframe, |
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
/** | |
* Conditionally force content-sidebar layout for single posts. | |
*/ | |
function cc_layout_logic() { | |
/** | |
* Genesis layout helper functions. | |
* __genesis_return_content_sidebar | |
* __genesis_return_sidebar_content | |
* __genesis_return_content_sidebar_sidebar | |
* __genesis_return_sidebar_sidebar_content |