New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rest_value_cb not working #1284
Comments
how are you specifying your properties and whatnot for your CMB2 instance? You shouldn't be needing to edit CMB2 core unless there's somehow a bug in place. Since this is a custom callback spot, you should be managing to provide your own callback and code in that callback. |
Good call @MobinDev, I pushed an update. |
@tw2113 basically, we use |
I stand corrected, and am glad @jtsternberg is around for these things :) Thanks everyone. |
'rest_value_cb' not working on ".../wp-json/wp/v2/posts" and ".../wp-json/wp/v2/posts/<post_id>"
so i changed this line from :
$values[ $cmb_id ][ $field->id( true ) ] = $field->get_data();
to:
$values[ $cmb_id ][ $field->id( true ) ] = $field->get_rest_value();
The text was updated successfully, but these errors were encountered: