[wp-trac] [WordPress Trac] #44467: Ensure meta wrapper functions do not contain additional logic
WordPress Trac
noreply at wordpress.org
Sun Jul 8 17:53:44 UTC 2018
#44467: Ensure meta wrapper functions do not contain additional logic
-------------------------------------------------+-------------------------
Reporter: flixos90 | Owner: flixos90
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.0
Component: Options, Meta APIs | Version:
Severity: normal | Resolution:
Keywords: 2nd-opinion has-patch needs-unit- | Focuses: multisite,
tests | rest-api
-------------------------------------------------+-------------------------
Comment (by spacedmonkey):
I was already working on a patch for this myself, so my patch is a fetch
take on this.
In [https://core.trac.wordpress.org/attachment/ticket/44467/44467.2.diff
44467.2.diff] there are the following changes.
- Added the following actions `add_metadata`, `update_metadata`,
`delete_metadata`.
- Add `clean_object_last_changed` this is a very simple function, that has
a case statement in it. It is a lookup function, for each meta type to get
the object type. This function has a filter in it, for better support for
custom meta types.
- Added `update_{$meta_type}_meta_cache` filter.
- Added checks for term meta to make sure it is installed / not shared
term.
- Added checks for sited meta to make sure it is installed / multisite.
My patches uses filters for all this logic, making it very easy to change
/ extend. This is a big patch 20k, it needs tests and testing. Would love
@johnjamesjacoby and @flixos90 on this one. :D
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44467#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list