mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 20:58:55 +00:00
Theme Customizer: Improve background image control, add correct meta key to custom headers and backgrounds uploaded using the customizer. see #19910.
git-svn-id: https://develop.svn.wordpress.org/trunk@20913 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1640,6 +1640,14 @@ function wp_ajax_upload_attachment() {
|
||||
wp_die();
|
||||
}
|
||||
|
||||
if ( isset( $post_data['context'] ) && isset( $post_data['theme'] ) ) {
|
||||
if ( 'custom-background' === $post_data['context'] )
|
||||
update_post_meta( $attachment_id, '_wp_attachment_is_custom_background', $post_data['theme'] );
|
||||
|
||||
if ( 'custom-header' === $post_data['context'] )
|
||||
update_post_meta( $attachment_id, '_wp_attachment_is_custom_header', $post_data['theme'] );
|
||||
}
|
||||
|
||||
$post = get_post( $attachment_id );
|
||||
|
||||
echo json_encode( array(
|
||||
|
||||
Reference in New Issue
Block a user