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
if ( isset( $args['value_field'] ) && isset( $category->{$args['value_field']} ) ) { | |
$value_field = $args['value_field']; | |
$value = esc_attr( $category->{$value_field} ); | |
} elseif( isset( $args['value_field'] ) && 'url' === $args['value_field'] ) { | |
$value = esc_url( get_term_link( $category ) ); | |
} else { | |
$value_field = 'term_id'; | |
$value = esc_attr( $category->{$value_field} ) | |
} |
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() { | |
"use strict"; | |
{ // YAY! we can use braces just like this | |
let foo = 'bar'; | |
} | |
console.log(foo); // undefined, the magic of let | |
})(); |
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 sum() { | |
var result; | |
for(var i = 0; i < arguments.length; i++) { | |
result = result + argumnts[i]; | |
} | |
return result; | |
} |
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 $btn = $('#btn'); | |
(isEnable) ? $btn.fadeIn() : $btn.hide(); |
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
.opaque { | |
color: red; | |
background-color:rgba(255,0,0,0.5); | |
} |
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
@font-face { | |
font-family: 'Lato'; | |
font-style: normal; | |
font-weight: 100; | |
src: local('Lato Hairline'), local('Lato-Hairline'), url(http://fonts.gstatic.com/s/lato/v11/h3_FseZLI76g1To6meQ4zX-_kf6ByYO6CLYdB4HQE-Y.woff2) format('woff2'); | |
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; | |
} |
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 hasFlash = false; | |
try { | |
hasFlash = Boolean(new ActiveXObject('ShockwaveFlash.ShockwaveFlash')); | |
} catch (exception) { | |
hasFlash = ('undefined' != typeof navigator.mimeTypes['application/x-shockwave-flash']); | |
} |
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 paymentCheck() { | |
var obj = { | |
'type': 'car', | |
'year': 2008, | |
'make': 'Dodge', | |
'model': 'Avenger', | |
'payments': 'in process', | |
'paid': 13286, | |
'toBePaid': 34856, | |
'paymentsLeft': 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 supports_video() { | |
return !!document.createElement('video').canPlayType; | |
} |
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
Console.prototype.log = function() {}; | |
Console.prototype.error = function() {}; | |
window.console = new console; |