Media: Deprecate the 'edit_custom_thumbnail_sizes' filter and disable the "Apply changes to [Thumbnail|All|All except thumbnail]" UI in the image editor. Add a (boolean) filter to reenable that UI.

Props peterwilsoncc, costdev, azaozz.
See: #57685.

git-svn-id: https://develop.svn.wordpress.org/trunk@55935 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2023-06-18 14:22:40 +00:00
parent be7dc79427
commit bcb881c17f
4 changed files with 111 additions and 77 deletions
+9 -3
View File
@@ -358,10 +358,16 @@
* @param {number} postid The post ID.
*
* @return {string} The value from the imagedit-save-target input field when available,
* or 'full' when not available.
* 'full' when not selected, or 'all' if it doesn't exist.
*/
getTarget : function(postid) {
return $('input[name="imgedit-target-' + postid + '"]:checked', '#imgedit-save-target-' + postid).val() || 'full';
getTarget : function( postid ) {
var element = $( '#imgedit-save-target-' + postid );
if ( element.length ) {
return element.find( 'input[name="imgedit-target-' + postid + '"]:checked' ).val() || 'full';
}
return 'all';
},
/**