Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Conversation

@joehoyle
Copy link
Member

Currently we handle registering meta even if your register the type as
anything other than boolean number and string, however we don't
currently have great ways to handle non-scaler meta. For now, let's
whitelist these types and throw a doing_it_wrong if meta is registered
with an invalid type.

Currently we handle registering meta even if your register the type as
anything other than `boolean` `number` and `string`, however we don't
currently have great ways to handle non-scaler meta. For now, let's
whitelist these types and throw a `doing_it_wrong` if meta is registered
with an invalid type.
@kadamwhite
Copy link
Contributor

How do we handle namespacing of objects in meta? e.g., if I'm an seo plugin and I have a "score" meta value, but there's also a keyword-bingo plugin that also has a "score," and I only have a numeric meta field to put them in -- not an object -- how do I ensure there won't be a conflict?

);
}
} else {
if ( ! in_array( $rest_args['schema']['type'], array( 'number', 'string', 'boolean' ), true ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

elseif?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants