Open ctlcltd opened 1 year ago
@ctlcltd How are you calling this to make it work?
the call is implicit on line 2 of the snippet, on the cmb2_add_row
hook
event
Il mar 3 ott 2023, 01:53 Ipstenu (Mika Epstein) @.***> ha scritto:
@ctlcltd https://github.com/ctlcltd How are you calling this to make it work?
— Reply to this email directly, view it on GitHub https://github.com/CMB2/cmb2-attached-posts/issues/73#issuecomment-1743934662, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABSBHJYW72GD2YPVZUDKMLX5NHXDAVCNFSM6AAAAAA2TXQMPKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBTHEZTINRWGI . You are receiving this because you were mentioned.Message ID: @.***>
@ctlcltd I mean, where in the PHP. I can make this a random named JS file but I gotta enqueue it. There are a bunch of different ways to do that, and I was curious what yours was.
The snippet is a buffer fix, to apply it I used a js file hooked to the
admin_enqueue_scripts
hook from a php file of the theme. A definitive
solution to be compatible with repeatable would be to modify the
js/attached-posts.js script, something similar to the snippet but
incorporated into the original source.
cmb2-attached-posts won't works with CMB2 repeatable fields.
Fields are cloned but not resetted, and there is an error with assigning draggable/droppable jquery-ui to cloned elements.
I solved this way:
:wave: