/**
  * @return Tribe__Events__Integrations__WPML__Linked_Posts
  */
 public static function instance()
 {
     if (empty(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Exemple #2
0
 protected function hook_filters()
 {
     $filters = Tribe__Events__Integrations__WPML__Filters::instance();
     add_filter('tribe_events_post_type_permalink', 'wpml_permalink_filter');
     add_filter('tribe_events_rewrite_i18n_slugs_raw', array($filters, 'filter_tribe_events_rewrite_i18n_slugs_raw'), 10, 3);
     $linked_posts = Tribe__Events__Integrations__WPML__Linked_Posts::instance();
     add_filter('tribe_events_linked_posts_query', array($linked_posts, 'filter_tribe_events_linked_posts_query'), 10, 2);
     add_filter('tribe_events_linked_post_create', array($linked_posts, 'filter_tribe_events_linked_post_create'), 20, 5);
     $rewrites = Tribe__Events__Integrations__WPML__Rewrites::instance();
     add_filter('rewrite_rules_array', array($rewrites, 'filter_rewrite_rules_array'), 20, 1);
     $permalinks = Tribe__Events__Integrations__WPML__Permalinks::instance();
     add_filter('post_type_link', array($permalinks, 'filter_post_type_link'), 20, 2);
 }