Customize: Fix image cropping when doing live preview of theme switches.

Ensure that the Customizer gets bootstrapped with the pre-activated `theme` supplied in the `custom-header-crop` admin ajax requests.

Props faishal, rittesh.patel.
Fixes #32783.

Built from https://develop.svn.wordpress.org/trunk@36866


git-svn-id: http://core.svn.wordpress.org/trunk@36833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter
2016-03-06 01:45:27 +00:00
parent fe4a3452c3
commit 40f6779665
5 changed files with 20 additions and 10 deletions

View File

@@ -2346,6 +2346,10 @@
api.HeaderTool.UploadsList,
api.HeaderTool.DefaultsList
]);
// Ensure custom-header-crop Ajax requests bootstrap the Customizer to activate the previewed theme.
wp.media.controller.Cropper.prototype.defaults.doCropArgs.wp_customize = 'on';
wp.media.controller.Cropper.prototype.defaults.doCropArgs.theme = api.settings.theme.stylesheet;
},
/**

File diff suppressed because one or more lines are too long