post_status => publish not working

I have a front end form that let users submit a post. This is how i store the data when a post is submitted : if ( isset( $_POST[‘submitted’] )) { $post_information = array( ‘post_title’ => wp_strip_all_tags( $_POST[‘postTitle’] ), ‘post_content’ => $_POST[‘postContent’], ‘post_type’ => ‘post’, ‘post_status’ => ‘publish’ ); $new_post = wp_insert_post( $post_information ); The … Read more

What’s the proper way to use a custom table? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago. Improve this question I manually added a table to my wordpress database using sql using CREATE TABLE. I … Read more

How do I batch create revisions of all posts?

I cleaned up an old-site from pasted tags, manually created lists, etc, and I’d like to keep the old posts as “revisions”, so we can easily “compare” with the old posts and retrieve/revert the original content if needed. So I should either injecting the revision rows in the new DB or just naturally create them … Read more

wp_update_post based function works on existing posts, but not new posts

I have a function that will update the title of the post based on an ‘advanced custom field’. It works on existing posts, but not when I create a new post. When I try and save the post and check the post listings, it isn’t there. Any help would be greatly appreciated. function my_post_title_updater( $post_id … Read more

Can I edit the wp_post > post_content right before its inserted/updated?

I would need to apply some sort of encryption on whatever gets inserted in the wp_post > post_content, so I was wondering if there is a way, either modifying the core (rather not), or using some filter or hook and function, where I could perform the encryption right before the content gets saved. And then … Read more