WordPress.org

Make WordPress Core

Ticket #20759: 20759.3.diff

File 20759.3.diff, 919 bytes (added by SergeyBiryukov, 6 years ago)
  • wp-includes/link-template.php

     
    18901890 * @return string Home url link with optional path appended.
    18911891*/
    18921892function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
    1893         $orig_scheme = $scheme;
    1894 
    1895         if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) )
    1896                 $scheme = is_ssl() && !is_admin() ? 'https' : 'http';
    1897 
    18981893        if ( empty( $blog_id ) || !is_multisite() ) {
    18991894                $url = get_option( 'home' );
    19001895        } else {
     
    19081903        if ( ! empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false )
    19091904                $url .= '/' . ltrim( $path, '/' );
    19101905
    1911         return apply_filters( 'home_url', $url, $path, $orig_scheme, $blog_id );
     1906        return apply_filters( 'home_url', $url, $path, $scheme, $blog_id );
    19121907}
    19131908
    19141909/**