Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rosshanney
Created January 7, 2013 19:20
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/4477623 to your computer and use it in GitHub Desktop.
Save rosshanney/4477623 to your computer and use it in GitHub Desktop.
Attempt to work around IE Ajax issue by hardcoding Ajax URL.
<?php
/*
Plugin name: Hardcode AJAX URL for Google Calendar Events
*/
function gce_hardcode_ajax_url() {
if ( defined( 'GCE_GENERAL_OPTIONS_NAME' ) ) {
$options = get_option( GCE_GENERAL_OPTIONS_NAME );
wp_localize_script( 'gce_scripts', 'GoogleCalendarEvents', array(
'ajaxurl' => 'http://www.ledøjeforsamlingshus.dk/wp-admin/admin-ajax.php',
'loading' => $options['loading']
) );
}
}
add_action( 'wp_enqueue_scripts', 'gce_hardcode_ajax_url', 99 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment