janboddez / share-on-mastodon

Easily share WordPress posts on Mastodon.
https://jan.boddez.net/wordpress/share-on-mastodon
GNU General Public License v3.0
39 stars 5 forks source link

"Not allowed to edit ... custom field" #65

Closed janboddez closed 1 year ago

janboddez commented 1 year ago

See also https://bbpress.trac.wordpress.org/ticket/3280

This is happening because many of the registered meta-data keys start with _ to hide them from the WordPress custom fields box, but without an explicitly set auth_callback they are assumed to protected, causing __return_false to be used.

This should be solved by adding a proper auth_callback. I.e., __return_true.

We've only recently begun to use register_post_meta(), that's why it didn't show before. (Only reason to call register_post_meta() is allow block developers to work with this custom field. It's not needed for the plugin to function.)

Also, on my sites, I use a filter to show "hidden" custom fields, may be why I haven't experienced this.