Make WordPress Core


Ignore:
Timestamp:
10/23/2018 06:55:45 PM (6 years ago)
Author:
danielbachhuber
Message:

Meta: Allow empty strings to be set by Custom Fields meta box.

Because the REST API allows meta keys to have empty values, the Custom Fields meta box should permit the same behavior.

Props charlestonsw, soulseekah.
Fixes #43559.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-admin/includes/post.php

    r43792 r43811  
    815815        $metavalue = trim( $metavalue );
    816816
    817     if ( ('0' === $metavalue || ! empty ( $metavalue ) ) && ( ( ( '#NONE#' != $metakeyselect ) && !empty ( $metakeyselect) ) || !empty ( $metakeyinput ) ) ) {
     817    if ( ( ( '#NONE#' != $metakeyselect ) && ! empty( $metakeyselect ) ) || ! empty( $metakeyinput ) ) {
    818818        /*
    819819         * We have a key/value pair. If both the select and the input
Note: See TracChangeset for help on using the changeset viewer.