Skip to content
This repository has been archived by the owner. It is now read-only.

Content permissions metabox info text #96

Closed
lutrov opened this issue Jun 4, 2016 · 4 comments
Closed

Content permissions metabox info text #96

lutrov opened this issue Jun 4, 2016 · 4 comments

Comments

@lutrov
Copy link

lutrov commented Jun 4, 2016

If would good for usability if the content permissions metabox info text used the term "page" and the custom post type names instead of defaulting to "post" in all cases.

In class-meta-box-content-permissions.php, right now there are two places where the word "post" is used:

"Limit access to this post's content to users of the selected roles."

"If no roles are selected, everyone can view the content. The post author, any users who can edit this post, and users with the restrict_content capability can view the content regardless of role."

For pages, ideally it should read like this:

"Limit access to this page's content to users of the selected roles."

"If no roles are selected, everyone can view the content. The page author, any users who can edit this page, and users with the restrict_content capability can view the content regardless of role."

If I had a CPT called "movie" for instance, ideally it should read like this:

"Limit access to this movie's content to users of the selected roles."

"If no roles are selected, everyone can view the content. The movie author, any users who can edit this movie, and users with the restrict_content capability can view the content regardless of role."

@justintadlock
Copy link
Owner

justintadlock commented Jun 4, 2016

There's no way to get the page's and movie's text in a translation-friendly way. Same with page and movie. There are no existing post type labels for those forms of the post types.

It could be improved though. Maybe something without all the extra text to begin with. The UI should speak for itself if at all possible.

@lutrov
Copy link
Author

lutrov commented Jun 4, 2016

There is singular_name but yeah, you're right, there's no accounting for movies or movie's. What about a filter that allows us to change the whole sentence then? That would work.

@justintadlock
Copy link
Owner

justintadlock commented Jun 4, 2016

singular_name is typically uppercase (in English), not lowercase. While strotolower() would work for many English post type names, it would be inconsistent across languages and not account for words that should be uppercase.

It's usually bad form to provide filter hooks for text strings (that's what translation files are for). If it comes down to it, I'll use that option as a last resort.

A simple change in the text might suffice:

"Limit access to the content to users of the selected roles."

"If no roles are selected, everyone can view the content. The author, any users who can edit the content, and users with the restrict_content capability can view the content regardless of role."

I'd like to cut back on the wording though and simplify it.

@lutrov
Copy link
Author

lutrov commented Jun 4, 2016

Yes, that will work. Using "content" still keeps it meaningful, irrespective of whether it's a page, post, movie, etc. I think your text is good and I can't see how it could be simplified while still being explanatory. Thanks for taking the time to discuss it.

justintadlock added a commit that referenced this issue Jun 26, 2017
…rather than "post" so that it's a bit more post type agnostic. Fixes #96
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants