Created
October 20, 2016 02:56
-
-
Save elimn/377281caf414c2e3dc526277c7d885e4 to your computer and use it in GitHub Desktop.
MT | ECP | Remove the frontend links to the venue and organizer pages when Pro is active.
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 | |
| /** | |
| * Remove the frontend link to the venue page when Pro is active. | |
| */ | |
| function tribe_remove_venue_link() { | |
| remove_filter( 'tribe_get_venue', array( Tribe__Events__Pro__Main::instance()->single_event_meta, 'link_venue' ) ); | |
| } | |
| add_action( 'tribe_events_single_meta_before', 'tribe_remove_venue_link', 100 ); | |
| /** | |
| * Remove the frontend link to the organizer page when Pro is active. | |
| */ | |
| function tribe_remove_org_link( $html, $id ){ | |
| return tribe_get_organizer( $id ); | |
| } | |
| add_filter( 'tribe_get_organizer_link', 'tribe_remove_org_link', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment