Skip to content

Commit

Permalink
Merge pull request #65 from jjgrainger/release/v2.1
Browse files Browse the repository at this point in the history
Release v2.1
  • Loading branch information
jjgrainger authored Apr 12, 2020
2 parents eeed182 + e0fd0f8 commit a875846
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 8 deletions.
10 changes: 10 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

##### v2.1
* merge [pull reqeuest #45](https://github.com/jjgrainger/PostTypes/pull/45): add PHP 7.2 Compatibility
* merge [pull reqeuest #46](https://github.com/jjgrainger/PostTypes/pull/46): Make sure the "orderby" query var is a string when sorting by columns.
* merge [pull reqeuest #55](https://github.com/jjgrainger/PostTypes/pull/55): Fix column mismatch broken sort
* merge [pull reqeuest #56](https://github.com/jjgrainger/PostTypes/pull/56): Grammar mistakes corrected
* merge [pull reqeuest #61](https://github.com/jjgrainger/PostTypes/pull/61): Fix incorrect property types
* merge [pull reqeuest #62](https://github.com/jjgrainger/PostTypes/pull/62): Allow for multiple taxonomies and post types to be added
* merge [pull reqeuest #63](https://github.com/jjgrainger/PostTypes/pull/63): Update Taxonomy columns documentation
* merge [pull reqeuest #64](https://github.com/jjgrainger/PostTypes/pull/64): Update minimum PHP version, phpunit and phpcs

##### v2.0.1
* merge [pull reqeuest #19](https://github.com/jjgrainger/PostTypes/pull/19): Use wp_dropdown_categories function for post filtering selectbox
* update minimum php version to 5.6
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PostTypes v2.0.1
# PostTypes v2.1

[![Build Status](https://flat.badgen.net/travis/jjgrainger/PostTypes?label=build)](https://travis-ci.org/jjgrainger/PostTypes) [![Latest Stable Version](https://flat.badgen.net/github/release/jjgrainger/PostTypes/stable)](https://packagist.org/packages/jjgrainger/posttypes) [![Total Downloads](https://flat.badgen.net/packagist/dt/jjgrainger/PostTypes)](https://packagist.org/packages/jjgrainger/posttypes) [![License](https://flat.badgen.net/github/license/jjgrainger/PostTypes)](https://packagist.org/packages/jjgrainger/posttypes)

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jjgrainger/posttypes",
"version": "2.0.1",
"version": "2.1",
"description": "Simple WordPress custom post types.",
"homepage": "https://github.com/jjgrainger/posttype",
"license": "MIT",
Expand Down
24 changes: 19 additions & 5 deletions docs/Getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Requirements

* PHP >=5.6
* PHP >=7.2
* [Composer](https://getcomposer.org/)
* [WordPress](https://wordpress.org) >=3.8
* [WordPress](https://wordpress.org) >=5.1

## Installation

Expand All @@ -16,14 +16,14 @@ Run the following in your terminal to install PostTypes with [Composer](https://
$ composer require jjgrainger/posttypes
```

PostTypes uses [PSR-4](https://www.php-fig.org/psr/psr-4/) autoloading and can be used with Composer's autoloader. Below is a basic example of getting started, though your setup may be different depending on how you are using Composer.
PostTypes uses [PSR-4](https://www.php-fig.org/psr/psr-4/) autoloading and can be used with the Composer's 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';

use PostTypes\PostType;

$books = new PostType( 'book' );
$books = new PostType('book');

$books->register();
```
Expand All @@ -32,7 +32,7 @@ See Composer's [basic usage](https://getcomposer.org/doc/01-basic-usage.md#autol

## Basic Usage

Below is a basic example of setting up a simple book post type.
Below is a basic example of setting up a simple book post type with a genre taxonomy.

```php
// Require the Composer autoloader.
Expand All @@ -44,6 +44,9 @@ use PostTypes\PostType;
// Create a book post type.
$books = new PostType( 'book' );

// Attach the genre taxonomy (which is created below).
$books->taxonomy( 'genre' );

// Hide the date and author columns.
$books->columns()->hide( [ 'date', 'author' ] );

Expand All @@ -52,4 +55,15 @@ $books->icon( 'dashicons-book-alt' );

// Register the post type to WordPress.
$books->register();

// Create a genre taxonomy.
$genres = new Taxonomy( 'genre' );

// Set options for the taxonomy.
$genres->options( [
'hierarchical' => false,
] );

// Register the taxonomy to WordPress.
$genres->register();
```
2 changes: 1 addition & 1 deletion docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Table of Contents

* [PostTypes v2.0.1](../README.md)
* [PostTypes v2.1](../README.md)
* [Getting Started](Getting-started.md)
* [PostTypes](post-types/README.md)
* [Create a Post Type](post-types/Create-a-post-type.md)
Expand Down

0 comments on commit a875846

Please sign in to comment.