Skip to content

Instantly share code, notes, and snippets.

View sergeimuller's full-sized avatar

Sergei Müller sergeimuller

View GitHub Profile
@sergeimuller
sergeimuller / characterCount.js
Last active October 4, 2015 12:37
Dialog Character Count
//characterCount function specified on dialog node
function (textbox, max) {
var count = max - document.getElementById(textbox.el.id).value.length;
var counter = textbox.container.dom.nextElementSibling;
if (count < 0) {
counter.innerHTML = '<b>Max characters: (' + max + ')</b> <span style=\"color:#fb4c50;\">Remaining: (' + count + ')</span><br /><br />' + textbox.fieldDescription;
} else {
counter.innerHTML = '<b>Max characters: (' + max + ')</b> Remaining: (' + count + ')<br /><br />' + textbox.fieldDescription;
}
}
@sergeimuller
sergeimuller / gist:2107101
Created March 19, 2012 10:40 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(