Selection WordPress hooks
Last updated
add_filter('advanced_views/post_selection/query_args', function ($args, $cardId, $pageNumber) {
// any modifications to the $args here
return $args;
}, 10, 3);add_filter(
'advanced_views/post_selection/posts_data',
function (array $posts_data, string $card_dd, int $page_number, \WP_Query $query, array $query_args): array {
// todo your modifications to the $postsData['postIds'] or $postsData['pagesAmount']
return $postsData;
},
10,
5
);add_filter('advanced_views/post_selection/custom_variables', function ($customVariables, $cardId) {
// any modifications to the $customVariables here
return $customVariables;
}, 10, 2);add_filter('do_shortcode_tag', function ($output, $tag, $attr) {
if ('acf_cards' != $tag) {
return $output;
}
// todo my custom changes for $output
return $output;
}, 10, 3);