Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




Role Scoper and custom post types

UserPost

8:28 pm
July 12, 2010


monkeyangst

Member

posts 4

1

I have been playing with various role-limiting plugins, and I find Role Scoper to be the most complete. For current versions of my webcomic plugin, I recommend using Role Scoper to limit access (for example, if you wish to have some posts visible only to paying members).

I'm very excited about WordPress 3.0's support for custom post types. In the upcoming version of my plugin, a comic will no longer be a post in a certain category, but will be a post with the "comic" type. Finally! However, I'm beating my head against a wall trying to get Role Scoper to work…

I've found the Realms tab. I've checked the box for "comics." I've even jiggered the activation hook for my custom post type so that it loads before Role Scoper does, so that box stays checked.

So I go to the newly-visible "Comics" item under Roles, and I see that there are no roles defined and no visible means of doing so. OK, that may be fine. To be honest, I find that part confusing. But the upshot is that my Add New page for my custom post type lacks the Role Scoper meta box. I'm sure the two are tied together, but I cannot figure out how.

Any assistance would be greatly appreciated.

Brad

9:14 pm
July 12, 2010


Kevin

Admin

posts 2502

2

I'm also excited about custom post types and plan to thoroughly support them.

Role Scoper 1.2.7 has custom post types support roughed in at a low level, but in practice it does not integrate with them as completely as Post / Page roles. I've been working on this for several days and plan to put out a 1.3 beta soon with much better Custom Types / Taxonomies support.

Meanwhile, one thing you can do to make 1.2.7 work as well as possible is make sure the code which is registering your custom types and taxonomies does so very early:

add_action( 'init', 'my_registration_function', 1 );

The default add_action priority timing is 10, which would cause your type/taxonomy to be registered after Role Scoper has already assembled its configuration data.

9:33 pm
July 12, 2010


monkeyangst

Member

posts 4

3

Cool, thanks. I saw your post on another forum about setting that priority… I did that, and now at least the checkbox for my custom type stays checked. So that worked. Now I just gotta get it to put the RS metabox on my Add New Comic page.

6:53 am
July 13, 2010


Kevin

Admin

posts 2502

4

Okay, I just pushed a 1.2.8.beta up to wordpress.org. It should fix your role metabox non-display. There may still be other glitches with custom post types in that code base. Let me know if any of them are killers and maybe I can backport more code from my version 1.3 development. In general, I've found that with custom post types here to stay, requiring WP 3.0 is my only sane approach to manageable code. So RS 1.3 will introduce that requirement along with code that's optimized for it.

11:45 pm
March 30, 2011


amy001

Member

posts 5

5

Post Awaiting Approval by Forum Administrator


About the Agapetry forum

Currently Online:

11 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