From da4c3a96aded5be3b5c971c238a72c98b9f84e1e Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 28 Apr 2011 23:14:08 +0000 Subject: [PATCH] Set meta when upload matches dimensions. see #17240 git-svn-id: http://svn.automattic.com/wordpress/trunk@17758 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/custom-header.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index 0f1856d6b5..7c739b0ff6 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -655,6 +655,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?> if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) { // Add the meta-data wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); + update_post_meta( $id, '_wp_attachment_is_custom_header', get_option('stylesheet' ) ); set_theme_mod('header_image', esc_url($url)); do_action('wp_create_file_in_uploads', $file, $id); // For replication