[wp-trac] [WordPress Trac] #44788: the_content() strange behavior - we can't change global "post_content" from "$post->post_content"

WordPress Trac noreply at wordpress.org
Wed Aug 15 08:45:26 UTC 2018


#44788: the_content() strange behavior - we can't change global "post_content" from
"$post->post_content"
-------------------------------+----------------------
 Reporter:  Tkama              |       Owner:  (none)
     Type:  enhancement        |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  Posts, Post Types  |     Version:  4.9.8
 Severity:  normal             |  Resolution:  invalid
 Keywords:                     |     Focuses:
-------------------------------+----------------------

Comment (by Tkama):

 I need to add some changes to post_content before using the_content(). But
 it was not so easy. I made it through  `global $pages`. But solution to do
 it with `setup_postdata( $post )` seems more correct, thanks for it.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44788#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list