cmb2-attached-posts
cmb2-attached-posts copied to clipboard
fixed bug where multiple metaboxes caused search modal to send posts …
…to the wrong metabox
Counts number of attached-posts instances on the page and if finds more than one sets context when clicking the extra search button
I tested this today and it fixes the issues in my testing. My testing environment has:
- One meta box with an attached post field in a repeating group field.
- One meta box with a single attached post field.
- One meta box with two attached post fields (not grouped and not repeating).
One nitpicky thing, when you open a search and type a search term it is preserved if you open the search for a separate instance of the field. Can that field be cleared when the modal is opened? Or stay specific to the field that the search occured for?