WordPress.org

Make WordPress Core

Changeset 20830


Ignore:
Timestamp:
05/18/2012 08:22:57 PM (8 years ago)
Author:
ryan
Message:

set_url_scheme() for header and background image srcs. see #20702

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/custom-background.php

    r20757 r20830  
    208208if ( get_background_image() ) {
    209209    // background-image URL must be single quote, see below
    210     $background_styles .= ' background-image: url(\'' . get_theme_mod('background_image_thumb', '') . '\');'
     210    $background_styles .= ' background-image: url(\'' . set_url_scheme( get_theme_mod('background_image_thumb', '') ) . '\');'
    211211        . ' background-repeat: ' . get_theme_mod('background_repeat', 'repeat') . ';'
    212212        . ' background-position: top ' . get_theme_mod('background_position_x', 'left');
     
    215215<div id="custom-background-image" style="<?php echo $background_styles; ?>"><?php // must be double quote, see above ?>
    216216<?php if ( get_background_image() ) { ?>
    217 <img class="custom-background-image" src="<?php echo get_theme_mod('background_image_thumb', ''); ?>" style="visibility:hidden;" alt="" /><br />
    218 <img class="custom-background-image" src="<?php echo get_theme_mod('background_image_thumb', ''); ?>" style="visibility:hidden;" alt="" />
     217<img class="custom-background-image" src="<?php echo set_url_scheme( get_theme_mod('background_image_thumb', '') ); ?>" style="visibility:hidden;" alt="" /><br />
     218<img class="custom-background-image" src="<?php echo set_url_scheme( get_theme_mod('background_image_thumb', '') ); ?>" style="visibility:hidden;" alt="" />
    219219<?php } ?>
    220220</div>
  • trunk/wp-admin/custom-header.php

    r20806 r20830  
    334334            if ( !empty( $header['attachment_id'] ) )
    335335                $width = ' width="230"';
    336             echo '<img src="' . $header_thumbnail . '" alt="' . esc_attr( $header_desc ) .'" title="' . esc_attr( $header_desc ) . '"' . $width . ' /></label>';
     336            echo '<img src="' . set_url_scheme( $header_thumbnail ) . '" alt="' . esc_attr( $header_desc ) .'" title="' . esc_attr( $header_desc ) . '"' . $width . ' /></label>';
    337337            echo '</div>';
    338338        }
  • trunk/wp-includes/class-wp-customize-control.php

    r20777 r20830  
    344344                            <img style="display:none;" />
    345345                        <?php else: ?>
    346                             <img src="<?php echo esc_url( $src ); ?>" />
     346                            <img src="<?php echo esc_url( set_url_scheme( $src ) ); ?>" />
    347347                        <?php endif; ?>
    348348                        <div class="dropdown-status"></div>
     
    427427        foreach ( $headers as $header ) : ?>
    428428            <a href="#" class="thumbnail" data-customize-image-value="<?php echo esc_url( $header['url'] ); ?>">
    429                 <img src="<?php echo esc_url( $header['thumbnail_url'] ); ?>" />
     429                <img src="<?php echo esc_url( set_url_scheme( $header['thumbnail_url'] ) ); ?>" />
    430430            </a>
    431431        <?php endforeach;
     
    438438        foreach ( $custom_image_header->default_headers as $header ) : ?>
    439439            <a href="#" class="thumbnail" data-customize-image-value="<?php echo esc_url( $header['url'] ); ?>">
    440                 <img src="<?php echo esc_url( $header['thumbnail_url'] ); ?>" />
     440                <img src="<?php echo esc_url( set_url_scheme( $header['thumbnail_url'] ) ); ?>" />
    441441            </a>
    442442        <?php endforeach;
Note: See TracChangeset for help on using the changeset viewer.