=== Category Access ===
Tags: categories, users
Contributors: coppit

This Wordpress plugin provides category protection on a user-by-user basis.
Posts in a protected category will not be visible unless the user has
privileges to view that category.

If a person selects categories that they do not have access to when editing or
writing a post, these categories are removed. If no categories remain, the
post is put into the uncategorized category and not published.

The latest version can be found at http://www.coppit.org/code/

== Installation ==

1. Upload the 'category-access' folder to your plugins folder, usually
   'wp-content/plugins/'
2. Activate the plugin on the plugin screen
3. By default, all categories will be hidden. Go to the "Category Access" page
   in options to change these.
4. To set category access on a user-by-user basis, edit the user's
   profile.

-> Post Navigation Links

Unfortunately, WordPress 2.0 doesn't provide good hooks for plugin authors to
modify the previous post and next post links. Even the capabilities they
provide are buggy. :( Hopefully both of these will be fixed in the future.

In the meantime, if you want to have correct previous/next post links, you will
need to edit your theme files, editing every call to next_post_link and
previous_post_link to call the category access versions if the plugin is
installed. For example:

	next_post_link('%link &raquo;')

becomes:

	function_exists('category_access::next_post_link') ?
		category_access::next_post_link('%link &raquo;') :
		next_post_link('%link &raquo;')

NOTE: This will cause your theme to call Category Access' versions of the
functions, which both fix the bugs in WordPress, and also excludes posts for
hidden categories. If you ever uninstall or deactivate this plugin, your theme
should fall back to use the normal functions.

-> Comments RSS

Unfortunately, WordPress 2.0 doesn't provide any hooks for filtering comments
in RSS feeds. As a result, comments for hidden posts will be shown in the RSS
feed. You will need to modify the WordPress code if you want to hide comments
on protected posts.

Edit the file wp-commentsrss2.php, and change:

        get_post_custom($comment->comment_post_ID);

to:

        get_post_custom($comment->comment_post_ID);

        if (function_exists('category_access::post_should_be_hidden') &&
            category_access::post_should_be_hidden($comment->comment_post_ID))
          continue;

== Known bugs ==

- Shows the next page link even if all the articles have been hidden
- Haven't fully tested it for calendars and whatnot.
- Number of posts next to the monthly archives isn't adjusted for the hidden
  posts. (See http://wordpress.org/support/topic/48412#post-266674)

== License ==

This code is distributed under the terms of the GPL.

== Credits ==

The primary author is David Coppit <http://www.coppit.org>.

This module was originally based on the viewlevel plugin by Kendra Burbank
http://www.furbona.org/viewlevel.html
