diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index db22db2924..f11b243e1a 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -1443,9 +1443,6 @@ function wp_ajax_add_meta() { if ( '' == trim( $key ) ) { wp_die( __( 'Please provide a custom field name.' ) ); } - if ( '' == trim( $value ) ) { - wp_die( __( 'Please provide a custom field value.' ) ); - } if ( ! $meta = get_metadata_by_mid( 'post', $mid ) ) { wp_die( 0 ); // if meta doesn't exist } diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 2595f69f7c..adc17ba91f 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -867,7 +867,7 @@ function add_meta( $post_ID ) { $metavalue = trim( $metavalue ); } - if ( ( '0' === $metavalue || ! empty( $metavalue ) ) && ( ( ( '#NONE#' != $metakeyselect ) && ! empty( $metakeyselect ) ) || ! empty( $metakeyinput ) ) ) { + if ( ( ( '#NONE#' != $metakeyselect ) && ! empty( $metakeyselect ) ) || ! empty( $metakeyinput ) ) { /* * We have a key/value pair. If both the select and the input * for the key have data, the input takes precedence. diff --git a/wp-includes/version.php b/wp-includes/version.php index 89d468abb1..8c27847531 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-alpha-44152'; +$wp_version = '5.1-alpha-44153'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.