This file contains hidden or 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 | |
/** | |
* Find Scrollbar width, necessary for sensible, perfect, Wide and Full Alignments. | |
* | |
* @package Some_Theme | |
*/ | |
/** | |
* Learned from code at | |
* https://www.filamentgroup.com/lab/scrollbars/ | |
* and |
This file contains hidden or 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
{ | |
"cmd": [ | |
"lessc", | |
"${file_base_name}.less", | |
"${file_base_name}.css", | |
"--no-color", | |
"--no-ie-compat", | |
"--verbose", | |
"--source-map=${file_base_name}.map", | |
], |
This file contains hidden or 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
// Vertical gradient using CSS where possible, and base64-encoded SVG for IE9 (enables use of this in combination with border-radius) | |
// Based on this by Phil Brown: http://blog.philipbrown.id.au/2012/09/base64-encoded-svg-gradient-backgrounds-in-less/ | |
// Also based on a mixin from Twitter Bootstrap: https://github.com/twitter/bootstrap | |
.gradient-vertical(@startColor, @endColor) { | |
// IE9 prep | |
@dataPrefix: ~"url(data:image/svg+xml;base64,"; | |
@dataSuffix: ~")"; | |
@dataContent: ~'<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none"><linearGradient id="g743" gradientUnits="userSpaceOnUse" x1="0%" y1="0%" x2="0%" y2="100%"><stop stop-color="@{startColor}" offset="0"/><stop stop-color="@{endColor}" offset="1"/></linearGradient><rect x="0" y="0" width="1" height="1" fill="url(#g743)"/></svg>'; |
This file contains hidden or 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 | |
add_action( 'init', function() { | |
register_taxonomy( 'some-taxonomy', 'post', array( | |
'show_ui' => true, | |
'rewrite' => false, | |
'public' => true, | |
'labels' => array( | |
'name' => 'Some Taxonomy', | |
'singular_name' => 'Some Taxonomy', |
This file contains hidden or 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
// Original code from http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/ | |
var metas = document.getElementsByTagName('meta'); | |
var i; | |
if (navigator.userAgent.match(/iPhone/i)) { | |
for (i=0; i<metas.length; i++) { | |
if (metas[i].name == "viewport") { | |
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0"; | |
} | |
} |
This file contains hidden or 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 | |
exec('wget http://wordpress.org/latest.tar.gz'); | |
exec('tar -xzvf latest.tar.gz'); | |
?> |
This file contains hidden or 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
// jQuery plugin based on .load() for use with innerShiv | |
// http://jdbartlett.github.com/innershiv for more info | |
// $('selector').loadShiv('example.html selector'); | |
jQuery.fn.loadShiv = function (url, params, callback) { | |
var off, selector, self, type; | |
if (!this.length || typeof url !== 'string') { | |
return this; | |
} |
This file contains hidden or 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
<!DOCTYPE html> | |
<!-- Helpful things to keep in your <head/> | |
// Brian Blakely, 360i | |
// http://twitter.com/brianblakely/ | |
--> | |
<head> | |
<!-- Disable automatic DNS prefetching. | |