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
Date.prototype.toISOTimeString = function() { | |
// CREATE ISO STRING AND RETURN JUST THE TIMESTAMP PORTION | |
return this.toISOString().split('T')[1]; | |
}; |
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
Date.prototype.toISODateString = function() { | |
// CREATE ISO STRING AND RETURN JUST THE DATE PORTION | |
return this.toISOString().split('T')[0]; | |
}; |
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
HTMLElement.prototype.getAncestorByTagName = function( tagName ) { | |
var target = this; | |
while ( target.tagName.toLowerCase() != tagName && target.tagName.toLowerCase() != 'body' ) { | |
target = target.parentNode; | |
} | |
if ( target.tagName.toLowerCase() == 'body' ) { | |
return false; | |
} else { | |
return target; | |
} |
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
// FORCE ALL TRAFFIC TO USE SSL | |
add_filter( 'admin_init' , 'prefix_add_force_ssl_setting' ); | |
add_action('template_redirect', 'prefix_force_ssl'); | |
function prefix_add_force_ssl_setting() { | |
register_setting( 'general', 'prefix_force_ssl', 'esc_attr' ); |
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 | |
if ( ! class_exists( 'AZM_Settings_Page' ) ) { | |
class AZM_Settings_Page { | |
/***********************************************************************/ | |
/*************************** CONSTRUCTOR *****************************/ | |
/***********************************************************************/ |
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
(function(window) { | |
window.FooBarClass = (function() { | |
/***************************************/ | |
/************* INITIALIZE **************/ | |
/***************************************/ | |
var Class = function( params ) { |
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
HTMLElement.prototype.scrollHorizontally = function( newScrollLeft ) { | |
var self = this; | |
newScrollLeft = newScrollLeft ? newScrollOffset : self.scrollWidth - self.offsetWidth | |
animate(); | |
function animate(){ |
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 | |
/***********************************************************************/ | |
/*************************** TRACKER CLASS ***************************/ | |
/***********************************************************************/ | |
if ( ! class_exists( 'Custom_Post_Types_Manager' ) ) { | |
class Custom_Post_Types_Manager { |
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
window.ajax = function( params ) { | |
var method = 'method' in params ? params['method'] : 'get'; | |
var queryURL = 'queryURL' in params ? params['queryURL'] : ''; | |
var data = 'data' in params ? params['data'] : ''; | |
var dataArray = []; | |
var dataString = ''; | |
var successCallback = 'success' in params ? params['success'] : function(params){console.log('Successfully completed AJAX request.')}; |