WordPress.org

Make WordPress Core

Ticket #18397: 18397.patch

File 18397.patch, 562 bytes (added by SergeyBiryukov, 3 years ago)
  • wp-includes/functions.php

     
    36943694                $url = WP_SITEURL; 
    36953695        } else { 
    36963696                $schema = is_ssl() ? 'https://' : 'http://'; 
    3697                 $url = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 
     3697                $url = preg_replace('#/(wp-admin/.*|wp-login.php)#i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 
    36983698        } 
    36993699        return rtrim($url, '/'); 
    37003700}