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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36866 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter
2016-03-06 01:44:53 +00:00
parent 6d01e8650c
commit 52d50a6ce9
2 changed files with 16 additions and 6 deletions
+4
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;
},
/**