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:
@@ -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;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
4
wp-admin/js/customize-controls.min.js
vendored
4
wp-admin/js/customize-controls.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user