Last active
December 20, 2015 13:09
-
-
Save jazbek/6136353 to your computer and use it in GitHub Desktop.
Fix double comments form showing - temporary fix until we've released a fix
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 | |
| function tribe_no_comments_form() { | |
| return TribeEvents::instance()->pluginPath . 'admin-views/no-comments.php'; | |
| } | |
| add_action( 'tribe_events_before_view', 'tribe_disable_comments_form' ); | |
| function tribe_disable_comments_form() { | |
| add_action( 'comments_template', 'tribe_no_comments_form' ); | |
| } | |
| add_action( 'tribe_events_after_view', 'tribe_enable_comments_form' ); | |
| function tribe_enable_comments_form() { | |
| remove_action( 'comments_template', 'tribe_no_comments_form' ); | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment