Git Product home page Git Product logo

Comments (3)

thomaspark avatar thomaspark commented on June 10, 2024

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.

noelforte avatar noelforte commented on June 10, 2024

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.

thomaspark avatar thomaspark commented on June 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.