Changeset 53455 for trunk/src/wp-admin/includes/class-custom-background.php
- Timestamp:
- 06/01/2022 06:12:25 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-custom-background.php
r53183 r53455 527 527 update_post_meta( $id, '_wp_attachment_is_custom_background', get_option( 'stylesheet' ) ); 528 528 529 set_theme_mod( 'background_image', esc_url_raw( $url ) );529 set_theme_mod( 'background_image', sanitize_url( $url ) ); 530 530 531 531 $thumbnail = wp_get_attachment_image_src( $id, 'thumbnail' ); 532 set_theme_mod( 'background_image_thumb', esc_url_raw( $thumbnail[0] ) );532 set_theme_mod( 'background_image_thumb', sanitize_url( $thumbnail[0] ) ); 533 533 534 534 /** This action is documented in wp-admin/includes/class-custom-image-header.php */ … … 619 619 $url = wp_get_attachment_image_src( $attachment_id, $size ); 620 620 $thumbnail = wp_get_attachment_image_src( $attachment_id, 'thumbnail' ); 621 set_theme_mod( 'background_image', esc_url_raw( $url[0] ) );622 set_theme_mod( 'background_image_thumb', esc_url_raw( $thumbnail[0] ) );621 set_theme_mod( 'background_image', sanitize_url( $url[0] ) ); 622 set_theme_mod( 'background_image_thumb', sanitize_url( $thumbnail[0] ) ); 623 623 exit; 624 624 }
Note: See TracChangeset
for help on using the changeset viewer.