Set meta when upload matches dimensions. see #17240

git-svn-id: https://develop.svn.wordpress.org/trunk@17758 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2011-04-28 23:14:08 +00:00
parent 405093f3de
commit 5076061131
1 changed files with 1 additions and 0 deletions

View File

@ -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