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:
parent
405093f3de
commit
5076061131
|
@ -655,6 +655,7 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
|
||||||
if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) {
|
if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) {
|
||||||
// Add the meta-data
|
// Add the meta-data
|
||||||
wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) );
|
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));
|
set_theme_mod('header_image', esc_url($url));
|
||||||
do_action('wp_create_file_in_uploads', $file, $id); // For replication
|
do_action('wp_create_file_in_uploads', $file, $id); // For replication
|
||||||
|
|
Loading…
Reference in New Issue