In the past, I have put together a method for making the link in the admin notification email a single click process for activating users. But what if you want users to be sent an activation link to confirm their account and activate themselves? This code snippet will provide a framework for you to do that. [Read more…]
This is an extension of the ideas presented in the tutorial Restrict Content by Role with the twist that this version makes some minor changes to incorporate an HTML multi-select for selecting multiple roles for access to content.
The differences between these two code snippets is minimal, so I won’t actually repeat the concept in this post. But you should read the original version to get an understanding of what is being done and how it works. This post will just highlight what’s different. [Read more…]
This is a new method of blocking custom post types. There are two main differences over the method described here and the original method I described here.
First, this method is a little more scalable. If you have multiple custom post types and want to set a blocking value for each, you only need to add to the settings array. Second, this method allows you to override the blocking value on an individual custom post type post than you have set for the custom post type as a group. This operates the same as regular posts and pages.
In the past, I have put up posts about restricting content to a created user “level,” restricting content to a specific user, etc. Interestingly, we have not yet touched on the subject of restricting content by user role.
The method used here is very similar to what was done to restrict a post or a page to a specific user. In fact, that code was my starting point – it really took some minor changes. So I’ll primarily focus on what is different.