Post status for roles
Viewing 2 Posts - 1 through 2 (of 2 total)
Author | Posts |
---|---|
March 20, 2014 at 5:21 pm 16980 | |
Hi, small question - I'd like to have a possibility to allow users with certain roles to publish their posts without "pending" status. I mean, for example, user with role "Subscriber" is able to create a new post, but this post will have "pending" status, and then somebody from administration must approve it. And user with role "Author" also is able to create post, but his post must have status "published" at once. Is this possible? | |
March 20, 2014 at 6:11 pm 16983 | |
Yes, possible. Try this: [php] $user = wp_get_current_user(); if ( $role == ‘author’ ) { return $postarr; add_filter( ‘wpuf_add_post_args’, ‘dlp_wpuf_editor_post_status’ ); Insert this snippet to your themes functions.php | |
March 20, 2014 at 7:11 pm 16988 | |
It works! 🙂 thanks! |
Viewing 2 Posts - 1 through 2 (of 2 total)