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:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tests/phpunit/tests/ajax/AddMeta.php

    r43811 r44153  
    2222
    2323        $_POST = array(
    24             'post_id'      => $p,
    25             'metakeyinput' => 'testkey',
    26             'metavalue'    => '',
     24            'post_id'              => $p,
     25            'metakeyinput'         => 'testkey',
     26            'metavalue'            => '',
    2727            '_ajax_nonce-add-meta' => wp_create_nonce( 'add-meta' ),
    2828        );
     
    5151        $_POST = array(
    5252            '_ajax_nonce-add-meta' => wp_create_nonce( 'add-meta' ),
    53             'post_id' => $p,
    54             'meta' => array(
     53            'post_id'              => $p,
     54            'meta'                 => array(
    5555                $m => array(
    5656                    'key'   => 'testkey',
Note: See TracChangeset for help on using the changeset viewer.