I got it 🙂
add_filter('rest_test_query', function($args) {
$args['meta_query'] = array(
array(
'key' => 'test_1',
'value' => esc_sql( $_GET['test_1'] ),
)
);
//echo $args['meta_query'][0]['value'];
//print_r($args);
if (!empty($args['meta_query'][0]['value'])) {
return $args;
}
} );
-
This reply was modified 3 years, 6 months ago by stehoss.