Changeset 47122 for trunk/src/wp-admin/includes/class-custom-background.php
- Timestamp:
- 01/29/2020 12:43:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-custom-background.php
r46088 r47122 125 125 126 126 if ( isset( $_POST['remove-background'] ) ) { 127 // @ TODO:Uploaded files are not removed here.127 // @todo Uploaded files are not removed here. 128 128 check_admin_referer( 'custom-background-remove', '_wpnonce-custom-background-remove' ); 129 129 set_theme_mod( 'background_image', '' ); … … 285 285 } 286 286 ?> 287 <div id="custom-background-image" style="<?php echo $background_styles; ?>"><?php // must be double quote, see above?>287 <div id="custom-background-image" style="<?php echo $background_styles; ?>"><?php // Must be double quote, see above. ?> 288 288 <?php if ( $background_image_thumb ) { ?> 289 289 <img class="custom-background-image" src="<?php echo $background_image_thumb; ?>" style="visibility:hidden;" alt="" /><br /> … … 504 504 $filename = wp_basename( $file ); 505 505 506 // Construct the object array 506 // Construct the object array. 507 507 $object = array( 508 508 'post_title' => $filename, … … 513 513 ); 514 514 515 // Save the data 515 // Save the data. 516 516 $id = wp_insert_attachment( $object, $file ); 517 517 518 // Add the meta -data518 // Add the metadata. 519 519 wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); 520 520 update_post_meta( $id, '_wp_attachment_is_custom_background', get_option( 'stylesheet' ) ); … … 526 526 527 527 /** This action is documented in wp-admin/includes/class-custom-image-header.php */ 528 do_action( 'wp_create_file_in_uploads', $file, $id ); // For replication 528 do_action( 'wp_create_file_in_uploads', $file, $id ); // For replication. 529 529 $this->updated = true; 530 530 }
Note: See TracChangeset
for help on using the changeset viewer.