From 86421249a1ca921741bceab68c97a8c74ea0d5b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armando=20L=C3=BCscher?= Date: Wed, 24 Oct 2018 14:26:37 +0200 Subject: [PATCH 1/2] Copy-paste fixes --- docs/taxonomies/Create-a-taxonomy.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/taxonomies/Create-a-taxonomy.md b/docs/taxonomies/Create-a-taxonomy.md index 5c5e5b9..2b5bc0e 100644 --- a/docs/taxonomies/Create-a-taxonomy.md +++ b/docs/taxonomies/Create-a-taxonomy.md @@ -37,10 +37,10 @@ The following names are accepted. | Key | Description | Example | | --- | --- | --- | -| `name` | is the post type name | *required*, singular, lowercase, underscores | -| `singular` | is the singular label for the post type | e.g 'Genre', 'Category' | -| `plural` | is the plural label for the post type | e.g 'Genres', 'Categories' | -| `slug` | is the post type slug used in the permalinks | plural, lowercase, hyphens | +| `name` | is the taxonomy name | *required*, singular, lowercase, underscores | +| `singular` | is the singular label for the taxonomy | e.g 'Genre', 'Category' | +| `plural` | is the plural label for the taxonomy | e.g 'Genres', 'Categories' | +| `slug` | is the taxonomy slug used in the permalinks | plural, lowercase, hyphens | #### Add options @@ -84,7 +84,7 @@ $genres = new Taxonomy('genres', $options, $labels); $genres->register(); ``` -Alternatively, you can use the `labels()` method to set the labels for the post type. +Alternatively, you can use the `labels()` method to set the labels for the taxonomy. ```php $genres = new Taxonomy('genre'); From 72371de8b9c7cf1374289732db0ad529f709afd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armando=20L=C3=BCscher?= Date: Thu, 25 Oct 2018 13:27:52 +0200 Subject: [PATCH 2/2] Fix typos and spelling mistakes --- CONTRIBUTING.md | 6 +++--- README.md | 2 +- docs/Getting-started.md | 2 +- docs/post-types/Columns.md | 6 +++--- docs/post-types/Create-a-post-type.md | 8 ++++---- docs/taxonomies/Create-a-taxonomy.md | 6 +++--- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0b5295d..d8098a7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,7 +26,7 @@ Please keep this in mind when contributing to the project. ## Create an Issue -If you would like to report a bug, feture request, documentation improvement or question please [create an issue](https://github.com/jjgrainger/PostTypes/issues/new). Before creating a new issue please check it has not already been raised by searching [issues](https://github.com/jjgrainger/PostTypes/issues) on GitHub. +If you would like to report a bug, feature request, documentation improvement or question please [create an issue](https://github.com/jjgrainger/PostTypes/issues/new). Before creating a new issue please check it has not already been raised by searching [issues](https://github.com/jjgrainger/PostTypes/issues) on GitHub. When creating an issue it is best to provide as much information as possible in order to help the discussion move quickly and efficiently. @@ -39,7 +39,7 @@ When creating an issue it is best to provide as much information as possible in ### 🐛 Bug Report -Bug reports highlight an an error or unexpected behaviour when using the code. In order to resolve the issue, enough detail must be provided in order to recreate the problem so it can be investigated and fixed. +Bug reports highlight an error or unexpected behaviour when using the code. In order to resolve the issue, enough detail must be provided in order to recreate the problem so it can be investigated and fixed. **Tips on creating bug reports:** @@ -57,7 +57,7 @@ Feature request suggest an idea for an improvement or additional functionality. * Provide a description of the change you want to make. * Highlight the problem it attempts to solve. * Offer examples of how it would be used. -* Provide links to WordPress documentation were relevant. +* Provide links to WordPress documentation where relevant. ### 📖 Documentation Improvements diff --git a/README.md b/README.md index a5109fd..63bf6e9 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Run the following in your terminal to install PostTypes with [Composer](https:// $ composer require jjgrainger/posttypes ``` -PostTypes uses [PSR-4](http://www.php-fig.org/psr/psr-4/) autoloading and cand be used with Composers autoloader. Below is a basic example of getting started, though your setup maybe different depending on how you are using Composer. +PostTypes uses [PSR-4](http://www.php-fig.org/psr/psr-4/) autoloading and can be used with Composers autoloader. Below is a basic example of getting started, though your setup may be different depending on how you are using Composer. ```php require __DIR__ . '/vendor/autoload.php'; diff --git a/docs/Getting-started.md b/docs/Getting-started.md index 420b9e6..90ddffc 100644 --- a/docs/Getting-started.md +++ b/docs/Getting-started.md @@ -16,7 +16,7 @@ Run the following in your terminal to install PostTypes with [Composer](https:// $ composer require jjgrainger/posttypes ``` -PostTypes uses [PSR-4](http://www.php-fig.org/psr/psr-4/) autoloading and cand be used with Composers autoloader. Below is a basic example of getting started, though your setup maybe different depending on how you are using Composer. +PostTypes uses [PSR-4](http://www.php-fig.org/psr/psr-4/) autoloading and can be used with Composers autoloader. Below is a basic example of getting started, though your setup may be different depending on how you are using Composer. ```php require __DIR__ . '/vendor/autoload.php'; diff --git a/docs/post-types/Columns.md b/docs/post-types/Columns.md index 8a96d34..fe9ff5b 100644 --- a/docs/post-types/Columns.md +++ b/docs/post-types/Columns.md @@ -37,7 +37,7 @@ $books->columns()->order([ #### Set Columns -To set all columns to display pass an array of the column slugs and labels to the `set()` method. This overides any other configuration set by the methods above. +To set all columns to display pass an array of the column slugs and labels to the `set()` method. This overrides any other configuration set by the methods above. ```php $books->columns()->set([ @@ -63,9 +63,9 @@ $books->columns()->populate('rating', function ($column, $post_id) { To define which custom columns are sortable use the `sortable()` method. This method accepts an array of column slugs and an array of sorting options. -The first option is the `meta_key` to sort the colums by. +The first option is the `meta_key` to sort the columns by. -The second option is how the items are orders, either numerically (`true`) or alphabetically (`false`) by default. +The second option is how the items are ordered, either numerically (`true`) or alphabetically (`false`) by default. ```php // will make both the price and rating columns sortable and ordered numerically diff --git a/docs/post-types/Create-a-post-type.md b/docs/post-types/Create-a-post-type.md index 90cbb15..490cc13 100644 --- a/docs/post-types/Create-a-post-type.md +++ b/docs/post-types/Create-a-post-type.md @@ -1,6 +1,6 @@ # Create a PostType -You can use PostTypes to create a new post type, or work with an [existing post type](#work-with-exisiting-posttypes). PostTypes can be included in your theme or plugins. +You can use PostTypes to create a new post type, or work with an [existing post type](#work-with-existing-posttypes). PostTypes can be included in your theme or plugins. ## Create a new PostType @@ -74,7 +74,7 @@ $books->options([ $books->register(); ``` -The options match the arguements passed to the `register_post_type()` WordPress function. All available options are on the [WordPress Codex](https://codex.wordpress.org/Function_Reference/register_post_type#Parameters) +The options match the arguments passed to the `register_post_type()` WordPress function. All available options are on the [WordPress Codex](https://codex.wordpress.org/Function_Reference/register_post_type#Parameters) ### Set labels @@ -105,9 +105,9 @@ $books->register(); All available labels are on the [WordPress Codex](https://codex.wordpress.org/Function_Reference/register_post_type#labels) -## Work with exisiting PostTypes +## Work with existing PostTypes -To work with exisiting post types pass the post type name into the comstructor. Be careful and avoid using global variables (e.g `$post`) which can lead to unwanted results. +To work with existing post types pass the post type name into the constructor. Be careful and avoid using global variables (e.g `$post`) which can lead to unwanted results. ```php // Create a PostType object for an existing post type in WordPress diff --git a/docs/taxonomies/Create-a-taxonomy.md b/docs/taxonomies/Create-a-taxonomy.md index 5c5e5b9..e6d6ee8 100644 --- a/docs/taxonomies/Create-a-taxonomy.md +++ b/docs/taxonomies/Create-a-taxonomy.md @@ -1,6 +1,6 @@ # Taxonomies -Taxonomies are created using the `Taxonomy` class. This works indetically to the `PostType` class and holds similar methods. +Taxonomies are created using the `Taxonomy` class. This works identically to the `PostType` class and holds similar methods. ## Create a new taxonomy @@ -68,7 +68,7 @@ $genres->options([ $genres->register(); ``` -The options match the arguements passed to the `register_taxonomy()` WordPress function. All available options are on the [WordPress Codex](https://codex.wordpress.org/Function_Reference/register_taxonomy#Arguments). +The options match the arguments passed to the `register_taxonomy()` WordPress function. All available options are on the [WordPress Codex](https://codex.wordpress.org/Function_Reference/register_taxonomy#Arguments). #### Add labels @@ -98,7 +98,7 @@ $genres->register(); All available labels are on the [WordPress Codex](https://codex.wordpress.org/Function_Reference/register_taxonomy) -## Work with exisiting Taxonomies +## Work with existing Taxonomies You can work with existing taxonomies by passing the taxonomy name to the Taxonoy constructor. Once you have made your changes you need to register them to WordPress using the `register()` method.