diff --git a/wp-admin/custom-background.php b/wp-admin/custom-background.php index a79be95ab0..aef3300520 100644 --- a/wp-admin/custom-background.php +++ b/wp-admin/custom-background.php @@ -91,6 +91,7 @@ class Custom_Background { remove_theme_mod('background_image_thumb'); return; } + if ( isset($_POST['remove-background']) ) { // @TODO: Uploaded files are not removed here. check_admin_referer('custom-background-remove', '_wpnonce-custom-background-remove'); @@ -107,14 +108,16 @@ class Custom_Background { $repeat = 'repeat'; set_theme_mod('background_repeat', $repeat); } - if ( isset($_POST['background-position']) ) { + + if ( isset($_POST['background-position-x']) ) { check_admin_referer('custom-background'); - if ( in_array($_POST['background-position'], array('center', 'right', 'left')) ) - $position = $_POST['background-position']; + if ( in_array($_POST['background-position-x'], array('center', 'right', 'left')) ) + $position = $_POST['background-position-x']; else $position = 'left'; - set_theme_mod('background_position', $position); + set_theme_mod('background_position_x', $position); } + if ( isset($_POST['background-attachment']) ) { check_admin_referer('custom-background'); if ( in_array($_POST['background-attachment'], array('fixed', 'scroll')) ) @@ -123,6 +126,7 @@ class Custom_Background { $attachment = 'fixed'; set_theme_mod('background_attachment', $attachment); } + if ( isset($_POST['background-color']) ) { check_admin_referer('custom-background'); $color = preg_replace('/[^0-9a-fA-F]/', '', $_POST['background-color']); @@ -155,33 +159,29 @@ class Custom_Background { call_user_func($this->admin_image_div_callback); } else { ?> -
++ |
-
+ - |
@@ -189,10 +189,11 @@ if ( get_background_image() ) {
||
---|---|---|---|
- | + | ||
- | + |
+ | |||
---|---|---|---|
+ | @@ -262,10 +262,10 @@ if ( get_background_image() ) { | @@ -284,7 +284,7 @@ if ( get_background_image() ) { |