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
:root { | |
--gutter: 32px; | |
} | |
@media screen and (min-width: 782px) { | |
/* For the '25's' in the 25 / 50 / 25 variation */ | |
.wp-block-column[style='flex-basis:25%'] { | |
flex-basis: calc(var(--gutter) * 2) !important; |
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
/* | |
* Layout debugging display | |
*/ | |
body { | |
&.env--local { | |
.grid-overlay { | |
display: none; | |
position: fixed; | |
z-index: 99999999; |
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 | |
/** | |
* This function appends a grid overlay div to the body depending on the environment. | |
* | |
*/ | |
function tgf_add_grid_overlay_debugging_helper() { | |
if ( WP_LOCAL ) { | |
// echo the script |
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
/* | |
* Layout debugging display | |
*/ | |
body { | |
&.env--local { | |
.site-wrapper { | |
&:after { | |
content: 'default'; | |
position: fixed; |
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 | |
/** | |
* This function appends a class to the body depending on the environment. | |
* | |
* @param array $classes current body classes. | |
* | |
* @return array $classes any modification to the class array. | |
*/ | |
function tgf_add_environment_class( $classes ) { |
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
/* | |
* Layout debugging display | |
*/ | |
body { | |
&.env--local { | |
&:after { | |
content: 'default'; | |
position: fixed; | |
bottom: 0; | |
right: 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
<?php | |
function get_hr_link_type($link_url) { | |
//strip query string (everything after the ?) | |
$link_url = preg_replace('/\?.*/', '', $link_url); | |
// get the file extension | |
$pathinfo = pathinfo($link_url); | |
$filetype = $pathinfo['extension']; |
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 | |
/* | |
Plugin Name: Plugin Name | |
Description: Description | |
Version: 0.1 | |
Author: White Rock Design | |
Author URI: http://keithdevon.com | |
*/ | |
// block direct access |
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
<img src="tomato.svg" onerror="this.src='tomato.png'; this.onerror=null;"> |
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
// Add excerpt link to custom excerpts | |
function add_read_more_to_custom_excerpts($excerpt) { | |
// set up the global post variable | |
global $post; | |
if ( !empty( $post->post_excerpt ) ) { | |
$excerpt = $excerpt . '<br/><a href="' . get_permalink() . '">> Read more</a>'; // change this to suit your theme | |
} | |
return $excerpt; | |
} |
NewerOlder