Skip to content

Instantly share code, notes, and snippets.

@rosshanney
Created October 3, 2012 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rosshanney/3829836 to your computer and use it in GitHub Desktop.
Save rosshanney/3829836 to your computer and use it in GitHub Desktop.
Hopefully fixes an Ajax error
<?php
/*
Plugin name: Fix GCE Ajax error
*/
function gce_fix_ajax_error() {
global $wp_scripts;
if ( isset( $wp_scripts->registered['gce_scripts']->extra['data'] ) ) {
$wp_scripts->registered['gce_scripts']->extra['data'] = str_replace( 'https', 'http', $wp_scripts->registered['gce_scripts']->extra['data'] );
}
}
add_action( 'wp_print_scripts', 'gce_fix_ajax_error' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment