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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
global $wpdb; | |
$query = "SELECT $wpdb->posts.ID | |
FROM $wpdb->posts | |
WHERE $wpdb->posts.post_type = 'facility' | |
ORDER BY RAND() | |
LIMIT 8"; | |
$results = $wpdb->get_col($wpdb->prepare( $query )); | |
$ar_posts = 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
# ignore everything in the root except the "wp-content" directory. | |
/* | |
!wp-content/ | |
# ignore all files starting with . | |
.* | |
# track this file .gitignore (i.e. do NOT ignore it) | |
!.gitignore |
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
<style type="text/css"> | |
.videoWrapper { | |
position: relative; | |
padding-bottom: 56.25%; /* 16:9 */ | |
padding-top: 25px; | |
height: 0; | |
} | |
.videoWrapper iframe { | |
position: absolute; | |
top: 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
var user_name = []; | |
$bulk_row.find('input[name="user_name[]"]:checked').each(function(index, elem) { | |
user_name.push(elem.value); | |
}); | |
var data = { | |
action: 'ajax_form', | |
user_name: user_name | |
} |
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 | |
$args['meta_query'] = array( | |
array( | |
'key' => 'array_terms_id', | |
'value' => sprintf(':"%s";', $term->term_id), | |
'compare' => 'LIKE' | |
) | |
); |
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
.parent { | |
position: relative; | |
overflow: hidden; | |
} | |
.child { | |
position: absolute; | |
top: -9999px; | |
bottom: -9999px; | |
left: -9999px; |
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 $document = jQuery(document), | |
$window = jQuery(window), | |
$header = jQuery('header.header-hc2'), | |
$container = $header.children('.container'), | |
$secondNav = $header.children('.secondary-navigation'), | |
$secondContainer = $secondNav.children('.container'), | |
onMobile = false, | |
scrollTop = 0, | |
scrollTimeout = false, | |
headerStatus = false; |
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 x = { | |
... | |
} | |
x.each(function(){ | |
if(x == 'break') return false; | |
else if(x == 'continue') return true; | |
}); |