[wp-trac] [WordPress Trac] #33916: Menus Customizer does not work when WP is in a sub-directory

WordPress Trac noreply at wordpress.org
Thu Sep 17 17:40:22 UTC 2015


#33916: Menus Customizer does not work when WP is in a sub-directory
-------------------------------------+-------------------------
 Reporter:  Fab1en                   |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  4.3.2
Component:  Customize                |     Version:  4.3
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  javascript
-------------------------------------+-------------------------
Changes (by westonruter):

 * keywords:  has-patch dev-feedback needs-testing => has-patch needs-
               testing


Comment:

 Replying to [comment:2 adamsilverstein]:
 > Weston, thanks for the quick solution: I wasn't sure about the home_url
 removal in the second hunk, can you please review and advise if that is
 needed?

 Yeah, looks good. Normally the `REQUEST_URI` is *always* set, so the
 initial `requestUri` value just gets overridden. The second `if` statement
 could even be consolidated with the initial array, for instance:

 {{{#!php
 $exports = array(
     /* ... */
    'requestUri' => esc_url_raw( home_url( empty( $_SERVER['REQUEST_URI'] )
 ? '/' : wp_unslash( $_SERVER['REQUEST_URI'] ) ) ),
     /* ... */
 );
 }}}

 But I think I originally kept them separate for readability.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33916#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list