Hi there, I had a search of forums, but couldn’t find an answer.
I’m exporting XML with image metadata from an instance of WordPress that doesn’t use ACF Pro for images, and I’d like to import it into a new WordPress instance, but using ACF Pro for galleries, using those images (which to be clear, weren’t in image galleries before).
I know the target XML for the image gallery looks like this:
<wp:postmeta>
<wp:meta_key><![CDATA[gallerys_0_gallery]]></wp:meta_key>
<wp:meta_value><![CDATA[a:76:{i:0;s:4:”7992″;i:1;s:4:”7977″;i:2;s:4:”7972″;i:3;s:4:”7946″;i:4;s:4:”7953″;i:5;s:4:”7934″;s:4:”7921″;i:8;s:4:”7879″;}]]></wp:meta_value> </wp:postmeta>
So I’ve built a Ruby script that can take the old image data, and generate XML in the above form. But I’ve got a couple of missing bits of info.
I know that:
“i” refers to the index, which simply increments.
“s” probably refers to a size
and the large number in quotes is the image id association.
But I’m not sure what “a” refers to? Can someone advise?
(also, any commentary on whether there’s an easier way to do this is welcome, and happy for thread to be moved to different sub-forum)
Many thanks,
Dave