Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fix for extending The Events Calendar content types in Pods (fixed in Pods 2.7 but it's not released yet)
<?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
You can’t perform that action at this time.