// jQuery
$(document).ready(function() {
// code
})
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 | |
class Clean_Walker_Nav extends Walker_Nav_Menu { | |
/** | |
* Filter used to remove built in WordPress-generated classes | |
* @param mixed $var The array item to verify | |
* @return boolean Whether or not the item matches the filter | |
*/ | |
function filter_builtin_classes( $var ) { | |
return ( FALSE === strpos( $var, 'item' ) ) ? $var : ''; | |
} |
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
// expand {{PATTERNS}} | |
// You can do this serverside. I just did it this way for demonstration purposes. | |
(function () { | |
"use strict"; | |
var shares = document.querySelectorAll("ul.share > li > a"); | |
var keywords = document.querySelector('meta[name=keywords]').getAttribute("content"); | |
var description = document.querySelector('meta[name=description]').getAttribute("content"); | |
var params = { | |
URL: encodeURIComponent(document.querySelector('link[rel=canonical]').getAttribute("href")), |
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 | |
/** | |
* This code is intended to be added to your wp-config.php file just below the top comment block. | |
* It should replace the existing define('DB_*') statements. You can add or remove sections | |
* depending on the number of environments you intend to setup. You should change all values of | |
* DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST for each environment, making them all distinct | |
* for security purposes. | |
*/ | |
// determine the current environment |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = array( |
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
/** | |
* Disable and enable event on scroll begin and scroll end. | |
* @see http://www.thecssninja.com/javascript/pointer-events-60fps | |
*/ | |
var root = document.documentElement; | |
var timer; | |
window.addEventListener('scroll', function() { | |
// User scrolling so stop the timeout | |
clearTimeout(timer); |
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
<figure class="quote"> | |
<blockquote>It is the unofficial force—the Baker Street irregulars.</blockquote> | |
</figure> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>SKVariables</key> | |
<array> | |
<dict> | |
<key>enabled</key> | |
<true/> | |
<key>name</key> |
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
*Device* *Portrait* *Landscape* *Device type* *Remarks* | |
Nexus 7 600 961 Tablet | |
iPad 2 768 768 Tablet iOS always reports the same, regardless of orientation. | |
Surface RT 1366 1024 Tablet | |
Galaxy Tab 2 1280 800 Tablet | |
Galaxy Nexus 360 598 Phone | |
iPhone 5 320 320 Phone iOS always reports the same, regardless of orientation. | |
Galaxy S3 mini 320 534 Phone Stock android browser reports 533, not 534 (Chrome). |