wpce_relation_list_posts v3.24.5
Filters the posts fetched on the relationslist endpoint e.g. for the post input type.
Parameters
object[] $postsThe available posts, in the format returned by the
postinput type.
Example
php
// Only keep posts with ID different from 1
add_filter('wpce_relation_list_posts', function (array $posts) {
return array_filter($posts, fn ($post) => $post->id !== 1);
});