Skip to content

Instantly share code, notes, and snippets.

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 sc0ttkclark/240574189719e1e91fb79d68301d6624 to your computer and use it in GitHub Desktop.
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)
<?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