# User based content restriction

First extension of the content restriction framework is up.

## User Roles based restriction

As announced in an earlier post I’ve developed a first extension to the theAverageDev Restricted Content plugin and pushed it to GitHub.
I’ve gone for a first walking skeleton to allow me some testing of the framework and am satisfied with the little amount of code required to do so.
The following paragraphs are taken from the readme file.

## Requirements

This plugin is an extension of the theAverageDev Restricted Content plugin and to render the content restriction meta box the plugin will use Custom Meta Boxes 2 so that’s another requirement.

## Installing

Download the .zip file and place it in the plugins folder, activate.

## Configuring

The plugin is meant for developers and does not come with a management UI users can use (beside the one for restricting the access). By default the plugin will apply user role based content restriction to posts and pages (post and page post types); to extend the plugin to more post types use the filter:

function myplugin_restricted_post_types(array $restricted_post_types){$restricted_post_types[] = 'custom_post_type_1';
$restricted_post_types[] = 'custom_post_type_2'; return$restricted_post_types;