I have a multi author blog, I want to restrict authors from adding custom fields with a particular key.
For example I dont want authors to edit or add the custom field "rating"
|
I have a multi author blog, I want to restrict authors from adding custom fields with a particular key. For example I dont want authors to edit or add the custom field "rating" |
|||||||||
|
|
The way I would approach this is:
This will only create the meta box if a user is an administrator. It's not a fireproof method unless you disable the custom field interface. If this is a plugin you can use remove_meta_box if the user is not an administrator before the post edit page renders. |
|||
|
|