[wp-trac] [WordPress Trac] #37627: Custom Fields Heading shows up when all meta values are serialized arrays/objects
WordPress Trac
noreply at wordpress.org
Wed Aug 10 18:38:24 UTC 2016
#37627: Custom Fields Heading shows up when all meta values are serialized
arrays/objects
--------------------------------+-----------------------------
Reporter: implenton | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: ui, administration |
--------------------------------+-----------------------------
`_list_meta_row` skips the meta rows when the value is a serialized
array/objects.
When all meta values are serialized arrays/objects OR when you only have
one meta with the value being serialized array/object the table heading
shows up:
[[Image(https://cldup.com/sVKAp24YMF.png)]]
[[Image(https://cldup.com/0axQNTon98.png)]]
There is a check for protected metas before the table rendering
wp-admin/includes/meta-boxes.php:631
{{{
$metadata = has_meta($post->ID);
foreach ( $metadata as $key => $value ) {
if ( is_protected_meta( $metadata[ $key ][ 'meta_key' ], 'post' )
|| ! current_user_can( 'edit_post_meta', $post->ID, $metadata[ $key ][
'meta_key' ] ) )
unset( $metadata[ $key ] );
}
list_meta( $metadata );
}}}
but it does not take in account meta values, which are skipped later.
''This might be considered an edge case, but it is better to be noted.''
Discovered this when I reported:
https://core.trac.wordpress.org/ticket/37626
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37627>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list