Customizer: Minimize duplicate header crops in the media library.

This adds `Custom_Image_Header::get_previous_crop()`, which finds any
previously cropped headers created from the same base image and replaces
that attachment rather than creating a new attachment.

After updating a crop, the replaced images is also removed from the list
of previous header images in the Customizer.

See #21819.

Built from https://develop.svn.wordpress.org/trunk@41732


git-svn-id: http://core.svn.wordpress.org/trunk@41566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Joe McGill
2017-10-04 14:59:48 +00:00
parent 18d9cc6051
commit 7e29c9646a
5 changed files with 69 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41731';
$wp_version = '4.9-alpha-41732';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.