[wp-hackers] Pingback Excerpt Contents

David Chait davebytes at comcast.net
Tue Jul 11 21:36:23 GMT 2006


There should be a bunch of action hooks -- up to four -- for before and 
after the post block (and possibly inside the post block but before and 
after the content block).  Since the_content is under 'wp control', at least 
before and after the content block should be easy to hook in.  Before and 
after the post block itself is a bit more difficult (I can only imagine it 
being somehow in has_posts(), given that's one of the few near-guaranteed WP 
calls in a theme).

That way, sociable, or the related-links stuff I just played with, could 
throw themselves after the content, but not INTO the content itself (a HUGE 
difference!).

I'd actually prefer the has_posts type solution, as it'd make things like my 
CG-Inbetween plugin (which can be useful for adsense, etc.) auto-hooking, as 
right now I make people edit their theme rather than try to hack into 
the_content -- which just isn't right. ;)  Actually, in a sense there's a 
'battle line' drawn -- that is there's a post DIV, and likely some kind of 
post-content (or 'entry') DIV, and the question is where you want plugins to 
be able to auto-output things.  You don't necessarily want it INSIDE the 
entry DIV with the main body text, you probably more likely want it AFTER 
the entry div, but still INSIDE the post DIV.  And that position has no WP 
call I can think of...

-d

----- Original Message ----- 
From: "Brian Layman" <Brian at TheCodeCave.com>
To: <wp-hackers at lists.automattic.com>
Sent: Tuesday, July 11, 2006 3:51 PM
Subject: [wp-hackers] Pingback Excerpt Contents


I just noticed something interesting.  I left Andy a demo pingback here:
http://www.yellowswordfish.com/404/shine-on-you-crazy-diamond#comments
and it actually included the text generated by the Sociable plugin...

[.] So, I am creating a post that links back to his post here so that a ping
back is created on his site.  I will then alter another post to add a track
back to his site. Share and Enjoy:These icons link to social bookmarking
sites where readers can share and discover new web pages. [.]

So, the pingbacks actually pull their excerpt from the_content where
Sociable plugs itself in.  Any which way, I know this isn't a major
end-of-the-world issue.  But it makes me wonder if there many other plugins
are there that add visual stuff this way since putting links at the end of
the post can't be all that rare.

Should pingbacks maybe pull the post directly from the DB? Or should there
be an anchor/indicator of some sort of where the post actually content ends
and add-on text begins?

I'm guessing we should just leave this as is, but I wasn't sure if this was
a problem in the plugin or with how the the_content hook was implemented.
So, I thought I'd mention it.

_______________________________________________
Brian Layman
www.TheCodeCave.com

_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers 



More information about the wp-hackers mailing list