[wp-trac] [WordPress Trac] #17376: Multisite Subfolders and bunk /wp-admin areas

WordPress Trac noreply at wordpress.org
Tue Aug 13 13:53:43 UTC 2013


#17376: Multisite Subfolders and bunk /wp-admin areas
------------------------------------+------------------
 Reporter:  MadtownLems             |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  3.7
Component:  Multisite               |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------

Comment (by nacin):

 The use of all_admin_notices is clever, but I think we could probably
 ditch the notice — just silently do the redirect to the right place.

 Need to make sure this properly handles the network admin (which always
 operates from the root of the network's URL), when WordPress is used in a
 subdirectory (i.e. something/wp-admin/users.php is actually /wordpress/wp-
 admin/users.php), and the user admin (wp-admin/user). I didn't identify
 any problems in particular, but this also looks like a great opportunity
 for unit tests.

 The regexes themselves could be cleaned up a little. We only really need
 to worry about path comparisons here. Something like:
 {{{
 $site_admin_url = parse_url( admin_url(), PHP_URL_PATH );
 preg_match( '.*/wp-admin', $_SERVER['REQUEST_URI'], $requested_admin_url
 );
 $site_admin_url === trailingslashit( $requested_admin_url );
 }}}

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


More information about the wp-trac mailing list