Opened 14 years ago
Closed 11 years ago
#16745 closed enhancement (wontfix)
doubled replace in setup_postdata
Reported by: | hakre | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.1 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
One less to go. Could be array'ed as well. Found in http://wordpress.stackexchange.com/questions/8031/is-it-necessary-to-use-wp-reset-query-in-a-wp-query-call
Attachments (4)
Change History (9)
#2
@
14 years ago
#3
follow-up:
↓ 4
@
14 years ago
I'm sorry, but, what?
Could you write a better description for this ticket? And what do your patches have anything to do with the URL you posted?
#4
in reply to:
↑ 3
@
13 years ago
Replying to garyc40:
I'm sorry, but, what?
Could you write a better description for this ticket?
The patches are rather trivial so I thought self explanatory:
If you first replace BA with A and then replace AB with A then there is no need to replace BAB with A as a third replace variant upfront.
Next to that, you can make use of arrays to replace multiple needles at once.
And what do your patches have anything to do with the URL you posted?
The URL was just informative, if you visit that address you will see the sourcecode of function setup_postdata() this ticket is about.
#5
@
11 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
Although the first case IS covered by the 2nd case running, and then the 3rd case running, the current code is much more explicit in what it's doing.
Since there's no significant performance alterations between using multiple calls, vs, an array notation, lets keep it explicitly ordered.
One off