Tribe__Events__Repositories__Event::filter_by_linked_post( string $linked_post_meta_key, int|WP_Post|array $linked_post )
Filters events to include only those that match the provided hidden state.
Contents
Parameters
- $linked_post_meta_key
-
(string) (Required) The linked post type meta key.
- $linked_post
-
(int|WP_Post|array) (Required) Linked post(s).
Source
File: src/Tribe/Repositories/Event.php
public function filter_by_linked_post( $linked_post_meta_key, $linked_post ) { $linked_posts = (array) $linked_post; $post_ids = array_map( array( 'Tribe__Main', 'post_id_helper' ), $linked_posts ); $post_ids = array_filter( $post_ids ); $post_ids = array_unique( $post_ids ); $this->by( 'meta_in', $linked_post_meta_key, $post_ids ); }
Changelog
Version | Description |
---|---|
4.9 | Introduced. |