indieweb / wordpress-micropub

A Micropub Endpoint plugin for WordPress
https://wordpress.org/plugins/micropub
51 stars 12 forks source link

Published/Updated are singular (non-array) fields #257

Closed Ruxton closed 2 years ago

Ruxton commented 2 years ago

Looking for [0] is breaking me posting old content. Published is supposed to be a singular (non-array) field when present.

Happy to re-write this to array check first if this is gonna cause problems somewhere.

dshanske commented 2 years ago

@Ruxton https://micropub.spec.indieweb.org/#json-syntax It is an array. There is no singular property in JSON syntax.

The only place there is an example in the spec that shows it is https://micropub.spec.indieweb.org/#example-21

Now, in form encoded it does allow a single non-array value, but if you look, the plugin converts form-encoded to json to standardize everything.

Ruxton commented 2 years ago

My bad, was dealing with some old stuff that was sending published as singular and when I read the spec I didn't see it as such.