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 | |
/* | |
Plugin Name: LiveReload | |
Description: Adds the JavaScript for LiveReload to a WordPress site | |
Version: 0.0.0.0.1alpha | |
Author: Peter Wilson | |
Author URI: http://peterwilson.cc/ | |
*/ |
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
.g-row,.g-last{overflow:hidden; *overflow:visible;*zoom:1;} | |
.g{float:left;} | |
.g-right{float:right;} | |
.g-1_1{float:none;} | |
.g-1_2,.g-2_4,.g-3_6{width:50%;} | |
.g-1_3,.g-2_6{width:33.33333%;} | |
.g-2_3,.g-4_6{width:66.66666%;} | |
.g-1_4{width:25%;} | |
.g-3_4{width:75%;} | |
.g-1_5{width:20%;} |
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 filter_body_class($classes, $custom_classes ){ | |
//avoid putting in too many | |
unset($classes); | |
$classes = array(); | |
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 pwcc_filter_nav_menu_css_class($classes, $item, $args) { | |
unset($classes); | |
$classes = array(); | |
if (trim($item->classes[0]) != '') { | |
$classes[] = $item->classes[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
.media, | |
.med3 { | |
display:block; | |
} | |
.media-img, | |
.med3-img{ | |
float:left; | |
margin-right:1em; | |
} |
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
/* | |
* Result should be modern browsers get a blue background | |
* Old browsers (incl IE8 and below) get a red background | |
* ref: http://caniuse.com/#feat=css-mediaqueries | |
*/ | |
html { | |
background: red; | |
} |
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
.g-row { | |
max-width:1200px; | |
*width: 960px; | |
overflow: hidden; | |
} | |
.g { | |
float: left; | |
padding-left: 10px; | |
padding-right: 10px; |
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 filter_pre_get_posts(&$query) { | |
if ( $query->is_home AND $query->is_main_query() ) { | |
$query->set('meta_key', 'my_key'); | |
$query->set('orderby', 'meta_value_num date'); | |
// should sort by meta-value as number, then by date | |
// actually sorts by date and ignores anything with my_key set | |
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
<noscript> | |
<img src="image.png" alt="" width="96" height="96" /> | |
</noscript> | |
<span class="js-retina-image" data-lowres='image.png' data-highres='[email protected]' data-width="96" data-height="96"> |