Opened 19 years ago
Closed 19 years ago
#4153 closed enhancement (fixed)
edit_post_link return/echo
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 2.3 | Priority: | normal |
| Severity: | normal | Version: | 2.2 |
| Component: | General | Keywords: | has-patch commit |
| Focuses: | Cc: |
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
@
19 years ago
- Keywords has-patch needs-testing removed
- Owner changed from anonymous to rob1n
Yeah, having get_edit_post_link() makes sense.
#6
@
19 years ago
- Resolution fixed deleted
- Status changed from closed to 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
@
19 years ago
- Priority changed from low to high
Seriously.
Where's the QA team? :)
I attached a patch. You probably understand.
#8
@
19 years ago
- Keywords has-patch commit added
- Priority changed from high to highest omg bbq
- Severity changed from minor to normal
- Status changed from reopened to new
- Version changed from 2.1.3 to 2.2
/me slaps rob1n - test test test commit ;-)
#9
@
19 years ago
- Keywords commit removed
- Priority changed from highest omg bbq to normal
- Resolution set to fixed
- Status changed from new to closed
#10
@
19 years ago
- Keywords commit added
- Priority changed from normal to highest omg bbq
- Resolution fixed deleted
- Status changed from closed to reopened
Nvr mind me.
#11
@
19 years ago
4153.diff
- dpryo's quote mark (keeps link from being displayed in browser).
- Get rid of unused variable.
#14
@
19 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.
#16
@
19 years ago
- Priority changed from highest omg bbq to normal
- Severity changed from blocker to normal
#17
@
19 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.