Forum Replies Created
-
AuthorPosts
-
nolab
ParticipantHi Long!!
Ok, good to know. Yes, I have done it as you suggest. Thanks!
And good to know that rwmb_set_meta will be available soon.
Best!!
nolab
ParticipantHi!
good idea.
Thanks!!
nolab
ParticipantThanks Long Nguyen! It works, I can get the metabox field updated in this action ๐
The only thing is that I have checked that this action runs not only when you actually save a post, but also when you just load a post entry and you don't make any change. So it is executed much many times than desired, but maybe it's the best we can get at the moment
nolab
ParticipantI have updated the version, just in case, and I have made a minimum test and I don't get the updated value for the metabox field with the example code ๐
Is there any work around metabox action where I can get that value field updated??
Thanks a lot
nolab
ParticipantHi Thanks for your response.
Yes, it was my first idea, but when I do it like that I get wordpress fields correctly updated, but I get the previous value for the metabox field.
That's why I thought that action save_post fired before metabox update.
I mean if I save twice then the json get the correct values, but in the first attempt I only get the updated value for a wordpress field
nolab
ParticipantActually it seems this is not firing when I save a post/page and I change same metabox field value
add_action( 'rwmb_after_save_post', 'on_save_post_rwmb', 10, 1 );
it should fire when I update a post or am I missing something?
Thanks!
nolab
ParticipantThanks, I tried it this morning, and I have almost done.
The code in the plugin is very clear, thanks!!
-
AuthorPosts