Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#36088 closed enhancement (duplicate)

Filter for `post_meta`

Reported by: sebastianpisula's profile sebastian.pisula Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Options, Meta APIs Keywords:
Focuses: Cc:


I think that post meta should have filter for return value.

Attachments (1)

36088.patch (1.1 KB) - added by sebastian.pisula 8 years ago.

Download all attachments as: .zip

Change History (5)

#1 @jeremyfelt
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Hi @sebastian.pisula. A get_{$meta_type}_metadata filter is already available that allows for filtering all types of meta rather than just posts. This should provide the same filtering capabilities as the suggested new filter.

#2 @sebastian.pisula
8 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

I think that my filter is other that get_{$meta_type}_metadata - My filter exist post meta but this filter return value if I set value in filter. In your filter I can't check value for example how I can change meta value for "test" if value is "now" ?

#3 @jeremyfelt
8 years ago

  • Resolution set to duplicate
  • Status changed from reopened to closed

Ahh, good point. It looks like #24726 is an open ticket with a patch that would handle the filtering of the meta value. Can you take a look there and add feedback?

#4 @jeremyfelt
8 years ago

  • Component changed from Posts, Post Types to Options, Meta APIs
Note: See TracTickets for help on using tickets.