WordPress.org

Ready to get started?Download WordPress

Forums

Getting new post Content (HTML) from text editor (1 post)

  1. andrepadez
    Member
    Posted 3 years ago #

    Hey everyone.
    This is my first post here, since it's the first time i am developing for wordpress.
    I am building a plugin, that is using the

    publish_post
    hook.

    I need to capture the contents of the new post created, what is present in the rich text editor.

    when i make a die(var_dump($_POST)), i get ['content'] and ['post_content'] with the exact same value. That value is close to what i am looking for, but it discards the html formatting.
    How can i get the exact HTML that is going to be published by wordpress?

    Thanks :)

Topic Closed

This topic has been closed to new replies.

About this Topic