#14838 closed enhancement (wontfix)
get_theme_root/s refactoring
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | General | Keywords: | has-patch close |
Focuses: | Cc: |
Description
Some little work over the code while I ran over it.
Attachments (1)
Change History (9)
#4
@
13 years ago
Both of these changes make the code less readable.
(Not a task, at best an enhancement.)
#6
@
13 years ago
472 while ( false === ( $theme_roots = get_site_transient( 'theme_roots' ) ) ) 473 get_themes(); // update transient
Isn't this kinda risky? If something causes the transient getter or setter to fail, then you're stuck in an infinite loop.
#7
follow-up:
↓ 8
@
13 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
I agree that this makes the code less readable. Cleverer code is not always better code.
#8
in reply to:
↑ 7
@
13 years ago
Replying to filosofo:
472 while ( false === ( $theme_roots = get_site_transient( 'theme_roots' ) ) ) 473 get_themes(); // update transientIsn't this kinda risky? If something causes the transient getter or setter to fail, then you're stuck in an infinite loop.
True, which would result in same: a failt of get_theme_roots() (as w/o the patch).
---
Replying to scribu:
I agree that this makes the code less readable. Cleverer code is not always better code.
Code is never clever.
Less code is better code.
@hakre: Only the lead devs should change something to task (blessed), as it means it has been blessed by the leads.