diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index 8fb348c6d3..fcc67eba19 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -1341,8 +1341,6 @@ function wp_ajax_add_meta() { $value = wp_unslash( $_POST['meta'][$mid]['value'] ); 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 if ( is_protected_meta( $meta->meta_key, 'post' ) || is_protected_meta( $key, 'post' ) || diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 015c7d32ec..a95ff78bc6 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -814,7 +814,7 @@ function add_meta( $post_ID ) { if ( is_string( $metavalue ) ) $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 c0768acfe5..17d71d1452 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-43810'; +$wp_version = '5.0-alpha-43811'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.