Created
May 11, 2017 17:43
-
-
Save sc0ttkclark/240574189719e1e91fb79d68301d6624 to your computer and use it in GitHub Desktop.
Fix for extending The Events Calendar content types in Pods (fixed in Pods 2.7 but it's not released yet)
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 | |
add_action( 'admin_enqueue_scripts', 'tribe_fix_pods_handlebars_conflict', 16 ); | |
/** | |
* The Events Calendar uses a newer version of Handlebars that conflicts | |
* when Pods tries to load it's outdated version of Handlebars. | |
* | |
* This removes the Pods handlebars | |
*/ | |
function tribe_fix_pods_handlebars_conflict() { | |
$screen = get_current_screen(); | |
// Deregister the outdated Pods handlebars script on TEC event screen | |
if ( $screen && 'tribe_events' === $screen->post_type ) { | |
wp_deregister_script( 'pods-handlebars' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment