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
/* --- comments --- */ | |
.commentlist { | |
margin-left: 0; | |
} | |
#comments { | |
padding-top: 20px; | |
} |
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
var list = $('ul'); | |
var listItems = list.children('li'); | |
list.append(listItems.get().reverse()); |
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
// RELOADS WEBPAGE WHEN MOBILE ORIENTATION CHANGES | |
window.onorientationchange = function() { | |
var orientation = window.orientation; | |
switch(orientation) { | |
case 0: window.location.reload(); | |
break; | |
case 90: window.location.reload(); | |
break; | |
case -90: window.location.reload(); | |
break; |
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 | |
$arr = array( new stdClass(), new stdClass() ); | |
$arr[0]->colour = 'red'; | |
$arr[1]->colour = 'green'; | |
$arr[1]->state = 'enabled'; | |
if (in_array_field('red', 'colour', $arr)) | |
echo 'Item exists with colour red.'; | |
if (in_array_field('magenta', 'colour', $arr)) |
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 | |
$category = get_queried_object(); | |
echo $category->term_id; | |
?> |
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
[wpv-if fieldname="wpcf-fieldname" evaluate="empty(fieldname)" condition="false"][/wpv-if] |
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 compareArrays(sup, sub) { | |
sup.sort(); | |
sub.sort(); | |
var i, j; | |
for (i=0,j=0; i<sup.length && j<sub.length;) { | |
if (sup[i] < sub[j]) { | |
++i; | |
} else if (sup[i] == sub[j]) { | |
++i; ++j; | |
} else { |
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
::-webkit-input-placeholder { | |
color: red; | |
} | |
:-moz-placeholder { /* Firefox 18- */ | |
color: red; | |
} | |
::-moz-placeholder { /* Firefox 19+ */ | |
color: red; |
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
-webkit-appearance: none; | |
border-radius: 0; | |
-webkit-border-radius: 0; |