This file contains hidden or 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(){ | |
function post_height(){ | |
var msg = JSON.stringify({event:'size', height: document.body.scrollHeight}); | |
window.top.postMessage(msg, '*'); | |
} | |
var onload = window.onload; | |
window.onload = function(){ | |
if( onload && typeof onload =='function'){ |
This file contains hidden or 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 acf_fix_local_fields | |
{ | |
public function __construct() | |
{ | |
add_action('acf/include_fields', array($this, 'fix_local_fields'), 20 ); | |
} | |
public function fix_local_fields() |
This file contains hidden or 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
jQuery(function($){ | |
if( $('body').hasClass('disable-scribd') ) return; | |
// check for a disable variable | |
var pairs = window.location.search.replace(/^\?/, '').split('&'); | |
var disabled = false; | |
$.each(pairs, function(i, pair){ | |
var keyval = pair.split('='); | |
if( keyval[0] == 'disable-scribd' ){ | |
disabled = true; | |
return false; |
This file contains hidden or 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
#! /usr/bin/env php | |
<?php | |
echo "MySQL root Password: "; | |
system('stty -echo'); | |
$root_password = trim(fgets(STDIN)); | |
system('stty echo'); | |
// add a new line since the users CR didn't echo | |
echo "\n"; |
This file contains hidden or 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
/** | |
* Retrieve the stored shopping cart and pass it to the callback. | |
*/ | |
sync : function(){ | |
return $.get('/modules/booking/content/functions.cfc?method=getCartJSONAjax&returnFormat=json'); | |
}, |
This file contains hidden or 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
jQuery(function($){ | |
$(document).on('gform_post_render', function(e, form_id){ | |
$('#gform_ajax_frame_'+form_id).attr('src', 'about:blank'); | |
}); | |
}); |
This file contains hidden or 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.preBind = function(type, data, fn) { | |
var currentBindings = this.data('events')[type]; | |
var currentBindingsLastIndex = currentBindings.length - 1; | |
var newBindings = []; | |
// bind the event | |
this.bind(type, data, fn); | |
// move the new event to the top of the array | |
newBindings.push(currentBindings[currentBindingsLastIndex]); |
This file contains hidden or 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 $ = jQuery; | |
module.exports = { | |
init : function(){ | |
$(document).on('submit', 'form.searchform', function(e){ | |
if( window.angular ){ | |
e.preventDefault(); | |
var $form = $(e.currentTarget); | |
var data = $form.serialize(); | |
var $injector = angular.element( $('html')[0] ).injector(); | |
This file contains hidden or 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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^wp\-content\/uploads(.*)$ https://production-domain.com/wp-content/uploads$1 [L,R=301] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^wp\-content\/blogs(.*)$ https://production-domain.com/wp-content/blogs$1 [L,R=301] | |
RewriteCond %{REQUEST_FILENAME} !-f |
This file contains hidden or 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 | |
$path = pathinfo( __FILE__ ) ['dirname']; | |
include( $path . '/config.php' ); | |
wp_enqueue_script( 'wpb_composer_front_js' ); | |
$fullwidth_start = $output = $fullwidth_end = ''; |