Opened 17 years ago
Closed 17 years ago
#4800 closed enhancement (fixed)
Trackback function cleanup
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.3 | Priority: | lowest |
Severity: | trivial | Version: | 2.3 |
Component: | Optimization | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
The trackback_url functions are a bit haphazard. This is a patch to clean the up and bring them somewhat in line with the rest of the code.
trackback_url() accepts a $display parameter which is pointless when it's just using the get_trackback_url() function to do all the work.
get_trackback_url() set the trackback url to the default setting, then set it again to the correct URL if using permalinks. A minor optimization is to use an else{} to set it correctly in the first place and avoid the extra string work and function calls.
Minor optimizations, but still, we should try to keep things consistent and fast.
Attachments (1)
Change History (6)
#1
@
17 years ago
- Keywords commit added; 2nd-opinion removed
- Milestone changed from 2.4 (future) to 2.3 (trunk)
#2
follow-up:
↓ 4
@
17 years ago
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
#4
in reply to:
↑ 2
@
17 years ago
Replying to markjaquith:
in comment-template.php you used
trackback_url()
to replacetrackback_url(0)
-- that should beget_trackback_url()
Also, we should deprecate the echo/return switch for a version before we remove it. Turn the variable into
$deprecated
and retain the echo/return logic. We can mark it with// remove backwards compat in 2.4
Agreed. Both changes made to the patch, new patch uploaded (replacing the old one).
in comment-template.php you used
trackback_url()
to replacetrackback_url(0)
-- that should beget_trackback_url()
Also, we should deprecate the echo/return switch for a version before we remove it. Turn the variable into
$deprecated
and retain the echo/return logic. We can mark it with// remove backwards compat in 2.4