I don’t think we understood each other well. Gallery field has that bulk option dropdown that allows me to sort images in gallery field by title, reverse order etc…
What I’d like to know is if there is some way to trigger that sort action when I’m adding new images into the gallery.
So is there any solution to this? I can’t find a clear answer. Yes or no?
Anyone? Is this possible via some ACF javascript api or something?
yes… I was afraid of that. Anyway, I made a following sql query which should return “flat” list of all repeater galleries along with their name and post id to which they belong (for generating links and such on the frontend). So, just for the future reference :
select
pm.post_id as post_id
, pm2.meta_value as gallery
, pm.meta_value as images
from
wp_postmeta as pm
inner join
wp_postmeta as pm2
on
((pm.post_id = pm2.post_id) and (pm.meta_key + '_name' = pm2.meta_key))
where
pm.meta_key like 'post_photo_galleries_%_post_photo_gallery'
and
pm2.meta_key like 'post_photo_galleries_%_post_photo_gallery_name';