Always show Background Image section heading and the opening table tag on Custom Background screen, to make in consistent with Custom Header and avoid broken markup.

props obenland.
fixes #26731.
Built from https://develop.svn.wordpress.org/trunk@26878


git-svn-id: http://core.svn.wordpress.org/trunk@26761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-12-29 08:06:11 +00:00
parent ed9ddce685
commit 2f3ebce172
2 changed files with 35 additions and 32 deletions

View File

@ -180,23 +180,24 @@ class Custom_Background {
?>
<div class="wrap" id="custom-background">
<h2><?php _e( 'Custom Background' ); ?></h2>
<?php if ( ! empty( $this->updated ) ) { ?>
<div id="message" class="updated">
<p><?php printf( __( 'Background updated. <a href="%s">Visit your site</a> to see how it looks.' ), home_url( '/' ) ); ?></p>
</div>
<?php }
<?php } ?>
if ( $this->admin_image_div_callback ) {
call_user_func($this->admin_image_div_callback);
} else {
?>
<h3><?php _e( 'Background Image' ); ?></h3>
<table class="form-table">
<tbody>
<tr valign="top">
<th scope="row"><?php _e( 'Preview' ); ?></th>
<td>
<?php
if ( $this->admin_image_div_callback ) {
call_user_func( $this->admin_image_div_callback );
} else {
$background_styles = '';
if ( $bgcolor = get_background_color() )
$background_styles .= 'background-color: #' . $bgcolor . ';';
@ -218,6 +219,7 @@ if ( get_background_image() ) {
<?php } ?>
</td>
</tr>
<?php if ( get_background_image() ) : ?>
<tr valign="top">
<th scope="row"><?php _e('Remove Image'); ?></th>
@ -243,8 +245,8 @@ if ( get_background_image() ) {
</form>
</td>
</tr>
<?php endif; ?>
<tr valign="top">
<th scope="row"><?php _e('Select Image'); ?></th>
<td><form enctype="multipart/form-data" id="upload-form" class="wp-upload-form" method="post" action="">

View File

@ -467,7 +467,8 @@ class Custom_Image_Header {
<tr valign="top">
<th scope="row"><?php _e( 'Preview' ); ?></th>
<td>
<?php if ( $this->admin_image_div_callback ) {
<?php
if ( $this->admin_image_div_callback ) {
call_user_func( $this->admin_image_div_callback );
} else {
$custom_header = get_custom_header();