- Do a Spotlight search for terminal.app
- Then copy and paste the following lines into the Terminal window, pressing ENTER after each command
# cd = change directory
cd /usr/local
| git log --pretty="* [%h] %s (%ar)" --no-merges $(git describe --tags --abbrev=0 @^)..@ > changelog.txt |
| // 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: |
| /** | |
| * 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 |
| /** | |
| * 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. |
| /** | |
| * 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 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 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 |