Hi
I am creating my own meta queries to hook into wp_query to lookup custom tables and join them so i can perform advanced search queries and some JOINS etc and I am doing so using pre get posts.
e.g. of a custom function im working on (still in early development stage), I am passing custom tables and returning them along with the post queries. Works well so far but the next step is to check against the field settings in the metabox fields setup.
$args = array(
'post_type' => 'product',
'posts_per_page' => 10,
'post_status' => 'publish',
'order_by' => 'published_date',
'order' => 'ASC',
'metabox' => [
[
'table' => $wpdb->prefix . 'dc_products',
'order_by' => 'end_date',
'order' => 'DESC',
'fields' => ['type', 'description', 'price', 'condition', 'location', 'end_date', 'images'],
],
],
);
I am looking for a way to get the meta box object fields but realised that I can only get the during initialisation of Woordpress which doesn't work for my script as it runs before initialisation.
https://docs.metabox.io/rwmb-get-object-fields/
$meta_box_registry = rwmb_get_registry( 'meta_box' );
$field = rwmb_get_field_settings( $field_id );
Is there any other way I can get the object fields before initialisation? I have a feeling I will not be able to, but worth asking.