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
// Increase class-level specificity of a rule without functionaly modifying the selector | |
@mixin increase-specificity( $depth: 1 ) { | |
$sel : ''; | |
@while($depth > 0) { | |
$sel : $sel + ':nth-child(n)'; | |
$depth : $depth - 1; | |
} | |
&#{$sel} { |
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
function $(a,b){return(b||document)['querySelector'+(b=/\:first$/,b.test(a)?'':'All')](a.replace(b,''))} |
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
# Swappable Mixins in CoffeeScript | |
# ================================ | |
# Many thanks to Hashmal, who wrote this to start. | |
# https://gist.github.com/803816/aceed8fc57188c3a19ce2eccdb25acb64f2be94e | |
# Usage | |
# ----- | |
# class Derp extends Mixin |
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
{ | |
// | |
// Fonts | |
"font_face": "Monaco", | |
"font_options":"subpixel_antialias", | |
"font_size": 11.0, | |
"bold_folder_labels":true, | |
"line_padding_bottom":1, | |
"line_padding_top":1, | |
"word_separators": "./\\()\"'-:,.;<>~!@$%^&*|+=[]{}`~?", // Remove '#' |
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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Add custom body class to the head | |
add_filter( 'body_class', 'sp_body_class' ); | |
function sp_body_class( $classes ) { | |
if ( is_category( '1' ) ) | |
$classes[] = 'custom-class'; | |
return $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
<?php | |
/* Faux Google Maps oEmbed | |
* Embed google maps in a nicer iframe without using their provided embed code | |
* @usage Paste a Google Maps link in your post and it will be replaced with an iframe when published | |
* @link http://bigsaturday.net/oembed-google-maps-wordpress/ | |
*/ | |
wp_embed_register_handler( 'google_map', '#https://maps\.google\.com/maps(.*)#i', 'embed_google_map' ); | |
function embed_google_map( $matches ) { | |
$query = parse_url($matches[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
(function($) { | |
acf.add_action('ready', function( $el ){ | |
//Identify the field you want to check against. | |
//Use a class to handle scenarios involving repeater / flexible content where multiple instances exist | |
var $field = $('.example input'); | |
$field.on('change', function (evt) { |
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 | |
/** | |
* Echo an image, no matter what. | |
* | |
* @param string $size the image size you want to echo | |
*/ | |
function wds_do_post_image( $size = 'thumbnail' ) { | |
// If featured image is present, use that | |
if ( has_post_thumbnail() ) { |
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 post image. | |
*/ | |
function wds_get_post_image( $size = 'thumbnail' ) { | |
// If featured image is present, use that | |
if ( has_post_thumbnail() ) { | |
return get_the_post_thumbnail( $size ); |
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
var gulp = require("gulp"); | |
var sass = require("gulp-sass"); | |
var autoprefix = require("gulp-autoprefixer"); | |
var filter = require('gulp-filter'); | |
var browserSync = require('browser-sync'); | |
var reload = browserSync.reload; | |
/** | |
* Start BrowserSync | |
*/ |
OlderNewer