Created
March 20, 2020 04:49
-
-
Save cliffordp/2b9369b9c2911fcef05ad10620d954e7 to your computer and use it in GitHub Desktop.
Community Events: Disable the "Venue Details" linked post type box from the "Add New Event" and "Edit Event" forms.
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 | |
/** | |
* Community Events: Disable the "Venue Details" linked post type box from the "Add New Event" and "Edit Event" forms. | |
* | |
* @link https://gist.github.com/cliffordp/2b9369b9c2911fcef05ad10620d954e7 This snippet. | |
* | |
* @param array $templates | |
* @param string $slug | |
* | |
* @return array | |
*/ | |
function cliff_disable_ce_venues( $templates, $slug ) { | |
if ( 'community/modules/venue' === $slug ) { | |
return []; | |
} | |
return $templates; | |
} | |
add_filter( 'tribe_get_template_part_templates', 'cliff_disable_ce_venues', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment