Skip to content

Conversation

@sboisvert
Copy link

In some cases it is useful to have a more granular control over what post_meta is shown to the end user. Or modify some values before showing them to the user (json_decode, base64_decode, etc)

In some cases it is useful to have a more granular control over what post_meta is shown to the end user. Or modify some values before showing them to the user (json_decode, base64_decode, etc)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo; should be apply_filters

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two other things:

  • The filter name should probably just be pmi_post_meta_value; we're not actually modifying the value so the name is misleading.
  • Why are we unserializing now but weren't before?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we unserializing now but weren't before?

The WPcom version was maybe_unserializing so I ported that behavior here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filter name should probably just be pmi_post_meta_value;

Good idea

@trepmal
Copy link
Contributor

trepmal commented Jun 3, 2021

Note: this PR addresses also #7 and #18 (unserializing data). I see no harm, but we may want to reconfirm after all these years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants