Message info
 
To:wp-svn@lists.automattic.com From:m@wordpress.org Subject:[wp-svn] [20830] trunk: set_url_scheme() for header and background image srcs. Date:Fri, 18 May 2012 20:22:58 +0000 (UTC)
 

Revision
20830
Author
ryan
Date
2012-05-18 20:22:57 +0000 (Fri, 18 May 2012)

Log Message

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

Modified Paths

Diff

Modified: trunk/wp-admin/custom-background.php (20829 => 20830)


--- trunk/wp-admin/custom-background.php	2012-05-18 20:09:53 UTC (rev 20829)
+++ trunk/wp-admin/custom-background.php	2012-05-18 20:22:57 UTC (rev 20830)
@@ -207,15 +207,15 @@
 
 if ( get_background_image() ) {
 	// 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-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 ?>
 <?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 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="" /><br />
+<img class="custom-background-image" src="<?php echo set_url_scheme( get_theme_mod('background_image_thumb', '') ); ?>" style="visibility:hidden;" alt="" />
 <?php } ?>
 </div>
 <?php } ?>

Modified: trunk/wp-admin/custom-header.php (20829 => 20830)


--- trunk/wp-admin/custom-header.php	2012-05-18 20:09:53 UTC (rev 20829)
+++ trunk/wp-admin/custom-header.php	2012-05-18 20:22:57 UTC (rev 20830)
@@ -333,7 +333,7 @@
 			$width = '';
 			if ( !empty( $header['attachment_id'] ) )
 				$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 class="clear"></div></div>';

Modified: trunk/wp-includes/class-wp-customize-control.php (20829 => 20830)


--- trunk/wp-includes/class-wp-customize-control.php	2012-05-18 20:09:53 UTC (rev 20829)
+++ trunk/wp-includes/class-wp-customize-control.php	2012-05-18 20:22:57 UTC (rev 20830)
@@ -343,7 +343,7 @@
 						<?php if ( empty( $src ) ): ?>
 							<img style="display:none;" />
 						<?php else: ?>
-							<img src="<?php echo esc_url( $src ); ?>" />
+							<img src="<?php echo esc_url( set_url_scheme( $src ) ); ?>" />
 						<?php endif; ?>
 						<div class="dropdown-status"></div>
 					</div>
@@ -426,7 +426,7 @@
 
 		foreach ( $headers as $header ) : ?>
 			<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>
 		<?php endforeach;
 	}
@@ -437,7 +437,7 @@
 
 		foreach ( $custom_image_header->default_headers as $header ) : ?>
 			<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>
 		<?php endforeach;
 	}