[wp-trac] [WordPress Trac] #15384: wp-login.php refactor
WordPress Trac
wp-trac at lists.automattic.com
Fri Dec 17 03:13:47 UTC 2010
#15384: wp-login.php refactor
----------------------------+-----------------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: 3.2-early |
----------------------------+-----------------------------
Comment (by norbertm):
Included an early version of the refactored WP_Login class.
The generic idea is to encapsulate all initialization, a dispatch
controller, several action handlers (handle_*, process_*), some service
layer methods (do_*) and separate view rendering methods (render_*) from
the original wp-login.php script.
Ideally, I'd like to separate requests that do not change state (GET) from
those that do (POST) but the current action handlers do not let that
happen easily. The idea is if it's a POST request handle that part first,
collect any errors, then proceed with the GET part to compose a response
by passing the errors to that method.
handle_login() needs some rethinking, especially at the end.
I'd like improve smaller things, for example, the success branch should
return at the end of a function vs exit in the middle buried within if()s.
Interested to see if redirects are worth extracting out into their own
methods.
In the end, I plan to update the entire file to follow the WP coding
standards.
Extracted $aliases to serve as a map for duplicate (deprecated?) action
names.
Any feedback is greatly appreciated.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15384#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list