[wp-trac] [WordPress Trac] #32208: apply_filters('the_content') not working as expected in some cases

WordPress Trac noreply at wordpress.org
Thu Apr 30 13:58:30 UTC 2015


#32208: apply_filters('the_content') not working as expected in some cases
--------------------------+-----------------------------
 Reporter:  zabatonni     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Formatting    |    Version:  4.2.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 When I use this filter for example in widget area for displaying text with
 video embed it works on most urls, but in some cases it won't make embed
 out of url.

 Tried it on fresh install without plugins using:

 {{{
 echo
 apply_filters('the_content','https://www.youtube.com/watch?v=NwJ7tfVj1pI');
 }}}

 I found that this is happening on urls where are no posts, like empty
 categories, e404, etc... even home without posts.

 On these pages there is no $post and thats why its not filtering text as
 it should.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32208>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list