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/ajax-actions.php

    r43807 r43811  
    13421342        if ( '' == trim($key) )
    13431343            wp_die( __( 'Please provide a custom field name.' ) );
    1344         if ( '' == trim($value) )
    1345             wp_die( __( 'Please provide a custom field value.' ) );
    13461344        if ( ! $meta = get_metadata_by_mid( 'post', $mid ) )
    13471345            wp_die( 0 ); // if meta doesn't exist
Note: See TracChangeset for help on using the changeset viewer.