From 6924c645b79ee0c7b9ef6a658132bdbba969505b Mon Sep 17 00:00:00 2001 From: Andrew 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: https://develop.svn.wordpress.org/trunk@14624 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 da95c56fcf..c468f34859 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;