sandywp / plugins / wp-access-areas

Access Areas for WordPress

4.5 out of 5 stars. 4.5 17 reviews

Fine tuning access to your posts.

Launch a sandbox with this plugin → No signup.
Ready in seconds.

v1.5.22 400+ installs WP 4.6+ PHP 5.6+

your-sandbox.sandywp.com/wp-admin
Access Areas for WordPress running inside a SandyWP sandbox

What you get inside

4 screens
  • Area Access Manager

  • User Editing

  • Post Access Control

  • Post Access Behaviour

About this plugin

WP Access Areas lets you fine-tune who may read, edit or comment on your Blog posts.
You can either restrict access to logged-in uses only, certain WordPress-Roles or even custom Access Areas.

Features

  • Define custom Access Areas and assign them to your blog-users
  • Restrict reading, editing and commenting permission to logged-in users, certain WordPress-Roles or Access Areas
  • define global access areas on a network
  • Supports bulk editing
  • German, Italian, Polish and Swedish localization (Huge Thankyou @ all translators!)

Known Issues

  • WordPress calendar Widget still shows dates where restricted posts have been created.
    When clicked on such a date a 404 will occur. There is an open WordPress Core ticket on that issue.
  • Taxonomy menus (e.g. Tags / Categories) also count restricted posts when the total number of posts in a taxonomy is ascertained.
    See this post for details.

Development

Please head over to the source code on Github.

Questions

Why can’t I protect media?

Because the plugin can only protect posts, which are database entries. A media also contains a
file stored on your servers file system. A file is normally just returned by the server, the
WordPress core is not involved. In order to protect a file, let’s say an image, the Image URL
would have to be point to a special Script, that decides whether the file is protected or not,
and if so, which user or group of users would be granted access.

A lot of processing would be going on, and each and every little thumbnail would add another
one or two seconds to your page load time. The result: Tears, rage and support requests.

What does it exactly do?

For each Post it stores a capabilty the user needs to have in order to view, edit or comment on a post.
By defining an Access Area you create nothing more than a custom capability.

Why didn’t you use post_meta to store permissions? WordPress already provides an API for this!

I did this mainly for performance reason. For detecting the reading-permission on specific content,
the plugin mainly affects the WHERE clause used to retrieve posts. In most cases, using post_meta
would mean to add lots of JOIN clauses to the database query, slowing down your site’s performance.

Does it mess up my database?

It makes changes to your database, but it won’t make a mess out of it. Upon install it does two things:
1. It creates a table named ´{$wp_prefix}_disclosure_userlabels´. The access areas you define are here.
2. It adds three columns to Your Posts tables: post_view_cap and post_comment_cap.

Upon uninstall these changes will be removed completely, as well as it will remove any custom generated
capability from your user’s profiles.

I’d like to do some more magic / science with it. And yes: I can code!

Developer documentation can be found in the project wiki.

I found a bug. Where should I post it?

Please do so in the GitHub Repository.

I found a bug and fixed it. How can I contribute?

Pull request are welcome in the GitHub Repository.

4.5

17 reviews

  • 5 ★ 14
  • 4 ★ 1
  • 3 ★ 0
  • 2 ★ 0
  • 1 ★ 2

Ratings come from WordPress.org. SandyWP does not collect its own reviews.

sandywp / also on the shelf

Try another plugin

  • Loginizer

    4.8 · 1M+ installs

    Loginizer is a WordPress security plugin which helps you fight against bruteforce attacks.

  • User Role Editor

    4.5 · 700K+ installs

    User Role Editor WordPress plugin makes user roles and capabilities changing easy. Edit/add/delete WordPress user roles and…

  • The best WordPress membership and user role editor plugin. User Roles & Capabilities editor helps you restrict content in…

Spin up a real WordPress site in seconds.

Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.