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
// ++ Array Remove - By John Resig (MIT Licensed) | |
//---------------------------------------------- | |
Array.prototype.remove = function(from, to) { | |
var rest = this.slice((to || from) + 1 || this.length); | |
this.length = from < 0 ? this.length + from : from; | |
return this.push.apply(this, rest); | |
}; | |
// ++ Trim spaces | |
//---------------------------------------------- |
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
$.fn.dataTableExt.ofnSearch['html'] = function ( sData ) { | |
var n = document.createElement('div'); | |
n.innerHTML = sData; | |
if ( n.textContent ) { | |
return n.textContent.replace(/\n/g," "); | |
} else { | |
return n.innerText.replace(/\n/g," "); | |
} | |
} |
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
// ++ Condense XML | |
//---------------------------------------------- | |
String.prototype.trimXML = function () { | |
return this.replace(/>[\s]*</g, "><"); | |
}; | |
// ++ Return the content of a tag | |
//---------------------------------------------- | |
String.prototype.getTag = function (tag) { | |
var array = this.match(new RegExp('\\<' + tag + '\\>(.*?)(?=\\<\\/' + tag + '\\>)')); |
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 GetUserProfileByName = function (accountName) { | |
var soap = ''; | |
accountName = accountName || ''; //Blank accountName returns results for current user | |
soap += '<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">'; | |
soap += ' <soap12:Body>'; | |
soap += ' <GetUserProfileByName xmlns="http://microsoft.com/webservices/SharePointPortalServer/UserProfileService">'; | |
soap += ' <accountName>' + accountName + '</accountName>'; | |
soap += ' </GetUserProfileByName>'; | |
soap += ' </soap12:Body>'; | |
soap += '</soap12:Envelope>'; |
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
/* | |
* (madness?).log() | |
* | |
* Copyright (c) 2012 Kevin Attfield | |
* Licensed under the MIT license. | |
*/ | |
Object.prototype.log = function(){ | |
console.log(this.valueOf()); | |
return this; |
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
$.whenReady = function(target, delay) { | |
var dfd = $.Deferred(); | |
var look = window.setInterval(function() { | |
var $target = $(target); | |
if($target.length) { | |
dfd.resolve($target); | |
window.clearInterval(look); | |
} | |
}, delay || 10); | |
return dfd; |
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 currentTimeZoneOffsetInHours = (new Date()).getTimezoneOffset()/60; |
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 | |
function themename_customize_register($wp_customize){ | |
$wp_customize->add_section('themename_color_scheme', array( | |
'title' => __('Color Scheme', 'themename'), | |
'priority' => 120, | |
)); | |
// ============================= |
OlderNewer