Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




only edit certain custom post types

UserPost

10:13 pm
June 27, 2011


Mr Papa

Member

posts 13

1

Hey, Mr Papa from Simple:Press here - glad to see you using our plugin!

not sure if I am doing something wrong, but we have defined a series of custom post types. I want to allow users to only edit certain custom post types.  And not be able to edit posts or pages.

I can only seem to get the ability to edit posts and all custom post types or none. I am using the capability manager (capsman) and we have defined new capabilities for editing, publishing, etc the custom post types we want users to have access to.  they are all checked for the revisor role.

If I only check the custom post types I want and have posts turned off, I get nothing available for users to edit.  If I turn on the posts, I get posts and all custom post types (I only want to grant cap to some of the custom post types), regardless of what the caps are actually set to for the custom post types.  This is independent of the revisionary option for including custom post types.

How can I make it such that only the desired custom post types can be edited?

Thanks!

10:28 pm
June 27, 2011


Kevin

Admin

posts 2502

2

Mr Papa said:

Hey, Mr Papa from Simple:Press here - glad to see you using our plugin!

Likewise! As I recall, I even donated in honor of my 1000th support post

Are you sure your register_post_type() call is successfully setting capabilities? It sounds like the default post capabilities are still being required.

10:34 pm
June 27, 2011


Mr Papa

Member

posts 13

3

think so…  took the easy way out and using the Custom Post Type UI pluign which does not those capabilities…  but have the Map Cap plugin which allows them to be created… sort of ;)

before revisionary, they all work fine, except edits are not moderated. they just get published.  I am hoping your pluging would add in the moderation/review of the edited custom post types.

but they might all be getting in the way of each other…  I just went back and made sure and resaved the custom post type in the ui with the post type itself…  and now the edits are just saved.. but noticed a check box for save as pending revision I hadnt noticed before…

10:38 pm
June 27, 2011


Kevin

Admin

posts 2502

4

Since you're manually adding caps to the Revisor role, be sure to disable this option:

Settings > Revisionary > Role Definition > "Include capabilities for all custom post types in the WordPress Revisor role"

10:38 pm
June 27, 2011


Mr Papa

Member

posts 13

5

ah thanks for that!  didnt match the name to some one from the support site - sorry!

10:39 pm
June 27, 2011


Mr Papa

Member

posts 13

6

yes, I have that disabled.

10:45 pm
June 27, 2011


Mr Papa

Member

posts 13

7

well, it seems live revisionary is the one putting the checkbox on the edit custom post type panel… its not their if I temp deactivate it…

so what I really want is that check boxed check with no way for users to uncheck… :wink:

10:45 pm
June 27, 2011


Kevin

Admin

posts 2502

8

using Map Cap 2.0 and WP 3.1.3?

10:45 pm
June 27, 2011


Mr Papa

Member

posts 13

9

yes.

10:46 pm
June 27, 2011


Mr Papa

Member

posts 13

10

probably should have just done the custom post types myself, but got lazy… :wink:

10:48 pm
June 27, 2011


Kevin

Admin

posts 2502

11

Mr Papa said:

well, it seems live revisionary is the one putting the checkbox on the edit custom post type panel… its not their if I temp deactivate it…

so what I really want is that check boxed check with no way for users to uncheck…


That sounds like the "edit_published_{post_type}" cap has gotten into your user's allcaps array. To enable a user to edit a published post with moderation, they should have edit_ and edit_others_, but not edit_published_.

10:49 pm
June 27, 2011


Mr Papa

Member

posts 13

12

yes, I have given them edit published…  guess I thought that made sense Embarassed

let me try turning that off…

10:55 pm
June 27, 2011


Mr Papa

Member

posts 13

13

doh! works great! operator error on my part - sorry… silly me didnt read enough on edit published… just assumed it meant edit an already published post… didnt realize it mean edit AND publish the edits…

thanks for the help!

When we get this all set up, gonna have to reciprocate that donation!

11:00 pm
June 27, 2011


Mr Papa

Member

posts 13

14

hey, ya know what would be nice?  a pending revision metabox on the dashboard…

11:03 pm
June 27, 2011


Kevin

Admin

posts 2502

15

Mr Papa said:

doh! works great! operator error on my part - sorry… silly me didnt read enough on edit published… just assumed it meant edit an already published post… didnt realize it mean edit AND publish the edits…

thanks for the help!

No problem. It is admittedly confusing, but WP only requires the "publish_posts" cap to change the status to published.

When we get this all set up, gonna have to reciprocate that donation!

Okay, but I wasn't fishing for that. And I just realized that in honor of my 2000th support post, you visited the forum… and dressed to impress as always.

11:05 pm
June 27, 2011


Mr Papa

Member

posts 13

16

lol. didnt realize I was 2000th!

I know you werent fishing!

11:07 pm
June 27, 2011


Kevin

Admin

posts 2502

17

Mr Papa said:

lol. didnt realize I was 2000th!

I know you werent fishing!

No, but close. My 2000th post would have been earlier today or yesterday.

11:08 pm
June 27, 2011


Mr Papa

Member

posts 13

18

cool.

did you see post #14? :wink:

sorry, couldnt resist!

11:11 pm
June 27, 2011


Kevin

Admin

posts 2502

19

Mr Papa said:

hey, ya know what would be nice?  a pending revision metabox on the dashboard…

I'll have to think about that tomorrow… off to bed!

Let me know if you have specific requests / suggestions for the contents and behavior of that metabox.

11:14 pm
June 27, 2011


Mr Papa

Member

posts 13

20

heading the same place myself…

as to the metabox, probably post title with link to review panel, date submitted, and user who made the change

ability to approve there would be nice, but might be bit much…

thanks for the help!


About the Agapetry forum

Currently Online:

14 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1244

Posts: 5649

Members:

There are 1254 members

There are 1 guests


Kevin has made 2502 posts

Top Posters:

metal450 - 178

Ragnar - 108

YikYak - 70

whiteorb - 49

Daisy - 35

Administrator: Kevin | Moderators: Kevin