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 | |
/** | |
* Remove the "home" value from the genesis breadcrumbs. | |
* | |
* @since 1.0.0 | |
* | |
* @param array $crumbs | |
* @param array $args | |
* @return array |
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 | |
/** | |
* Using wp_dropdown_categories with the post type filter applied. | |
* | |
* @link https://joshuadnelson.com/category-taxonomy-dropdown-filtered-by-post-type/ | |
*/ | |
// Taxonomy dropdown arguments | |
$args = array( | |
'taxonomy' => 'department', |
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 | |
/** | |
* Get the "Add to Calendar" button output, used with addevent.com service. | |
* | |
* @see https://www.addevent.com/buttons/add-to-calendar | |
* | |
* @uses event_is_multiday() | |
* @uses wp_trim_characters() | |
* | |
* @param int $post_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 | |
/** | |
* A helper class for that extends the WP-DarkSky helper class with Weather Icons. | |
* | |
* You'll need to add the Weather Icons stylesheet, web fonts, etc and enqueue them correctly. | |
* | |
* @see weathericons.io | |
* @see https://developer.wordpress.org/reference/functions/wp_enqueue_style/ | |
* @see https://darksky.net/dev/docs/ | |
* |
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 | |
/** | |
* Basic example of WP-DarkSky useage. | |
* | |
* @since 01-04-2017 - Updated for new Dark Sky API & Naming | |
* | |
* @link https://github.com/joshuadavidnelson/wp-darksky | |
* @author Joshua David Nelson, josh@joshuadnelson.com | |
*/ | |
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
Array ( | |
[latitude] => 48.7502 | |
[longitude] => 122.475 | |
[timezone] => Asia/Shanghai | |
[offset] => 8 | |
[currently] => Array | |
( | |
[time] => 1454306959 | |
[summary] => Clear | |
[icon] => clear-day |
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 | |
/** | |
* A helper class for the forecast.io api. | |
* | |
* Inspired by forecast-php by Guilherm Uhelski: https://github.com/guhelski/forecast-php | |
* | |
* @see https://developer.forecast.io/docs/v2 | |
* | |
* @link https://github.com/joshuadavidnelson/wp-forecast-io | |
* |
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 | |
/** | |
* Featured projects. | |
* | |
* @since 1.0.0 | |
* | |
* @return void | |
*/ | |
function child_home_projects() { | |
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 | |
$args = array( | |
'post_type' => array( 'post' ), | |
'post_status' => array( 'publish' ), | |
'posts_per_page' => 100, // don't use -1, pick something reasonable | |
'no_found_rows' => true, // useful when pagination is not needed. | |
'update_post_meta_cache' => false, // useful when post meta will not be utilized. | |
'update_post_term_cache' => false, // useful when taxonomy terms will not be utilized. | |
// 'ignore_sticky_posts' => true, // ignore sticky posts |