[Plugin: WordPress Importer] How to import multiline post metadata?
-
WordPress Importer failed to import post meta containig array of strings with line breaks.
For example, after adding meta:
$data = array( '1' => true, '2' => '1'."\n".'2' ); add_post_meta($post_id, 'my_meta', $data);
in the exported XML file i see:
<wp:postmeta> <wp:meta_key>my_meta</wp:meta_key> <wp:meta_value><![CDATA[a:2:{s:1:"1";s:1:"1";s:1:"2";s:4:"1 2";}]]></wp:meta_value> </wp:postmeta>
But after importing, get_post_meta(‘my_meta’,) returns null… After rmoving the line break all works as expected. Any ideas how to fix? Sorry for my english.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘[Plugin: WordPress Importer] How to import multiline post metadata?’ is closed to new replies.