[wp-hackers] the_author hook, the_author_posts_link() : hooks and semantics

Raphaël Droz raphael.droz at gmail.com
Mon Mar 1 17:00:12 UTC 2010


Hi,
I'm using the wp-rdfa plugins which insert metadata by hooking into 
the_author().
That is, I found that there was html syntax errors and duplication of 
those metadata.
By digging around I found that the_author_posts_link() uses 
get_the_author() two times,
successively.
I was tempted to correct the rdfa plugin to hook into another function, 
a function which
would not be use often like it's the case for the_author().
I was thinking about a hook which would specifically apply for metadata, 
nor for the content,
or the style.
I didn't find such a function, even worse (imnsho),  I noticed that 
the_title_attribute()
also calls get_the_title().
I really feel the need of getting a more semantically-oriented logic for 
hooks as hooking the_author()
mays change the presentation, the content, or ... the semantic via 
metadatas.

For now I just put a kind of specific workaround applying against WPMU 
2.9.1.1 which basically replaces
the first call of  get_the_author() by get_the_author_meta('display_name').
This first call set the value of an attribute, it (according to me) 
should not be subject to non-attribute-oriented
hooks.

I'm new on the list and would like some enlightenment about this 
subject. If the question has already been
evoked despite my searches, please point me to some resources.

Good luck for the coming release and thank you.



More information about the wp-hackers mailing list