Frontier Post – Settings: Capabilities
Frontier Post does not change any of the existing WordPress roles and capabilities.
Frontier Post adds a number of custom capabilities, that is used to control the behavior and also distinguish on what different profiles can do.
Capabilities are shared between WordPress standard and plugins, and one has to be very careful on how this is managed in a plugin. Capabilities are added or removed from a profile by using the functions add_cap() & remove_cap() – ex: add_cap(‘author’, ‘frontier_post_can_add’)
Frontier Post stores each profiles frontier post capabilities in WordPress options, and add/remove Frontier Post capabilities based on the options value. This is done on save of the settings panel and on plugin activation. On plugin activation the capabilities are set based on default values if no previous frontier post capabilities are set.
In standard WordPress Contributors & Subscribers are not allowed to publish posts, here I have taken the freedom to allow this if user has the the correct Frontier Post capabilities. Reason why Contributors & Subscribers cant upload media is that they don’t have the standard WordPress capability “upload_files” – This capability is checked in the media upload application. This is in fact why there is an option to add a user role “Frontend Author” in Frontier Post – This way administrators can separate users that only is supposed to post through the frontend.
When I enabled capabilities to be managed externally, I asked the author of User Role Editor how the best way would be for users in User Role Editor to assign Frontier Post capabilities. He told me that if I added all Frontier Post capabilities to Administrator role, they would be accessible in User Role Editor, and so I did š
* When Manage Capabilities Externally(advanced setting) is enabled, Frontier Post does not update Frontier Post capabilities, but they will be removed on uninstall – But only on profiles, not on users, as this is not WordPress standard (Different plugins can have different ways of managing capabilities on single users).
Frontier Post Capabilities:
Name | Capability | Description |
---|---|---|
Can Add | frontier_post_can_add | The profile can add a post * |
Can Edit | frontier_post_can_edit | The profile can edit a post provided that the post* is within the boundaries of age and comment settings. Users can only edit their own posts, unless they have the standard WordPress capability edit_others_posts (Admin & Editor) |
Can Delete | frontier_post_can_delete | The profile can deleteĀ a post provided that the post* is within the boundaries of age and comment settings. Users can only deleteĀ their own posts, unless they have the standard WordPress capability delete_others_posts (Admin & Editor) |
Can Publish | frontier_post_can_publish | The profile can publish posts * (Set post status to Published) |
Ā Can Drafts | frontier_post_can_draft | The profile can set post status to Draft |
Can Pending | frontier_post_can_pending | The profile can set post status to Pending Review (available from version 3.1.0) |
Private Posts | frontier_post_can_private | The profile can set post status to Private |
Frontier Edit | frontier_post_redir_edit | Teh profile can edit a post* by selecting the standard edit link. Instead of being redirected to the admin interface, the user will be redirected to the Frontier Post frontend interface. The availability of the edit link is Theme dependent. |
Show admin bar | frontier_post_show_admin_bar | If deselected the admin bar will be disabled for this profile. |
Edit Excerpt | frontier_post_exerpt_edit | The excerpt will be open for edit on the post edit form. |
Edit Tags | frontier_post_tags_edit | The profile edit tags |
Media Upload | frontier_post_can_media | The profile can upload media (Add Media button is active). Please note profile also needs standard WordPress capability upload_files |
Can Pages | frontier_post_can_page | The profile can add/edit/delete pages with this capability in conjunction with the frontier_can_add,Ā frontier_can_edit &Ā frontier_can_delete. |
* a Post can be any post type (also page) that is allowed (advanced settings)
Comments
Frontier Post – Settings: Capabilities — No Comments
HTML tags allowed in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>