Make WordPress Core

Opened 10 years ago

Closed 7 years ago

#28332 closed enhancement (invalid)

remove_filter( 'wpautop' ) not working completely

Reported by: robbash's profile RobBash Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9.1
Component: Editor Keywords: needs-testing
Focuses: administration Cc:


In my functions.php I call remove_filter( 'the_content', 'wpautop' ).

After saving the output on the blog is correct so it must be stored correctly in the database, but in the editor (tinymce) it is not. I also installed the plugin TinyMCE Advanced the prevent cleanup by the editor.

I investigated the issue a bit and found out that the wpautop method is still called before the content is displayed in the editor and the double line breaks are replaced by <p>-tags, which shouldn't be after the remove_filter. I also debugged in that method to make sure the filter is removed.

Change History (2)

#1 @Bishoy.A
9 years ago

  • Keywords needs-testing added
  • Type changed from defect (bug) to enhancement

I think the 'wpautop' filter is not added to the Admin Editor, so remove_filter( 'the_content', 'wpautop' ) will have no effect there anyway.

Last edited 9 years ago by Bishoy.A (previous) (diff)

#2 @swissspidy
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

remove_filter( 'the_content', 'wpautop' ) is for the front-end online.

The editor has its own autop implementation on the JavaScript side to make editing as easy as possible.

See how the editor plugin checks for its availability.

Note: See TracTickets for help on using tickets.