#30355 closed enhancement (fixed)
Create get_author_posts_link() function to return rather than echo HTML-formatted author posts link
| Reported by: | chipbennett | Owned by: | DrewAPicture |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Themes | Version: | 1.2 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | template |
Description
Patch is fairly simple:
- Create
get_author_posts_link()function, which is identical to currentthe_author_posts_link()function, except that the output is *returned* instead of *echoed*. - Change
the_author_posts_link()to echo the output ofget_author_posts_link().
The primary purpose for creating the patch is to allow for the return value to be used in translation strings via sprintf(). Though, I'm sure there will be other uses.
Attachments (5)
Change History (13)
#5
@
11 years ago
- Milestone Future Release → 4.4
- Owner set to
- Status new → assigned
Refreshed so it doesn't explode 30355.2.diff
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I like it, sounds like a sound improvement.
A few things I noticed:
get_the_author_posts_link().the_author_posts_link()can start with "Display" again, rather than "Get".the_author_posts_link()would need to continue accepting the deprecated argument.get_the_author_posts_link()and don't need to pass it to it in the display function.