[wp-trac] [WordPress Trac] #44788: the_content() strange behavior - we cant change golobal "post_content" from "$post->post_content"
WordPress Trac
noreply at wordpress.org
Tue Aug 14 04:51:25 UTC 2018
#44788: the_content() strange behavior - we cant change golobal "post_content" from
"$post->post_content"
-------------------------------+-----------------------------
Reporter: Tkama | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 4.9.8
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
Look at this code, is it normal?
{{{#!php
<?php
global $post;
echo $post->post_content; //> Some text
$post->post_content = 'New text';
the_content(); //> Some text
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44788>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list