Comments (3)
Hey @noelforte, thanks for the suggestion. If I understand correctly, you want more fine-grained control over user capabilities with Snowball articles. Someone who can edit regular posts, you might not want to be able to edit Snowball articles...
And by defining capabilities
when registering the Snowball custom post type, you're able to use the Members plugin to get this fine-grained control over the capabilities that different roles get?
How about if we just added the capabilities
array like you did? This would provide a hook for organizations to use with Members plugin or similar, without overreaching and defining our own roles that users may not want.
from snowball.
Hi @thomaspark, that would probably work.
Here's what I used as a reference: https://codex.wordpress.org/Function_Reference/register_post_type#capability_type and https://codex.wordpress.org/Function_Reference/register_post_type#capabilities
Of course, like I said, you'd also need to bind them to at least one of the default roles, as once you add the capabilities any roles needing access to the snowball type will need to have those capabilities set, so that the plugin can function out of the box. See: https://codex.wordpress.org/Function_Reference/add_cap
from snowball.
Hey @noelforte, I've added custom capabilities and assigned them to default roles as you suggested. These changes are committed to develop
branch and will be included in the next release.
If you have the chance, please check out the changes in commit af7cb71 and test them on your end. Hopefully this eliminates the need for you to modify each new release. Thanks for the suggestion.
from snowball.
Related Issues (20)
- HTML/CSS not editable HOT 2
- Last paragraph in text module not being parsed as a paragraph HOT 1
- Could not insert image from media library HOT 1
- Timeline module HOT 2
- Document module
- Word cloud module
- Lead module
- Call to a member function add_cap() on a non-object HOT 1
- Snowball Articles Not Appearing in Feeds or Front Page HOT 1
- Limit modules by user role
- Snowball not work image slider in my Newspaper 7 theme HOT 5
- Snowball add next version idea cars function. HOT 3
- Visual editor support for text module
- Collapsable blocks for better navigation and reordering
- Rework table of contents module
- Visual Compressor dont show snowball post? HOT 6
- Stop logging HOT 5
- How to remove/change snowball permalink HOT 2
- Newbie: Video block not available HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snowball.