mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Header Images: Add suggested dimensions to the media workflow.
props ehg, gcorne. see #21785. git-svn-id: https://develop.svn.wordpress.org/trunk@28030 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -419,16 +419,10 @@
|
||||
* @param {event} event
|
||||
*/
|
||||
openMedia: function(event) {
|
||||
var suggestedWidth, suggestedHeight,
|
||||
l10n = _wpMediaViewsL10n;
|
||||
var l10n = _wpMediaViewsL10n;
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
suggestedWidth = l10n.suggestedWidth.replace('%d', _wpCustomizeHeader.data.width);
|
||||
suggestedHeight = l10n.suggestedHeight.replace('%d', _wpCustomizeHeader.data.height);
|
||||
|
||||
/* '<span class="suggested-dimensions">' + suggestedWidth + ' ' + suggestedHeight + '</span>' */
|
||||
|
||||
this.frame = wp.media({
|
||||
title: l10n.chooseImage,
|
||||
library: {
|
||||
@@ -439,7 +433,11 @@
|
||||
close: false
|
||||
},
|
||||
multiple: false,
|
||||
imgSelectOptions: this.calculateImageSelectOptions
|
||||
crop: {
|
||||
suggestedWidth: _wpCustomizeHeader.data.width,
|
||||
suggestedHeight: _wpCustomizeHeader.data.height,
|
||||
imgSelectOptions: this.calculateImageSelectOptions
|
||||
}
|
||||
});
|
||||
|
||||
this.frame.states.add([new wp.media.controller.Cropper()]);
|
||||
|
||||
Reference in New Issue
Block a user