WordPress.org

Make WordPress Core

Ticket #19799: wp-login-relocate-home.patch

File wp-login-relocate-home.patch, 673 bytes (added by mintindeed, 4 years ago)
  • wp-login.php

     
    353353        $schema = is_ssl() ? 'https://' : 'http://'; 
    354354        if ( dirname($schema . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_option('siteurl') ) 
    355355                update_option('siteurl', dirname($schema . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) ); 
     356 
     357        if ( dirname($schema . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_option('home') ) 
     358                update_option('home', dirname($schema . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) ); 
    356359} 
    357360 
    358361//Set a cookie now to see if they are supported by the browser.