Support Meta Box Group BUG max_status ignored Reply To: BUG max_status ignored

#10241
Jason KinneyJason Kinney
Participant

I have not yet embraced the builder, I only use it to figure out, "pure code" when the docs are not clear to me.

The array is posted below and here is the full code: https://pastebin.com/9HDWnjmU.

I think, but I have not tested it, the issue has to do when an image field is wrapped in a tab and/or group. It's also possible that it's tied to another BUG I found with tabs and groups. On a settings page I defined 3 tabs and under tab 3 I have several meta boxes. Although each meta box had a unique ID and all the values were saved to the db under the unique array key (as it should) if another meta box had a matching field ID, the 'std' => array ('yes') for an options list only worked on the last instance of 'std'.

To recreate that bug, create a tab, assign two or more meta boxes to the tab, in each meta box create a button group (i.e., a Yes/No button) and set the selected value to 'no'. Keep the button group ID same for the button group in each unique meta box. The result is the last button group will be the only one that has a default option selected.

Otherwise, max_status works, when it's not a tab or group.