latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Can one Mass Edit ccaps to many pages

Home Forums Community Forum Can one Mass Edit ccaps to many pages

Tagged: , ,

This topic contains 7 replies, has 3 voices. Last updated by  Cristián Lávaque 4 years, 4 months ago.

Topic Author Topic
Posted: Sunday Aug 19th, 2012 at 1:59 am #22474

I just realized the need t oadd a ccap to all 200 of my pages….tell me there is an easier way thenmanually editing each pag e- if not what a feature request

List Of Topic Replies

Viewing 7 replies - 1 through 7 (of 7 total)
Author Replies
Author Replies
Posted: Sunday Aug 19th, 2012 at 8:36 am #22493

Hi Jason.

No, there isn’t an interface to do that in bulk yet. Request noted.

You could create a simple hack that adds a ccap check for all your pages. Watch the ccaps videos, in the second half of the 2nd video in the playlist, Jason goes into an example that may help you. Video » s2Member (Custom Capabilities)

I hope it helps. :)

Posted: Friday Aug 31st, 2012 at 1:57 pm #23731

i would like to try this but it may be a few days or week don’t close this forum…

ccaps on thousands of members…hate typing manually when living in this day and age.

Posted: Sunday Sep 2nd, 2012 at 2:16 am #23821

The forum closes old threads automatically. If you find this one closed by the time you come back, just start a new one and link to this one. :)

Posted: Sunday Sep 2nd, 2012 at 9:29 am #23849

ccaps to mass pages and mass members is definitely a feature need to anyone who wants to transition many sites with many members I would guess..

Posted: Monday Sep 3rd, 2012 at 3:01 am #23904
Staff Member
Thanks for the heads up on this thread.

Regarding mass changes to Custom Capability Restrictions specified for particular Posts/Pages…

Thanks for the feature request.

For now, if you’d like to accomplish this, the following code snippet might be useful.

<?php
$post_id = 123;
$ccaps = array('music','videos');
update_post_meta ($post_id, 's2member_ccaps_req', $ccaps);
&#91;/hilite&#93;

You might combine this snippet with a loop that assigns Custom Capability Restrictions to many different Posts/Pages. This WordPress function might assist you with that part. See: http://codex.wordpress.org/Template_Tags/get_posts

<h4>Regarding mass updates to Custom Capabilities assigned to certain members...</h4>
This is already possible with s2Member Pro, using the Import/Export panel. It's possible to import new users/members. However, it's also possible to perform mass updates to existing users/members, including the ability to update Custom Capabilities.

Please see: Dashboard -› s2Member® -› Import/Export -› User/Member Importation
Posted: Monday Sep 3rd, 2012 at 4:35 pm #23961

I have s2 members pro – so i can mass update users that is great – i have 5 different types of users in 2000 members, so that maks it easy – just update 200 at a time with their ccaps…

can you elaborate on the code snippet a bit more – i am a php newbie (although manually updating 200 pages is not as bad as manually updating 2000 users) ;)

making both pages and users a bulk edit interface might be great – there are already plugins that allow quicker edits in pages list in wordpress, just not ccaps, for users there are plugins that allow you to mass edit roles I think….again just not ccaps…might want to partner up with of those guys…then i could just cjeckl all users and bulk enter ccaps, or pages……..

I wish I was doing this 1 year from now when all my ideas were already implemented :)

Posted: Tuesday Sep 4th, 2012 at 5:51 am #24015

Well, this article may help: Knowledge Base » Changing Roles/Capabilities via PHP

And about another plugin to edit the capabilities/roles in bulk, you may want to request that from the developer of the User Role Editor, he has a great plugin there, but I don’t remember bulk editing. http://wordpress.org/extend/plugins/user-role-editor/

I hope it helps. :)

Viewing 7 replies - 1 through 7 (of 7 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.