[wp-trac] [WordPress Trac] #18561: Better Way to Insert Things Below Individual Posts
WordPress Trac
wp-trac at lists.automattic.com
Fri Sep 2 16:16:24 UTC 2011
#18561: Better Way to Insert Things Below Individual Posts
-------------------------+------------------------------
Reporter: jane | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.2.1
Severity: minor | Resolution:
Keywords: |
-------------------------+------------------------------
Changes (by chipbennett):
* cc: chip@… (added)
Comment:
Okay, so, this seems so obvious and simple to me - so clearly I'm missing
something.
Why not [http://core.trac.wordpress.org/browser/tags/3.2.1/wp-
includes/query.php#L773 just change this]:
{{{
function the_post() {
global $wp_query;
$wp_query->the_post();
}
}}}
...to this:
{{{
function the_post() {
global $wp_query;
do_action( 'the_post_before' );
$wp_query->the_post();
do_action( 'the_post_after' );
}
}}}
It supports the existing Loop markup of every Theme in existence. It
requires no changes to the Theme template for either the Theme or Plugins
to hook into the `the_post_before` and `the_post_after` hooks.
What am I missing?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18561#comment:80>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list