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
| This is a country list, containing all the countries in the Tribe Plugins. | |
| If you are running Events Calendar Pro and would like to remove one or more | |
| of them from the available options for new events, copy/paste the following into | |
| WP Admin > Events > Settings > Default Content > Use a custom list of countries | |
| Then delete every country you do not need. | |
| ==COPY/PASTE EVERYTHING AFTER THIS LINE== | |
| US, United States | |
| AF, Afghanistan | |
| AL, Albania |
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 | |
| /** | |
| * Returns a black hole email address | |
| * | |
| * @see https://en.wikipedia.org/wiki/Black_hole_(networking)#Black_hole_e-mail_addresses | |
| * | |
| * @return string | |
| */ | |
| function tribe_return_blackhole_email() { |
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 | |
| /** | |
| * Tells ECP to append and trim recurrences every hour instead of every day. | |
| * | |
| * @see (wp filter) schedule_event | |
| * | |
| * @return mixed | |
| */ | |
| function tribe_alter_recurrence_rebuild_schedule( $event ) { |
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 | |
| /** | |
| * Set the events per page on photo view. | |
| */ | |
| function tribe_photo_posts_per_page( $value, $name, $default ){ | |
| if ( 'postsPerPage' === $name && tribe_is_photo() ) { | |
| $value = '30'; | |
| } | |
| return $value; |
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 ); |
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 | |
| /** | |
| * Hides cost from the single event details section | |
| * | |
| * @param string $tpl Template relative path | |
| */ | |
| function tribe_single_hide_cost( $tpl ) { | |
| if ( 'modules/meta/details.php' === $tpl ) { | |
| add_filter( 'tribe_get_formatted_cost', '__return_empty_string' ); |
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 | |
| /** | |
| * Sets the status of Community Events to the default status after they have been edited | |
| * | |
| * When you set Community submitted events to a status like "Pending Review" and a | |
| * user submits a new event, it will be marked Pending Review and will not be visible | |
| * until an admin publishes it. However if a user edits this event after it has been | |
| * published, it will stay published. With this code it will instead go to Pending Review | |
| * and will again be removed from public view until an admin republishes the event. |
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
| /* | |
| * Limits the number of tags visible to the TEC widget filter in WP Admin | |
| * | |
| * Useful for when your site has loads of tags. Which causes WP Admin > Widgets | |
| * page to load very slowly or not at all. | |
| */ | |
| function tribe_limit_get_terms( $terms, $taxonomy, $query_vars, $term_query ) { | |
| if( ! is_admin() ) return $terms; |
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 | |
| /* | |
| * Prevent Facebook importer from importing images | |
| * Useful fore countries where laws such as copyright can make this a problem | |
| */ | |
| add_filter( 'tribe_fb_event_img', '__return_false' ); |
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 | |
| /* | |
| * SWAP EVERY INSTANCE OF A WORD FOR ANOTHER | |
| * See the codex to learn more about WP text domains: | |
| * http://codex.wordpress.org/Translating_WordPress#Localization_Technology | |
| * Example Tribe domains: 'tribe-events-calendar', 'tribe-events-calendar-pro'... | |
| */ | |
| function tribe_str_replace ( $translation, $text, $domain ) { |