#7468 closed enhancement (fixed)
Add Link to URL in Source File section of Codex
Reported by: | garrett-eclipse | Owned by: | garrett-eclipse |
---|---|---|---|
Milestone: | BuddyPress.org Sites | Priority: | low |
Severity: | minor | Version: | |
Component: | BuddyPress.org Sites | Keywords: | |
Cc: |
Description
On the Codex there's a Source File section which shows the function reference and a URL for Trac. Would be nice to have that links so don't need to copy and paste into browser.
Example - https://codex.buddypress.org/developer/function-examples/bp_core_get_userlink/
Source File
bp_core_get_userlink() is located in https://buddypress.trac.wordpress.org/browser/branches/1.7/bp-members/bp-members-functions.php#L380
Thanks
Change History (13)
#1
@
8 years ago
- Component changed from Core to BuddyPress.org Sites
- Milestone changed from Awaiting Review to BuddyPress.org Sites
- Owner set to garrett-eclipse
- Status changed from new to assigned
This ticket was mentioned in Slack in #buddypress by garrett-eclipse. View the logs.
8 years ago
#3
@
8 years ago
- Priority changed from normal to low
- Severity changed from normal to minor
Thanks @netweb I appreciate you granting me editor abilities, I'd be happy to tweak the codex.
I've updated the afflicting page;
https://codex.buddypress.org/developer/function-examples/bp_core_get_userlink/
And am running through the Function Examples section of the Codex. Will close the ticket once I've finished updating those pages.
Cheers
P.S. I didn't receive a notification for your reply. Would I open a ticket on this trac or is the a better place to report issues on the trac system? Thanks
#4
@
8 years ago
@garrett-eclipse thanks for the update, it's a good point links are useful in this context and appreciate you adding them. There is a good deal we still need to update, refine and generally improve with the codex. We'll try and ensure we credit the effort in a bpdevel codex update post @mercime
Given the trac notification issues and to get wider attention in addition to this trac ticket dropping a note on Slack might be a good course of action, those of us curating will be aware then in case the ticket slipped past us.
#5
@
8 years ago
Thanks @hnla
For the Codex update I'm doing with Function Examples I'm going to use the following format;
# Source File
function_name() is located in bp-folder/bp-file.php
Where the bp-folder/bp-file.php portion is linked to the trunk for that file. I was going to directly link to the Line number with the #L000 format but I realized that trunk will change frequently so those references would become incorrect fairly quickly.
Open to thoughts.
This ticket was mentioned in Slack in #buddypress by garrett-eclipse. View the logs.
8 years ago
#7
@
8 years ago
with the #L000 format but I realized that trunk will change frequently so those references would become incorrect fairly quickly.
Maybe link to a branch or tag something that is less likely to change or ideally the version where the function first appeared but that's probably awkward.
#8
@
8 years ago
I would link to the ongoing ticket task and close this one in reference to the question how to resolve ticket on Slack ?
#9
@
8 years ago
I've finished updating the Function Examples throughout the Codex to add the Source File information/link.
The HTML format I used for that section;
<h2 id="source-file">Source File</h2> <code>bp_core_get_userlink()</code> is located in <a href="https://buddypress.trac.wordpress.org/browser/trunk/src/bp-members/bp-members-functions.php">bp-members/bp-members-functions.php</a>
Closing this ticket.
Further Codex clean-up will be handled in #7470
@jjj will close as I'm not a gardener
#11
@
8 years ago
Thanks @hnla
Maybe link to a branch or tag something that is less likely to change or ideally the version where the function first appeared but that's probably awkward.
I think I'm going to stick to trunk so when people look up the reference they won't get outdated code. For now they'll have to scroll or find within page. Unless do you know if there's a way to anchor link to a specific function in trac rather than line number? Cause the function name won't change it's just the position it is in the file.
@garrett-eclipse, the codex is a wiki, I've sent you an invite to become an editor for the wiki :)
I've also presumptuously assigned you as the owner of this ticket in the hope that with the wiki editor role you'd be interested in updating the pages that are affected, How about it?