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 | |
/** | |
* Comment form hidden fields | |
*/ | |
function comment_form_hidden_fields() | |
{ | |
comment_id_fields(); | |
if ( current_user_can( 'unfiltered_html' ) ) | |
{ |
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
/** | |
* Archive pagination | |
* @param string $prevText Previous page link text. Leave blank to ignore. | |
* @param string $nextText Next page link text. Leave blank to ignore. | |
* @param integer $break Number of page links to display before truncation. Set to 0 to ignore. | |
*/ | |
public static function archive_pagination($prevText = 'Previous', $nextText = 'Next', $break = 10) | |
{ | |
// Maximum pages | |
global $wp_query; |
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 | |
class Tweets | |
{ | |
/** | |
* Cached results as key => value array | |
*/ | |
private static $cache = array(); | |
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
.ms-compatible-rgba-bg(@color, @alpha) { | |
// Lacking Sass' 'transparentize' function here =( | |
background-color:rgba( red(@color), green(@color), blue(@color), @alpha); | |
// Less can be very ugly, but using JS parsing is pretty useful | |
@alpha_rgb: 255 * @alpha; | |
@alpha_hex: ~`( parseInt("@{alpha_rgb}", 10)).toString(16)`; | |
@color_str: ~`"@{color}".replace('#', '')`; |
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
define(function() { | |
return { | |
/** | |
* Queue | |
* @type {Array} | |
*/ | |
queue: [], |
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
define(function() { | |
/** | |
* CSS feature detection | |
* @param {String} property | |
* @returns {String} | |
*/ | |
return function(property) { | |
var i, len, prop; | |
var support = ''; |
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
$layout-max-width: 64em; | |
$layout-break-point: 48em; | |
$layout-min-width: 20em; | |
$layout-column-count: 12; | |
$layout-column-width: 60; | |
$layout-gutter-width: 20; |
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
// {{#loop 12}} | |
// <output> | |
// {{/loop}} | |
handlebars.registerHelper('loop', function(count, options) { | |
var out = ""; | |
while (count--) { | |
out+= options.fn(); | |
} |
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
/** @jsx React.DOM */ | |
var MyComponent = React.createClass({ | |
render: function () { | |
return ( | |
<p ref="p">{this.props.children}</p> | |
); | |
} | |
}); |
OlderNewer