Description #
This filter returns the initial field data for the post-type selection field.
apply_filters('fluentform/post_selection_posts_pre_data', [], $data, $form);
Usage #
add_filter('fluentform/post_selection_posts_pre_data', function ($posts, $data, $form) {
// do your stuff
return $posts;
}, 10, 3);
Parameters #
- $posts (array) Posts
- $data (array) Input Data
- $form (object) Form Object
Placement #
This code should be placed in the functions.php file of your active theme.
Source Code #
This filter is located in FluentFormPro\Components\Post\PopulatePostForm -> renderPostSelectionField($data, $form)