wp_update_post breaks PostX Post Grids
-
I posted this in WordPress Developers but perhaps it belongs here. I’ve also reached out to PostX directly through their support page:
I’m struggling to understand some confusing behavior with wp_update_post: a direct copy/paste of content completely corrupts a bunch of Gutenberg plugins.
Example:
// Get original post
$my_post = get_post(POST_ID);
$my_post_content = $my_post->post_content;// Copy the content and update the post with the same content
$copy_post = array();
$copy_post[‘ID’] =POST_ID;
$copy_post[‘post_content’] = $my_post_content;
wp_update_post($copy_post);If you do the above on a post that has a PostX Post Grid, for example, the PostX grids on the page will all be corrupted and broken. But I’m not sure why copying and pasting the post content should change anything.
What am I missing? Thanks!
The page I need help with: https://pastebin.com/79wVp1qB
The page I need help with: [log in to see the link]
- The topic ‘wp_update_post breaks PostX Post Grids’ is closed to new replies.