- GitHub Staff
- http://astockwell.com
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
@import "compass/css3/images"; | |
// Partially via http://www.colorzilla.com/gradient-editor/ | |
@mixin nav-child-bg-color-alpha($color, $alpha: 0.5) { | |
background: url(screen.css); // Point to this css file. Fix for IE "No Transparency Click" bug on <a> elements w/ bg transparency. Via http://haslayout.net/css/No-Transparency-Click-Bug | |
@include background-image(linear-gradient(top, rgba($color, $alpha) 0%,rgba($color, $alpha) 100%)); | |
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#{ie-hex-str(rgba($color, $alpha))}', endColorstr='#{ie-hex-str(rgba($color, $alpha))}',GradientType=0 ); /* IE6-9 */ | |
} | |
// USEAGE: |
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 if (WP_ENV != 'local' && WP_ENV != 'staging') { ?> | |
<script type="text/javascript"> | |
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-xxxxxxxx-x']); | |
_gaq.push(['_trackPageview']); | |
(function() { | |
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
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
if ($('.lt-ie8').is('*')) { | |
//code | |
} |
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
// One wp-config.php file for multiple environments setup from http://www.messaliberty.com/2010/01/how-to-create-a-single-wp-config-file-for-local-and-remote-wordpress-development/ | |
if ($_SERVER['REMOTE_ADDR']=='127.0.0.1' || $_SERVER['REMOTE_ADDR']=='localhost' || preg_match('/^192\.168\.5\./', $_SERVER['REMOTE_ADDR'])) { | |
define('WP_ENV', 'local'); | |
} elseif ($_SERVER['HTTP_HOST']=='tld.stagingurl.com') { | |
define('WP_ENV', 'staging'); | |
} else { | |
define('WP_ENV', 'production'); | |
} | |
if ( WP_ENV == 'local' ) { |
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_header(); ?> | |
<section> | |
<!-- Put the following javascript before the closing </head> tag. --> | |
<script> | |
(function() { | |
var cx = '000000000000000000000:aaa1aa1aa1a'; | |
var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; | |
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + | |
'//www.google.com/cse/cse.js?cx=' + cx; |
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 // Referencing http://wordpress.stackexchange.com/questions/1753/when-should-you-use-wp-query-vs-query-posts-vs-get-posts ?> | |
<?php | |
// EXAMPLE new WP_Query object | |
?> | |
<?php | |
// Query posts by new criteria. | |
$args = array( | |
'posts_per_page' => -1, |
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 xyz_create_cpt_animal() { | |
$label_singular = 'Animal'; | |
$label_plural = $label_singular . 's'; | |
$labels = array( | |
'name' => __($label_plural), | |
'singular_name' => __($label_singular), | |
'add_new' => __('Add New'), |
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 | |
$args = array( | |
'post_type' => 'faculty', | |
'meta_query' => array( | |
// 'relation' => 'AND', | |
// array( | |
// 'key' => 'online-extra-type', | |
// 'value' => 'Your Space', | |
// 'compare' => '=' | |
// ), |
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 Now; | |
if (typeof performance !== 'undefined' && performance.now) { | |
Now = function() { | |
return performance.now(); | |
}; | |
} else if (Date.now) { | |
Now = function() { | |
return Date.now(); | |
}; | |
} else { |
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
<!-- Place in "body > header" or equivalent --> | |
<?php edit_post_link( __('Edit'), '<span class="edit-link">', '</span>' ); ?> |
OlderNewer