Posts Tagged ‘User Role’

activate_plugins WordPress capability

Saturday, November 26th, 2011

activate plugins

activate_plugins

What is 1st WordPress user permissions system capability if we sort such list in alphabet order? Yes, activate_plugins one. Information about it at WordPress Codex is very brief: “Allows access to Administration Panel options: Plugins”. But according its name this capability should allow at least activate plugins and may be something more. Where we can get right information about WordPress if not at WordPress’s core source code? I made little investigation and wish to share with you its results in this post.
Summary: activate_plugins capability on the top of the mountain really gives user access to “Plugins” and “Installed Plugins” menu items of WordPress admin back-end menu system and lets him activate/deactivate plugins one by one or applying bulk action to the set of selected plugins.
Let’s look together under the WordPress hood and see on examples of WordPress 3.3 core source code how it’s realized.
Read the rest of this entry

Lock s2Member roles during plugin update

Thursday, August 18th, 2011

Do not reset s2Member WordPress Plugin Roles

s2Member Roles

Data: You use s2Member WordPress plugin from PrimoThemes successfully.
For those who don’t know, this plugin supports powerful membership capabilities, protect members only content, integrates with PayPal, supports recurring billing, custom pages for registration, etc. It is a right tool if you wish to sell some of your blog content to your subscribers or just restrict access to some posts, pages or downloads.
Finally, you know s2Member and WordPress good enough to make your own changes to its user permissions systems. You edited one of S2member created user roles: “s2Member Level 1″, “s2Member Level 2″, “s2Member Level 3″ or “s2Member Level 4″ and you added some new capabilities to it. You can use User Role Editor WordPress plugin, which helps you make such changes very easy.
Problem: You lose all your custom changes to the s2Member user roles after every s2Member plugin update. What’s going wrong? What to do? Who can help?
Decision: Read this post to know how to leave your customized s2Member user roles unchanged.
Read the rest of this entry

Is unfiltered_html capability deprecated?

Saturday, February 19th, 2011

Is WordPress unfiltered_html capability deprecated

unfiltered_html

Eberle13 (“User Role Editor” plugin user) asked me a question, why ‘unfiltered_html’ user role capabiltiy does not work under WordPress multi-site? I found the reason and posted answer to the eberle13′s question at wordpress.org.
I curiously played with my test WordPress 3.1 Release Candidate 4 multi-site installation. This problem with using ‘unfiltered_html’ capability still exists in it. I decided to make special post about that as it could be interesting someone else. I tried to insert mordern HTML5 tag ‘<video>’ into post without success – it was removed by WordPress every time I saved the post changes inspite of I made that under account with ‘Editor’ role privileges. ‘Editor’ role has ‘unfiltered_html’ capability turned on by default. What is the reason? Why this capability failed to work?
Read the rest of this entry

Custom User Roles and WordPress Core Code Compatibility Issues

Tuesday, September 14th, 2010

Custom User Roles

Custom User Roles

WordPress has good built-in users level/capabilities/roles system. Standard roles are administrator, editor, author, contributor, subscriber. This roles set is enough in the most cases for the most needs. But from time to time you need something special, something yours only. In such cases you can use User Role Editor WordPress plugin and build your own custom user role. But you should do it carefully and make thorough testing for new created user role as:

  • 1st, you could create some breaches in WordPress security system;
  • 2nd, you can loose some useful WordPress functionality.

One example of lost WordPress functionality for custom user role is described here:

Read the rest of this entry

How to block WordPress admin menu item

Friday, April 23rd, 2010

Remove Admin Menu Item

Remove Admin Menu Item

Suppose you don’t wish your blog registered users see some menu items in WordPress admin back-end and it is not the user role capabilities management subject. That is no such capability exists which you can use. For example, if you need to block just user profile editor and nothing more. It can be useful if you wish to allow for the group of volunteers to use the only user budget for all of them to make some task at your blog. In this case it is important that no one from that users group can edit user password and other user profile details. So you should to block WordPress admin menu items and URLs related to the user profile editor execution.
I will show you how to make it in this post. We just add a little piece of code to your theme functions.php file. Let’s go.
Read the rest of this entry

How to change WordPress MU User Role capabilities

Saturday, February 13th, 2010

User roles WordPress MU

User roles WordPress MU

From the post How to change WordPress User Role capabilities we know already how to make it for the ordinal not multi-user (MU) WordPress. It this post I will show you how to change the user role capabilities for the WordPress MU platform.
As you know WPMU lets to have multiple blogs under single WordPress installation. Blog list is stored in the wp_blogs database table. We will use blog ID attribute (blog_id field value) from this table. WPMU stores every blog data in the separate database tables set. Every blog data set differs with its blog ID in the name of the database tables, e.g. blog with ID=1 has wp_1_options table, blog with ID=2 has wp_2_options table, etc. So, to get the blog id=1 user roles capabilities from the database we can use this SQL query
Read the rest of this entry