Created: 2017.03.28
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
git log --pretty="* [%h] %s (%ar)" --no-merges $(git describe --tags --abbrev=0 @^)..@ > changelog.txt |
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
// Breakpoints for include-media | |
// Usage: @include media(">phone", "<=tablet") { ... } | |
// Usage: @include media("<=1150px") { ... } | |
// | |
// See: https://include-media.com/ | |
// See: https://gs.statcounter.com/screen-resolution-stats | |
// See: https://gist.github.com/dotherightthing/06f33bf784279aa24072e0b6873c968c | |
// See: https://elementqueries.com/ (future technology) | |
// | |
// Phones: |
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
/** | |
* Add Google Tag Manager | |
* | |
* @see http://kb.dotherightthing.dan/seo/google-tag-manager-gtm/ | |
* @example | |
* add_action( 'wp_enqueue_scripts', 'wpdtrt_dbth_js_link_gtm' ) | |
*/ | |
function wpdtrt_dbth_js_link_gtm() { | |
/** | |
* Link assets to theme version to ensure user gets the latest version |
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
/** | |
* Featured image shortcode | |
* | |
* @param array $atts Attributes. | |
* @return string HTML | |
* @example | |
* add_shortcode( 'wpdtrt-featured-image', 'wpdtrt_image_featured_shortcode' ); | |
*/ | |
function wpdtrt_image_featured_shortcode( $atts ) { | |
$id = get_the_ID(); // Retrieve the ID of the current item in the WordPress Loop. |
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
/** | |
* Deregister only those scripts which are incorrectly output into the head. | |
* Then reregister these to load into the footer. | |
* This leaves wp_head load actions intact for scripts that we deem worthy (such as GTM). | |
* | |
* @see http://justintadlock.com/archives/2009/08/06/how-to-disable-scripts-and-styles | |
* @example add_action( 'wp_print_scripts', 'wpdtrt_deregister_head_js', 100 ); | |
*/ | |
function wpdtrt_deregister_head_js() { |
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
/** | |
* This cannot use PHP variables without violating theme-check (i18n), | |
* but a static generator such as Mustache.php could be an option. | |
*/ | |
/** | |
* Seed a custom taxonomy with terms | |
* Note: Save Permalinks after changing this. | |
* save_post is run on save, publish, update and bulk/quick edit | |
* |
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
/** | |
* This cannot use PHP variables without violating theme-check (i18n), | |
* but a static generator such as Mustache.php could be an option. | |
*/ | |
/** | |
* Register taxonomy | |
* | |
* @uses ../../../../wp-includes/taxonomy.php | |
* @see https://codex.wordpress.org/Function_Reference/register_taxonomy |