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 | |
| add_action('wp_router_generate_routes', 'tribe_set_community_template', 100, 1); | |
| function tribe_set_community_template( $router ) { | |
| $new_template = array( | |
| 'template' => array('new-template.php'), // edit this filename to be the one you want to use in your theme | |
| ); | |
| $router->edit_route('ce-edit-venue-route', $new_template); | |
| $router->edit_route('ce-edit-organizer-route', $new_template); | |
| $router->edit_route('ce-edit-route', $new_template); |
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 | |
| add_action('admin_head', 'tribe_fix_recurrence_dialog'); | |
| function tribe_fix_recurrence_dialog(){ | |
| ?> | |
| <style type="text/css"> | |
| .ui-widget-overlay.ui-front {z-index: 90; } | |
| </style> | |
| <?php | |
| } |
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' ); | |
| } |
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
| add_filter( 'tribe_events_form_metabox_after_the_organizer', 'tribe_community_add_event_website_field'); | |
| function tribe_community_add_event_website_field( $post_id ) { | |
| $event_url = isset($_POST['EventURL']) ? $_POST['EventURL'] : ''; | |
| echo '<table class="tribe-community-event-info" cellspacing="0" cellpadding="0"> | |
| <tr> | |
| <td colspan="2" class="tribe_sectionheader"> | |
| <h4 class="event-time">Event Website</h4> | |
| </td><!-- .tribe_sectionheader --> | |
| </tr> | |
| <tr> |
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
| add_filter('tribe-events-bar-views', 'tribe_filter_view_names', 100); | |
| function tribe_filter_view_names($views){ | |
| foreach ( $views as &$view ) { | |
| if ( $view['anchor'] == 'Month' ) { | |
| $view['anchor'] = 'Calendar'; | |
| } else if ( $view['anchor'] == 'Photo') { | |
| $view['anchor'] = 'List'; | |
| } | |
| } | |
| return $views; |
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
| // Fix datepicker | |
| add_action('tribe_events_form_metabox_the_date', 'tribe_fix_midway_datepicker'); | |
| function tribe_fix_midway_datepicker($html) { | |
| echo ThemexInterface::renderOption(array('type' => 'date')); | |
| return $html; | |
| } |
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 | |
| add_action( 'init', 'tribe_events_wootheme_compatibility' ); | |
| function tribe_events_wootheme_compatibility() { | |
| if ( ! is_home() ) { | |
| remove_filter( 'pre_get_posts', 'woo_exclude_categories_homepage', 10 ); | |
| } | |
| } |
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 | |
| add_action('wp_enqueue_scripts', 'enqueue_month_view_scripts'); | |
| function enqueue_month_view_scripts() { | |
| Tribe_Template_Factory::asset_package('ajax-calendar'); | |
| Tribe_Template_Factory::asset_package('events-css'); | |
| } | |
| ?> |
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
| // sfw endpoint | |
| add_action( 'init', 'add_sfw_endpoint' ); | |
| function add_sfw_endpoint() | |
| { | |
| add_rewrite_endpoint( 'sfw', EP_ALL ); | |
| } | |
| add_action( 'pre_get_posts', 'sfw_pre_get_posts' ); | |
| function sfw_pre_get_posts($query) | |
| { |
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
| add_filter('add_post_metadata', 'create_acf_repeater', 10); | |
| function create_acf_repeater($check, $object_id, $meta_key, $meta_value) | |
| { | |
| if (strpos($meta_key, 'acf_repeater_') === 0) | |
| { | |
| $key_base = str_replace('acf_repeater_', '', $meta_key); | |
| $meta_values = explode("\n", $meta_value); | |
| add_post_meta($object_id, substr($key_base, 0, strpos($key_base, '_x_')), count($meta_values)); | |
| foreach ($meta_values as $i => $value) | |
| { |