Created
August 10, 2013 20:31
-
-
Save rosshanney/6202009 to your computer and use it in GitHub Desktop.
Ensure that Polylang plugin is loaded on Ajax request, to ensure calendar output is translated
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 | |
/* | |
Plugin name: GCE Load Polylang on Ajax requests | |
*/ | |
function gce_load_polylang_on_ajax() { | |
?> | |
<script type="text/javascript"> | |
if (typeof jQuery != 'undefined') { | |
jQuery.ajaxSetup({ | |
data: { pll_load_front: true } | |
}); | |
} | |
</script> | |
<?php | |
} | |
add_action( 'wp_head', 'gce_load_polylang_on_ajax' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment