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
let root = 'src'; | |
let resolveToComponents = ( glob = '' ) => { | |
return $.path.join( root, 'components', glob ); // app/components/{glob} | |
}; | |
gulp.task( 'component', () => { | |
const cap = ( val ) => { | |
return val.charAt( 0 ).toUpperCase() + val.slice( 1 ); | |
}; | |
const name = $.yargs.argv.name; | |
const parentPath = $.yargs.argv.parent || ''; |
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
angular.module('mdChipDraggable', []) | |
.directive('mdChipDraggable', function () { | |
return { | |
restrict: 'A', | |
scope: {}, | |
bindToController: true, | |
controllerAs: 'vm', | |
controller: ['$document', '$scope', '$element', '$timeout', | |
function ($document, $scope, $element, $timeout) { | |
var vm = 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
.material-icons { | |
&.md-18 { | |
height: 18px; | |
width: 18px; | |
font-size: 18px; | |
min-height: 18px; | |
min-width: 18px; | |
} | |
&.md-24 { |
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
function makeConcatenater ( left ) { | |
return function ( right ) { | |
return left + ' ' + right; | |
} | |
} | |
var addString = makeConcatenater ( 'Hello' ); | |
addString( 'World' ); | |
/////////////////////////////// | |
function makeAdder ( left ) { |
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
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
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 | |
function _pit_pending_post_status( $new_status, $old_status, $post ) { | |
$post_author_id = $post->post_author; | |
$post_author = get_the_author_meta( 'display_name', $post_author_id ); | |
$post_date = $post->post_date; | |
$post_title = $post->post_title; | |
if ( $new_status === 'pending' && $old_status !== 'pending' ) { | |
$headers[] = 'Content-Type: text/html; charset=UTF-8'; |
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 | |
// CHECK IF REPEATER EXISTS | |
if( have_rows('repeater_field_name') ): | |
// REPEATER LOOP | |
while ( have_rows('repeater_field_name') ) : the_row(); | |
// ANY SUBFIELDS NOT IN THE FLEXIBLE CONTENT (IE THE HEADING) | |
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
<section id="home-sub-hero" class="container-fluid"> | |
<article class="row center-xs around-xs"> | |
<div class="col-xs-12 col-md-8"><?php | |
if( get_field( 'subhero_heading', $post_id ) ) : | |
?><h3 class="subhero_heading"><?php | |
_e( the_field( 'subhero_heading', $post_id ), '_tvk' ); | |
?></h3><?php | |
endif; | |
if( get_field( 'subhero_content', $post_id ) ) : | |
?><div class="subhero_content"><?php |
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 | |
function _pit_month_names() { | |
for ( $m=1; $m<=12; $m++ ) { | |
$months[] = array( | |
'month_display_name' => date( 'F', mktime( 0,0,0, $m, 1, date('Y') ) ), | |
'month_attr_name' => date( 'M', mktime( 0,0,0, $m, 1, date('Y') ) ), | |
); | |
} | |
return $months; |
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
/* | |
Welcome to Custom CSS! | |
CSS (Cascading Style Sheets) is a kind of code that tells the browser how | |
to render a web page. You may delete these comments and get started with | |
your customizations. | |
By default, your stylesheet will be loaded after the theme stylesheets, | |
which means that your rules can take precedence and override the theme CSS | |
rules. Just write here what you want to change, you don't need to copy all |
NewerOlder