Code tidy

Tidy up of code standards, documentation, reduced cyclomatic complexity, and other miscellaneous bits.

Addition of filters for both taxonomy args, but no functionality changes otherwise.
Merge pull request #12 from GaryJones/patch-1

Code tidy
Version bump to 0.6.
Merge pull request #14 from GaryJones/master

Create README.md
Issue #11.  Add body classes for custom taxonomy terms.
Re-work taxonomy term body classes.

Simplifies the functions down from three to one. Here, we re-specify the names of the taxonomies, but a future refactor should be able to pull these out into a class property that can be used in multiple methods (including registration).

Use of get_the_ID() instead of global $post; $post->ID.

Better error checking for what get_the_terms() can return, in case someone has unregistered the two taxonomies.

Use of sanitize_html_class() to ensure term values are appropriately sanitized for output.

Use of taxonomy (with underscore replaced with hyphen per code standards for class names) as prefix for the term class, so that there's far less possibility of a term clashing with existing body classes. e.g. a portfolio might be tagged with "full-width", but without a prefix, this might confuse the theme into thinking that the single page should be displayed full width. With this change, the class becomes "portfolio-tag-full-width".

Use of single instance of aray_unique() to remove any duplicates once the classes have been added, instead of a check for in_array() for each and every term for both taxonomies.

See #11.
Merge pull request #15 from GaryJones/feature/body-classes

Re-work taxonomy term body classes.
Add not_found label to portfolio tag taxonomy.

This label, added in WP 3.6, is the text displayed via clicking 'Choose from the most used tags' in the taxonomy meta box when no terms are available. This string isn't used on hierarchical taxonomies, but I've included it anyway for parity between the taxonomies label arrays, the same as parent_item is included for both taxonomies.

I've also rearranged the label arrays into a slightly more logical order:

 * Names
 * Strings with singular references (uppercase)
 * Strings with plural references (uppercase)
 * Strings with plural references (lowercase)
Make the code a little more DRY.

Pulls the array of taxonomy slugs out of a couple of methods into its own method. Sticks with the order of category before tag. Not only is this alphabetical, but it's the same order as Post taxonomies are displayed in the admin menu. As such, the order within portfolio_init() has been changed as well. While functionally the same, someone using muscle memory might click on the wrong link by mistake. Since the correct action is one step away, and it brings the Portfolio and Post taxonomies into parity, I don't consider this a reason to not go ahead with this.

The only related step to this not done (as it would almost certainly conflict with #17) is to re-order the taxonomy registration functions so that the category one came before the taxonomy one.

In add_thumbnail_column(), there's no need to assign a value to a variable then return the variable - just return the value instead.

The add_portfolio_counts() method has been refactored to pull out two smaller helper functions to reduce the obvious duplication between showing number and label for published portfolio items and showing number and label for pending portfolio items. It would be possible to refactor it further into one function that handles this setup and display, but that can be done on a second round.

Finally, the plugin_dir_url( __FILE__ ) isn't going to change, so instead of calling it twice, call it once, assign to a variable, and use that variable twice instead.
Revert re-ordering of functions as that will clash with #17
Merge pull request #17 from GaryJones/feature/labels

Add not_found label to portfolio tag taxonomy.
Merge pull request #18 from GaryJones/feature/dry

Make the code a little more DRY
Update readme.txt with latest updates.
Generate new .pot file for translations.
Improve the loading of a textdomain.

By moving the loading of a text domain into a method, we can expand it a bit to look in the WP_LANG_DIR first for a set of translation files (this is where developers should put their own translation files, if they don't want them wiped out during a plugin update) before falling back to looking in the plugin /languages directory.

I've also included a call to this textdomain loading method within the plugin activation method, to try and ensure that strings are translatable during activation too, and not just on subsequent page reloads.
Remove redundant trailing slash from load_plugin_textdomain path
Merge pull request #20 from GaryJones/feature/load-textdomain

Improve the loading of a textdomain.
Fix function call for text domain on plugin activation.
Fix notices on 404 page.  Check for is_single() with body classes.
Re-organise plugin class file.

Classes should be in their own file, with no other side-effects being made by including that file (i.e. a class being instantiated). This commit moves the class file out of the main plugin file, but leaves a reference to the plugin activation hook callback.

It also renames the constructor method to run(), so that a class can be instantiated, without having any side-effects, such as when unit testing.