[wp-trac] [WordPress Trac] #11517: Make Admin more MVC-like

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 10 05:49:54 UTC 2010


#11517: Make Admin more MVC-like
----------------------------+-----------------------------------------------
 Reporter:  filosofo        |       Owner:  filosofo               
     Type:  enhancement     |      Status:  new                    
 Priority:  normal          |   Milestone:  3.0                    
Component:  Administration  |     Version:  3.0                    
 Severity:  normal          |    Keywords:  needs-patch admin-theme
----------------------------+-----------------------------------------------

Comment(by mikeschinkel):

 Big +1 on this idea.

 I just spent tons (really, ''tons'') of time writing an admin interface
 that copied the UI for link categories and it was a huge pain.  I'd be
 happy to provide some refactored code ''if'' you think my code will be
 usable albeit I fear I don't yet know enough of the structure that you'd
 prefer, but if so let me know.

 Also I have several thoughts regarding the admin that comes to mind:

 1.) Would it be possible to refactor the menu and submenu function to
 receive only one parameter being an associative array of the items needed
 by the functions rather than six ordinal parameters? It currently very
 hard to remember what parameters go in what order and makes the code very
 hard to follow.  I think this could be done backwards compatibly.

 2.) I found that admin pages in plugins behaved differently than admin
 pages in core.  The problem is the core plugins get to run within their
 own php file under /wp-admin/%admin-page%.php whereas admin pages from
 plugins typically execute under /wp-content/plugins/%plugin%/%admin-
 page%.php or as /wp-admin/admin.php?page=%admin-page%. The flow of the
 former is very different and the flow of the latter is subtly different.
 Addressing this so it's not different would be a huge help.

 3.) Which brings me to admin URL routing.  I think item 2 could be
 resolved by routing clean URLs.  I think routing clean URLs would also be
 helpful for more advanced users to be able to go directly to pages by
 selecting the URL from auto-complete (which I did frequently and really
 appreciated when I worked in Drupal.)  For example, envision admin URLs
 like these:


 {{{
 http://example.com/wp-admin/posts/add-new/
 http://example.com/wp-admin/appearance/themes/
 http://example.com/wp-admin/users/your-profile/
 http://example.com/wp-admin/tools/export/
 http://example.com/wp-admin/settings/general/
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11517#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list