Ticket #11683 (new defect (bug))
update_metadata() passes only the first meta_id
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | General | Version: | 2.9 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Code to reproduce:
function update_metadata_action_test($meta_id) {
var_dump($meta_id);
}
add_action('update_post_meta', 'update_metadata_action_test');
add_metadata('post', 1, 'mykey', 'value1');
add_metadata('post', 1, 'mykey', 'value2');
update_metadata('post', 1, 'mykey', 'new value');
Expected result:
Array ( [0] => 101 [1] => 102 )
Actual result:
string(3) "101"
Change History
Come to think of it, I have no ideea why $meta_id is passed at all (and as the first parameter at that). It's not accesible from anywhere else in the API.
- Milestone changed from 3.0 to 3.1
Needs to be handled with #10905 I'd think.
Note: See
TracTickets for help on using
tickets.

Two solutions:
The first would create more severe backward compatibility issues than the second.