Opened 3 years ago
Closed 3 years ago
#53102 closed defect (bug) (fixed)
Incorrect documentation for delete_{$meta_type}_meta and deleted_{$meta_type}_meta filter hooks
Reported by: | pputzer | Owned by: | davidbaumwald |
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | 5.4 |
Component: | Options, Meta APIs | Keywords: | good-first-bug has-patch |
Focuses: | docs | Cc: |
Description
The inline documentation for delete_{$meta_type}_meta
and deleted_{$meta_type}_meta
incorrectly states that the $_meta_value
parameter is Serialized if non-scalar
(from [47390]). While $meta_value
is run through maybe_serialize
, $_meta_value
is not.
Also, I think the hook documentation should make it clear that the meta value is only passed from the optional function argument, so it might not contain anything meaningful.
Attachments (1)
Change History (6)
#2
@
3 years ago
- Component changed from General to Options, Meta APIs
- Milestone changed from Awaiting Review to 5.8
#3
@
3 years ago
- Keywords needs-patch good-first-bug added
- Milestone changed from 5.8 to 5.9
The beta 1 deadline is today. Since this one does not yet have a patch, I am going to punt to 5.9. However, documentation changes are allowed during the beta part of the release cycle. If someone is able to create a patch before 29 June, it can be moved back.
Note: See
TracTickets for help on using
tickets.
On further investigation, the issue may stem at least partially from the to separate uses of the hook in
delete_metadata
anddelete_metadata_by_mid
. The latter usesget_metadata_by_mid
to retrieve the current values before deleting the metadata. The meta value is still not serialized, though.I think the best solution would be to read the actual meta values in
delete_metadata
as well.