X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/6c8f14c09105d0afa4c1574215c59b5021040e76..refs/tags/wordpress-3.7:/wp-admin/custom-background.php diff --git a/wp-admin/custom-background.php b/wp-admin/custom-background.php index a924ecaf..97656089 100644 --- a/wp-admin/custom-background.php +++ b/wp-admin/custom-background.php @@ -67,11 +67,11 @@ class Custom_Background { if ( ! current_user_can('edit_theme_options') ) return; - $this->page = $page = add_theme_page(__('Background'), __('Background'), 'edit_theme_options', 'custom-background', array(&$this, 'admin_page')); + $this->page = $page = add_theme_page(__('Background'), __('Background'), 'edit_theme_options', 'custom-background', array($this, 'admin_page')); - add_action("load-$page", array(&$this, 'admin_load')); - add_action("load-$page", array(&$this, 'take_action'), 49); - add_action("load-$page", array(&$this, 'handle_upload'), 49); + add_action("load-$page", array($this, 'admin_load')); + add_action("load-$page", array($this, 'take_action'), 49); + add_action("load-$page", array($this, 'handle_upload'), 49); if ( $this->admin_header_callback ) add_action("admin_head-$page", $this->admin_header_callback, 51); @@ -203,16 +203,17 @@ if ( $bgcolor = get_background_color() ) $background_styles .= 'background-color: #' . $bgcolor . ';'; if ( get_background_image() ) { + $background_image_thumb = esc_url( set_url_scheme( get_theme_mod( 'background_image_thumb', str_replace( '%', '%%', get_background_image() ) ) ) ); // background-image URL must be single quote, see below - $background_styles .= ' background-image: url(\'' . set_url_scheme( get_theme_mod( 'background_image_thumb', get_background_image() ) ) . '\');' + $background_styles .= ' background-image: url(\'' . $background_image_thumb . '\');' . ' background-repeat: ' . get_theme_mod('background_repeat', 'repeat') . ';' . ' background-position: top ' . get_theme_mod('background_position_x', 'left'); } ?>
-
- +
+
@@ -301,7 +302,7 @@ if ( get_background_image() ) { - +