In the description for the 'link' post format in the Codex[1], it says:

"The first <a href=""> tag in the post content will be considered the external link for that post. Alternately, if the post consists of only a URL, that will be the URL and the title (post_title) will be the name."

Is that just a suggestion, or do we actually have utility functions available to help with this? I poked around a little bit in the source, Codex, and Trac, but didn't spot anything.

Some sort of "extract_first_link_url()" and "extract_first_link_title()" functions in core might be nice here. Unless the Codex quote is just a *suggestion* of a possible usage, in which case, does somebody have code for the previously mentioned functions that I can borrow? :)


  [1] http://codex.wordpress.org/Post_Formats

--
Dougal Campbell <[email protected]>
http://dougal.gunters.org/
http://twitter.com/dougal
http://twitual.com/

_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers

Reply via email to