Set meta when upload matches dimensions. see #17240
git-svn-id: http://svn.automattic.com/wordpress/trunk@17758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
67d53316e0
commit
da4c3a96ad
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue