Ticket #18041: 18041.3.patch
File 18041.3.patch, 2.0 KB (added by , 13 years ago) |
---|
-
wp-includes/theme.php
1678 1678 } 1679 1679 1680 1680 /** 1681 * Retrieve background image thumbnail. 1682 * Uses defined background image path if theme_mod is empty. 1683 * 1684 * @since 3.3 1685 * 1686 * @return string 1687 */ 1688 function get_background_image_thumb() { 1689 $default = defined( 'BACKGROUND_IMAGE' ) ? BACKGROUND_IMAGE : ''; 1690 1691 return get_theme_mod( 'background_image_thumb', $default ); 1692 } 1693 1694 /** 1681 1695 * Retrieve value for custom background color. 1682 1696 * 1683 1697 * @since 3.0.0 -
wp-admin/custom-background.php
196 196 197 197 if ( get_background_image() ) { 198 198 // background-image URL must be single quote, see below 199 $background_styles .= ' background-image: url(\'' . get_ theme_mod('background_image_thumb', '') . '\');'199 $background_styles .= ' background-image: url(\'' . get_background_image_thumb() . '\');' 200 200 . ' background-repeat: ' . get_theme_mod('background_repeat', 'repeat') . ';' 201 201 . ' background-position: top ' . get_theme_mod('background_position_x', 'left'); 202 202 } 203 203 ?> 204 204 <div id="custom-background-image" style="<?php echo $background_styles; ?>"><?php // must be double quote, see above ?> 205 205 <?php if ( get_background_image() ) { ?> 206 <img class="custom-background-image" src="<?php echo get_ theme_mod('background_image_thumb', ''); ?>" style="visibility:hidden;" alt="" /><br />207 <img class="custom-background-image" src="<?php echo get_ theme_mod('background_image_thumb', ''); ?>" style="visibility:hidden;" alt="" />206 <img class="custom-background-image" src="<?php echo get_background_image_thumb(); ?>" style="visibility:hidden;" alt="" /><br /> 207 <img class="custom-background-image" src="<?php echo get_background_image_thumb(); ?>" style="visibility:hidden;" alt="" /> 208 208 <?php } ?> 209 209 </div> 210 210 <?php } ?>