Everyone that mentioned the fact that the source files change and that the start of where each function is in the file are reason enough for me to disregard this idea. That part is something that I completely didn't think of. Was a noble idea, but WAY too much work with an ever evolving code-base.<br>
<br><div class="gmail_quote">On Wed, Nov 9, 2011 at 8:35 AM, Chip Bennett <span dir="ltr"><<a href="mailto:chip@chipbennett.net">chip@chipbennett.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I think that the *default* source link should be to trunk (or *latest tag*, if that can be automated via generic filename link by the Codex); otherwise, this practice would create a TON of links that have to be updated with *every* WordPress major and point-release - and not just a tag filepath update, but also a verification that the linenumber itself hasn't changed.<div>
<br></div><div>Also, you'd need to consider whether to link to the line that starts the function docblock, or to the line that starts the actual function definition (I'd prefer the latter, though consistency is more important than shed color on this point).</div>
<div><br></div><div>Personally, I think time and effort would be far better spent ensuring that all function reference pages actually *have* source links to begin with.</div><span class="HOEnZb"><font color="#888888"><div>
<br></div></font></span><div><span class="HOEnZb"><font color="#888888">Chip<br><br></font></span><div class="gmail_quote"><div class="im">
On Wed, Nov 9, 2011 at 1:04 AM, Michael Beckwith <span dir="ltr"><<a href="mailto:michael.d.beckwith@gmail.com" target="_blank">michael.d.beckwith@gmail.com</a>></span> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
I was wondering if it were feasible to link to the specific line where a function is declared when saying "foo function is located in wp-includes/bar.php". Instead of just linking to <a href="http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/bar.php" target="_blank">http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/bar.php</a>, go to the actual destination, and then copy/paste in the link + line number.<br>
<br>For example from get_userdata():<br><br>Current source link = <a href="http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/pluggable.php" target="_blank">http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/pluggable.php</a><br>
Proposed source link = <a href="http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/pluggable.php#L94" target="_blank">http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/pluggable.php#L94</a> <br><br>
The #L94 anchor pulls them straight to the start of the comment block for the function.<br>
<br>Thoughts? Issues that I wasn't around for the first time someone thought this up?<br>
<br></div></div><div class="im">_______________________________________________<br>
wp-docs mailing list<br>
<a href="mailto:wp-docs@lists.automattic.com" target="_blank">wp-docs@lists.automattic.com</a><br>
<a href="http://lists.automattic.com/mailman/listinfo/wp-docs" target="_blank">http://lists.automattic.com/mailman/listinfo/wp-docs</a><br>
<br></div></blockquote></div><br></div>
<br>_______________________________________________<br>
wp-docs mailing list<br>
<a href="mailto:wp-docs@lists.automattic.com">wp-docs@lists.automattic.com</a><br>
<a href="http://lists.automattic.com/mailman/listinfo/wp-docs" target="_blank">http://lists.automattic.com/mailman/listinfo/wp-docs</a><br>
<br></blockquote></div><br>