According to the documentation of rwmb_after_save_field
the $object_id
is:
The object ID
So for example, (int) 482 is the object id.
Cool. Now let's update some meta as the example in the documentation:
update_post_meta( $object_id, 'log_event_dates', $log );
except, in this case, the object is not a post, but a user.
Since rwmb_after_save_field
is triggered for both posts AND users (using MB User Profile) how can we determine the type that the object id represents?
Is this passed in any of the $field
attributes?
Is there an internal function that can be called to determine the type of the object?
I thought it best to ask before further bloating up the $meta_boxes object by declaring the object type as an attribute.