Make WordPress Core

Ticket #28904: 28904.patch

File 28904.patch, 1.0 KB (added by michalzuber, 10 years ago)
  • src/wp-admin/custom-header.php

     
    10181018                        if ( ! isset( $choice['attachment_id'] ) || ! isset( $choice['url'] ) )
    10191019                                return;
    10201020
    1021                         $choice['url'] = esc_url_raw( $choice['url'] );
     1021                        $choice['url'] = esc_url_raw( str_replace( get_site_url(), '', $choice['url'] ) );
    10221022
    10231023                        $header_image_data = (object) array(
    10241024                                'attachment_id' => $choice['attachment_id'],
  • src/wp-includes/theme.php

     
    10401040        if ( 'remove-header' == $url )
    10411041                return false;
    10421042
    1043         if ( is_random_header_image() )
     1043        if ( is_random_header_image() ) {
    10441044                $url = get_random_header_image();
     1045        } else {
     1046                $url = get_site_url() . $url;
     1047        }
    10451048
    10461049        return esc_url_raw( set_url_scheme( $url ) );
    10471050}