Opened 2 years ago
Last modified 2 years ago
#16745 new enhancement
doubled replace in setup_postdata
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | General | Version: | 3.1 |
| Severity: | normal | Keywords: | has-patch |
| 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 (8)
In case of fixing #16745, another patch has been attached as .3 would conflict merge with the fix in #16745.
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?
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.

One off