Make WordPress Core


Ignore:
Timestamp:
12/14/2018 03:16:56 AM (6 years ago)
Author:
desrosj
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, danielbachhuber.

Merges [43811] to trunk.

Fixes #43559.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-admin/includes/ajax-actions.php

    r43598 r44153  
    14441444            wp_die( __( 'Please provide a custom field name.' ) );
    14451445        }
    1446         if ( '' == trim( $value ) ) {
    1447             wp_die( __( 'Please provide a custom field value.' ) );
    1448         }
    14491446        if ( ! $meta = get_metadata_by_mid( 'post', $mid ) ) {
    14501447            wp_die( 0 ); // if meta doesn't exist
Note: See TracChangeset for help on using the changeset viewer.