Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Roles #35

Open
j-gardner opened this issue Sep 14, 2015 · 1 comment
Open

Create Roles #35

j-gardner opened this issue Sep 14, 2015 · 1 comment

Comments

@j-gardner
Copy link
Contributor

Custom roles should be created to work with more advanced websites. Integration with https://wordpress.org/plugins/members/ is a logical extension of this work

@j-gardner j-gardner added this to the 1.7.0 milestone Oct 7, 2016
@j-gardner j-gardner self-assigned this Oct 7, 2016
@j-gardner
Copy link
Contributor Author

Good starting point from the WordPress Support forum:

https://wordpress.org/support/topic/required-minimum-user-level/#post-8263808

function my_faq_defaults( $defaults ) {
    $defaults['post_type']['args']['has_archive'] = true;
    $defaults['post_type']['args']['capability_type'] = array('faq','faqs');
    $defaults['post_type']['args']['capabilities'] = array(
           'publish_posts' => 'create_faqs',
           'edit_posts' => 'create_faqs',
           'edit_others_posts' => 'create_faqs',
           'delete_posts' => 'delete_faqs',
           'create_faqs' => 'create_faqs',
           'read_private_posts' => 'create_faqs',
           'edit_post' => 'create_faqs',
           'delete_post' => 'delete_faqs',
           'read_post' => 'create_faqs',
        );
    return $defaults;
}
add_filter( 'arconix_faq_defaults', 'my_faq_defaults' );

@j-gardner j-gardner removed this from the 1.7.0 milestone Feb 23, 2017
@j-gardner j-gardner removed their assignment Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant