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
if ($.validator) { | |
//returns all elements, even with the same name (default returns only the first element for each name) | |
$.validator.prototype.elements = function() { | |
var validator = this; | |
// select all valid inputs inside the form (no submit or reset buttons) | |
return $( this.currentForm ) | |
.find( "input, select, textarea" ) | |
.not( ":submit, :reset, :image, [disabled], [readonly]" ) | |
.not( this.settings.ignore ) |
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
//Insert here serialized string from wp_options table | |
$str = ''; | |
function change(&$data) | |
{ | |
if(is_string($data) && json_decode($data)){ | |
$json = json_decode($data); | |
if(is_array($json) || is_object($json)){ | |
foreach($json as &$jsonvalue){ | |
change($jsonvalue); |
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
/** | |
* Tiny jQuery Plugin | |
* by Chris Goodchild | |
* https://css-tricks.com/snippets/jquery/check-if-element-exists/ | |
* | |
*/ | |
$.fn.exists = function(callback) { | |
if (this.length) { | |
var args = [].slice.call(arguments, 1); | |
callback.call(this, args); |
NewerOlder