Opened 20 years ago
Closed 20 years ago
#4153 closed enhancement (fixed)
edit_post_link return/echo
| Reported by: | christianskarby | Owned by: | rob1n |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.3 |
| Component: | General | Version: | 2.2 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
Description
I suggest the following API-change to allow for templates to decide whether the text should be displayed from within the edit_post_link function (legacy) or returned back as a string.
from: edit_post_link($link = 'Edit This', $before = '', $after = '') to: edit_post_link($link = 'Edit This', $before = '', $after = '', $echo=true)
Attachments (1)
Change History (22)
#4
@
20 years ago
- Keywords has-patch needs-testing removed
- Owner changed from to
Yeah, having get_edit_post_link() makes sense.
#6
@
20 years ago
- Resolution fixed
- Status closed → reopened
There was as missing " on line 296 in link-template.php causes the entire page/ post to becoming an edit this link. I've attached the fixed one I made.
#7
@
20 years ago
- Priority low → high
Seriously.
Where's the QA team? :)
I attached a patch. You probably understand.
#8
@
20 years ago
- Keywords has-patch commit added
- Priority high → highest omg bbq
- Severity minor → normal
- Status reopened → new
- Version 2.1.3 → 2.2
/me slaps rob1n - test test test commit ;-)
#9
@
20 years ago
- Keywords commit removed
- Priority highest omg bbq → normal
- Resolution → fixed
- Status new → closed
#10
@
20 years ago
- Keywords commit added
- Priority normal → highest omg bbq
- Resolution fixed
- Status closed → reopened
Nvr mind me.
#11
@
20 years ago
4153.diff
- dpryo's quote mark (keeps link from being displayed in browser).
- Get rid of unused variable.
#14
@
20 years ago
get_edit_post_link() shouldn't return an anchor with href, just the link itself as do the other get functions. The link should be passed through a filter for those who want to change the link.
#17
@
20 years ago
- Keywords has-patch commit removed
Okay, this time around:
- TEST TEST TEST (/me slaps self)
- get_edit_*_link() returns URL, not code
- Filters, filters, filters.
Working on a patch.
We can add get_edit_post_link() that returns the bare link. Output should be run through a 'edit_post_link' filter. edit_post_link() would then call get_edit_post_link(). Same can be done for edit_comment_link(). See all of the other get_*_link() functions.