[wp-trac] [WordPress Trac] #24330: When adding the post_formats_compat the_content filter a post ID argument should be included
WordPress Trac
noreply at wordpress.org
Wed May 22 21:36:34 UTC 2013
#24330: When adding the post_formats_compat the_content filter a post ID argument
should be included
--------------------------+--------------------
Reporter: gcorne | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.6
Component: Post Formats | Version: trunk
Severity: normal | Resolution:
Keywords: |
--------------------------+--------------------
Comment (by ryan):
setup_postdata() sets global $id but not global $post. This mismatch is
the reason the new code breaks for loops that don't set global post to
math the post passed to setup_postdata(). In get_the_content(), "if (
$post->ID != $GLOBALS['id'] )" is true in this case and
wp_parse_post_content() is run on get_post( 0 ), which is the global post
rather than the post that has its content sitting in the pages global. It
was sheer accident that these loops ever worked, but worked they did so
I'll see what can be done for back compat.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24330#comment:22>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list