my wordpress instalation have a plugin that "probably" use wp_insert_post() to send content to database.

works great.

but sometime when i edit the POST with the tinyMCE editor, the editor do the some magic! and my content are mutch more clean.

so, i need some advice. I dont whant:

1- Click the edit Post 2- click the Visual on tinymce 3- Click Update

i whant:

1- wp_insert_post() get 'the_content' and filter it like tinyMCE do.

Thank you :) i will wait some good reply from all of you :)

  • Please use the editor & formatting. Grammar and such is also appreciated. This not chat. – kaiser Jun 23 '11 at 21:07
  • This is very poorly written and I cannot make any sense of it. voting to be closed. – Brady Jun 23 '11 at 22:04

As far as I remember cleanup you are talking about is performed by JavaScript so it isn't easy to mashup with PHP.

It would probably be easier to make list of changes you want performed and do it with PHP (there are cleanup-related function available in it as well).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.