From 727b070c60009db8d30d35d2f4d20878b8ba414d Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Tue, 5 Jul 2016 13:36:59 +0000 Subject: [PATCH] Media: Improve form validation errors handling when editing images. * Use the same check for a numeric value used on the crop fields on all the other fields: don't display "NaN", just empty the field. * Remove the inline script that runs the initialization of the image editor and call it after the editor UI is fully ready. Props afercia. Fixes #36316. git-svn-id: https://develop.svn.wordpress.org/trunk@37966 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/image-edit.php | 13 ++++++------- src/wp-admin/js/image-edit.js | 28 ++++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/src/wp-admin/includes/image-edit.php b/src/wp-admin/includes/image-edit.php index 99e1c400ff..5f5dc878ec 100644 --- a/src/wp-admin/includes/image-edit.php +++ b/src/wp-admin/includes/image-edit.php @@ -60,11 +60,11 @@ function wp_image_editor($post_id, $msg = false) {
× ! , 'scale')" class="button button-primary" value="" /> @@ -116,11 +116,11 @@ function wp_image_editor($post_id, $msg = false) {
:
@@ -129,11 +129,11 @@ function wp_image_editor($post_id, $msg = false) {
×
@@ -224,7 +224,6 @@ function wp_image_editor($post_id, $msg = false) {
-