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
var APP = APP || {}; | |
APP.fire = { | |
init : function () { | |
}, | |
index : function () { | |
}, |
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
.horizontalScroll { | |
width: 100%; | |
height: 200px; | |
overflow: scroll; | |
overflow-y: hidden!important; | |
white-space: nowrap; | |
-webkit-overflow-scrolling: touch; | |
} |
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
Show hidden characters
{ | |
"binary_file_patterns": | |
[ | |
"*.jpg", | |
"*.jpeg", | |
"*.png", | |
"*.gif", | |
"*.ttf", | |
"*.tga", | |
"*.dds", |
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
var checkboxes = document.querySelectorAll("input.checkbox"); | |
for (var i = 0; i < checkboxes.length; i++) { checkboxes[i].click(); }; |
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
for (var i = 0; i < copy.length; i++) { | |
console.log(copy[i].toLowerCase().replace(/[^\w\s]/gi, '').replace(/\s+/g, '-')); | |
}; |
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 | |
if ( is_home() ) { | |
global $wp_query; | |
$args = array_merge( $wp_query->query, array( | |
'meta_query' => array( | |
array( | |
'key' => 'hidefromhome', | |
'value' => 0 | |
) |
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
jQuery.extend({ | |
getParam: function(n,u) { | |
if(!u) var u = window.location.search; | |
var match = RegExp('[?&]' + n + '=([^&]*)').exec(u); | |
return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); | |
} | |
}); |
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 get_terms_chekboxes($taxonomies, $args) { | |
$terms = get_terms($taxonomies, $args); | |
foreach($terms as $term){ | |
$output .= '<label for="'.$term->slug.'"><input type="checkbox" id="'.$term->slug.'" name="'.$term->taxonomy.'" value="'.$term->slug.'"> '.$term->name.'</label>'; | |
} | |
return $output; | |
} |
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
// use inside the loop | |
// <div <?php post_class() ?> <?php post_thumbnail_data_attributes(); ?>> | |
// data-thumbnail-large="http://url.com/wp-content/uploads/2013/07/chicago-1000x703.jpg" | |
// data-thumbnail-medium="http://url.com/wp-content/uploads/2013/07/chicago-500x351.jpg" | |
function post_thumbnail_data_attributes() { | |
$thumbnail_id = get_post_thumbnail_id(); | |
$thumbnail_large = wp_get_attachment_image_src($thumbnail_id, 'large'); |
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 div_shortcode($atts, $content = null ) { | |
extract(shortcode_atts(array('class' => '', 'id' => '' ), $atts)); | |
$return = '<div'; | |
if (!empty($class)) $return .= ' class="'.$class.'"'; | |
if (!empty($id)) $return .= ' id="'.$id.'"'; | |
$return .= '>'. do_shortcode($content) . '</div>'; | |
return $return; | |
} | |
add_shortcode('div', 'div_shortcode'); |