I am writing a PHP program to insert a WordPress post using WordPress Functions When I use the The solution for pp19dd does not work anymore in the new version of WordPress in a new way, as in WordPress Recommended by developer (but not recommended due to security issues): With this security problems caused the filter to not have to be unset. If you are trying to avoid posting KSS filtering, you can try kses_remove_filters () before inserting post and kses_init_filters () after inserting the post. Be careful since this, because most of the security measures are defeated to post the posts. like this: Source: wp_insert_post () function, my post will have
kses_remove_filters); Wp_insert_post ($ postdata); Kses_init_filters ();
Comments
Post a Comment