Created
October 3, 2012 21:03
-
-
Save rosshanney/3829836 to your computer and use it in GitHub Desktop.
Hopefully fixes an Ajax error
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 | |
/* | |
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