X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/e9d988989fe37ab8c5f903e47fbe36e6e00dc51f..38ca813a0e312e2768e5b9519f0415cd0aa84781:/wp-admin/custom-background.php diff --git a/wp-admin/custom-background.php b/wp-admin/custom-background.php index 530cb9e4..62ebacf4 100644 --- a/wp-admin/custom-background.php +++ b/wp-admin/custom-background.php @@ -43,14 +43,14 @@ class Custom_Background { var $page = ''; /** - * PHP4 Constructor - Register administration header callback. + * Constructor - Register administration header callback. * * @since 3.0.0 * @param callback $admin_header_callback * @param callback $admin_image_div_callback Optional custom image div output callback. * @return Custom_Background */ - function Custom_Background($admin_header_callback = '', $admin_image_div_callback = '') { + function __construct($admin_header_callback = '', $admin_image_div_callback = '') { $this->admin_header_callback = $admin_header_callback; $this->admin_image_div_callback = $admin_image_div_callback; } @@ -85,7 +85,7 @@ class Custom_Background { '

' . __( 'You can also choose a background color. If you know the hexadecimal code for the color you want, enter it in the Color field. If not, click on the Select a Color link, and a color picker will allow you to choose the exact shade you want.' ) . '

' . '

' . __( 'Don’t forget to click on the Save Changes button when you are finished.' ) . '

' . '

' . __( 'For more information:' ) . '

' . - '

' . __( 'Documentation on Custom Background' ) . '

' . + '

' . __( 'Documentation on Custom Background' ) . '

' . '

' . __( 'Support Forums' ) . '

' ); wp_enqueue_script('custom-background'); wp_enqueue_style('farbtastic'); @@ -237,7 +237,6 @@ if ( get_background_image() ) { -

@@ -270,10 +269,10 @@ if ( get_background_image() ) {
- - - - + + + +
@@ -294,8 +293,9 @@ if ( get_background_image() ) {
+ - + class="hide-if-no-js" id="clearcolor"> ()
@@ -346,6 +346,7 @@ if ( get_background_image() ) { // Add the meta-data wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); + update_post_meta( $id, '_wp_attachment_is_custom_background', get_option('stylesheet' ) ); set_theme_mod('background_image', esc_url($url));