From c5c6244c50e613034ed0281e576a42defa280ff3 Mon Sep 17 00:00:00 2001 From: nacin Date: Fri, 14 May 2010 06:48:47 +0000 Subject: [PATCH] Use inline styles in custom background admin, and prepopulate background options. props jshreve, see #12186. git-svn-id: http://svn.automattic.com/wordpress/trunk@14624 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/custom-background.php | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/wp-admin/custom-background.php b/wp-admin/custom-background.php index da95c56fc..c468f3485 100644 --- a/wp-admin/custom-background.php +++ b/wp-admin/custom-background.php @@ -154,18 +154,19 @@ class Custom_Background { - -
+?> +

@@ -325,6 +326,10 @@ class Custom_Background { $thumbnail = wp_get_attachment_image_src( $id, 'thumbnail' ); set_theme_mod('background_image_thumb', esc_url( $thumbnail[0] ) ); + + set_theme_mod('background_position', get_theme_mod('background_position', 'left') ); + set_theme_mod('background_repeat', get_theme_mod('background_repeat', 'tile') ); + set_theme_mod('background-attachment', get_theme_mod('background_position', 'fixed') ); do_action('wp_create_file_in_uploads', $file, $id); // For replication $this->updated = true;