Created
January 7, 2013 19:20
-
-
Save rosshanney/4477623 to your computer and use it in GitHub Desktop.
Attempt to work around IE Ajax issue by hardcoding Ajax URL.
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: 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