set_url_scheme() for header and background image srcs. see #20702
git-svn-id: https://develop.svn.wordpress.org/trunk@20830 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9c2fe1c948
commit
bb4ab7e842
|
@ -207,15 +207,15 @@ if ( $bgcolor = get_background_color() )
|
||||||
|
|
||||||
if ( get_background_image() ) {
|
if ( get_background_image() ) {
|
||||||
// background-image URL must be single quote, see below
|
// background-image URL must be single quote, see below
|
||||||
$background_styles .= ' background-image: url(\'' . get_theme_mod('background_image_thumb', '') . '\');'
|
$background_styles .= ' background-image: url(\'' . set_url_scheme( get_theme_mod('background_image_thumb', '') ) . '\');'
|
||||||
. ' background-repeat: ' . get_theme_mod('background_repeat', 'repeat') . ';'
|
. ' background-repeat: ' . get_theme_mod('background_repeat', 'repeat') . ';'
|
||||||
. ' background-position: top ' . get_theme_mod('background_position_x', 'left');
|
. ' background-position: top ' . get_theme_mod('background_position_x', 'left');
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="custom-background-image" style="<?php echo $background_styles; ?>"><?php // must be double quote, see above ?>
|
<div id="custom-background-image" style="<?php echo $background_styles; ?>"><?php // must be double quote, see above ?>
|
||||||
<?php if ( get_background_image() ) { ?>
|
<?php if ( get_background_image() ) { ?>
|
||||||
<img class="custom-background-image" src="<?php echo get_theme_mod('background_image_thumb', ''); ?>" style="visibility:hidden;" alt="" /><br />
|
<img class="custom-background-image" src="<?php echo set_url_scheme( get_theme_mod('background_image_thumb', '') ); ?>" style="visibility:hidden;" alt="" /><br />
|
||||||
<img class="custom-background-image" src="<?php echo get_theme_mod('background_image_thumb', ''); ?>" style="visibility:hidden;" alt="" />
|
<img class="custom-background-image" src="<?php echo set_url_scheme( get_theme_mod('background_image_thumb', '') ); ?>" style="visibility:hidden;" alt="" />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
@ -333,7 +333,7 @@ class Custom_Image_Header {
|
||||||
$width = '';
|
$width = '';
|
||||||
if ( !empty( $header['attachment_id'] ) )
|
if ( !empty( $header['attachment_id'] ) )
|
||||||
$width = ' width="230"';
|
$width = ' width="230"';
|
||||||
echo '<img src="' . $header_thumbnail . '" alt="' . esc_attr( $header_desc ) .'" title="' . esc_attr( $header_desc ) . '"' . $width . ' /></label>';
|
echo '<img src="' . set_url_scheme( $header_thumbnail ) . '" alt="' . esc_attr( $header_desc ) .'" title="' . esc_attr( $header_desc ) . '"' . $width . ' /></label>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
echo '<div class="clear"></div></div>';
|
echo '<div class="clear"></div></div>';
|
||||||
|
|
|
@ -343,7 +343,7 @@ class WP_Customize_Image_Control extends WP_Customize_Upload_Control {
|
||||||
<?php if ( empty( $src ) ): ?>
|
<?php if ( empty( $src ) ): ?>
|
||||||
<img style="display:none;" />
|
<img style="display:none;" />
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<img src="<?php echo esc_url( $src ); ?>" />
|
<img src="<?php echo esc_url( set_url_scheme( $src ) ); ?>" />
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div class="dropdown-status"></div>
|
<div class="dropdown-status"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -426,7 +426,7 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
|
||||||
|
|
||||||
foreach ( $headers as $header ) : ?>
|
foreach ( $headers as $header ) : ?>
|
||||||
<a href="#" class="thumbnail" data-customize-image-value="<?php echo esc_url( $header['url'] ); ?>">
|
<a href="#" class="thumbnail" data-customize-image-value="<?php echo esc_url( $header['url'] ); ?>">
|
||||||
<img src="<?php echo esc_url( $header['thumbnail_url'] ); ?>" />
|
<img src="<?php echo esc_url( set_url_scheme( $header['thumbnail_url'] ) ); ?>" />
|
||||||
</a>
|
</a>
|
||||||
<?php endforeach;
|
<?php endforeach;
|
||||||
}
|
}
|
||||||
|
@ -437,7 +437,7 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
|
||||||
|
|
||||||
foreach ( $custom_image_header->default_headers as $header ) : ?>
|
foreach ( $custom_image_header->default_headers as $header ) : ?>
|
||||||
<a href="#" class="thumbnail" data-customize-image-value="<?php echo esc_url( $header['url'] ); ?>">
|
<a href="#" class="thumbnail" data-customize-image-value="<?php echo esc_url( $header['url'] ); ?>">
|
||||||
<img src="<?php echo esc_url( $header['thumbnail_url'] ); ?>" />
|
<img src="<?php echo esc_url( set_url_scheme( $header['thumbnail_url'] ) ); ?>" />
|
||||||
</a>
|
</a>
|
||||||
<?php endforeach;
|
<?php endforeach;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue