A mixin for writing @font-face rules in SASS.
Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.
@include font-face(Samplino, fonts/Samplino);| <?php | |
| /** | |
| * Filter for adding wrappers around embedded objects | |
| */ | |
| function responsive_embeds( $content ) { | |
| $content = preg_replace( "/<object/Si", '<div class="embed-container"><object', $content ); | |
| $content = preg_replace( "/<\/object>/Si", '</object></div>', $content ); | |
| /** | |
| * Added iframe filtering, iframes are bad. |
| @mixin fontface($family, $path, $filename, $style: normal, $weight: normal) { | |
| @font-face { | |
| $src: $path + $filename; | |
| font-family: '#{$family}'; | |
| src: url('#{$src}.woff2') format('woff2'), | |
| url('#{$src}.woff') format('woff'); // standart formats | |
| font-style: $style; | |
| font-weight: $weight; | |
| } | |
| } |
| // | |
| // Font-face mixin for .wof and .wof2 | |
| // | |
| @mixin font-face( $family, $path: "../fonts/", $filename: $family, $style: normal, $weight: normal) { | |
| @font-face { | |
| font-family: "#{$family}"; | |
| font-style: $style; | |
| font-weight: $weight; | |
| src: url("#{$path}#{$filename}.woff2") format("woff2"), |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| -- Bulk edit post dates (reverse order of posts) | |
| UPDATE wp_posts SET post_date = DATE_ADD( FROM_UNIXTIME(UNIX_TIMESTAMP('2014-01-01 12:00:00')),INTERVAL -id HOUR); |