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
@mixin flexbox( $display: flex, $direction: row, $wrap: wrap, $justify: start, $items: start, $content: start ) { | |
// <display> - flex | inline-flex | |
// <direction> - row | row-reverse | column | column-reverse | |
// <wrap> - wrap | nowrap | wrap-reverse | |
// <justify> - start | end | center | space-between | space-around | |
// <items> - start | end | center | baseline | stretch | |
// <content> - start | end | center | space-between | space-around | stretch | |
// @include flexbox( flex, row, wrap, start, start, start ); | |
// @include flexbox( inline-flex, column, nowrap, center, start, stretch ); |
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
<select class="widefat" id="<?php echo $this->get_field_id( 'state' ); ?>" name="<?php echo $this->get_field_name( 'state' ); ?>" > | |
<option value="AL" <?php if ( $state == 'AL' ) echo 'selected'; ?>>Alabama</option> | |
<option value="AK" <?php if ( $state == 'AK' ) echo 'selected'; ?>>Alaska</option> | |
<option value="AZ" <?php if ( $state == 'AZ' ) echo 'selected'; ?>>Arizona</option> | |
<option value="AR" <?php if ( $state == 'AR' ) echo 'selected'; ?>>Arkansas</option> | |
<option value="CA" <?php if ( $state == 'CA' ) echo 'selected'; ?>>California</option> | |
<option value="CO" <?php if ( $state == 'CO' ) echo 'selected'; ?>>Colorado</option> | |
<option value="CT" <?php if ( $state == 'CT' ) echo 'selected'; ?>>Connecticut</option> | |
<option value="DE" <?php if ( $state == 'DE' ) echo 'selected'; ?>>Delaware</option> | |
<option value="FL" <?php if ( $state == 'FL' ) echo 'selected'; ?>>Florida</option> |
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
// keyframes mixin | |
// usage: | |
// @include keyframes(bgcolor) { | |
// 0% { | |
// background-color: #ffccf2; | |
// } | |
// 50% { | |
// background-color: #ccffcc; | |
// } |
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 number_expeditions( $post_ID ) { | |
global $wpdb; | |
if ( !wp_is_post_revision( $post_ID ) ) { | |
$dispatchNumber = false; | |
$parent = wp_get_post_parent_id( $post_ID ); | |
$dispatchArgs = 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
'use strict'; | |
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
dirs: { | |
bower: './bower_components', | |
lib: './lib', |
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
'use strict'; | |
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
notify: { | |
watch: { | |
options: { |
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 🔦($🔋) { | |
if ($🔋 === '🐯') { | |
return '🔑'; | |
} | |
return '🍒'; | |
} |
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
// =Utility Classes | |
// These silent classes, called with @extend, and never output to CSS unless specifically called. | |
// example: | |
// @extend %ir; | |
// Image Replacement | |
%ir { | |
background-color: transparent; | |
border: 0; | |
overflow: hidden; |
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 loadSVG( url ) { | |
// AJAX-y load the SVG icon | |
var req = new XMLHttpRequest(); | |
req.onload = serializeSVG; | |
req.open( 'get', url, true ); | |
req.send( null ); | |
} | |
function serializeSVG() { | |
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 getWeather() { | |
if (false === ( $theWeather = get_transient('theWeather') ) ) { | |
$xmlUrl = 'http://www.google.com/ig/api?weather=portland&oe=utf-8&'; | |
$output = wp_remote_fopen($xmlUrl); | |
$xmlData = simplexml_load_string($output); | |
$conditions = $xmlData->weather->current_conditions->condition['data']; | |
$raining = array( 'Showers', 'Scattered Showers', 'Chance of Rain', 'Chance of Storm', 'Rain', 'Light Rain' ); |
NewerOlder