From 9daf4e955e92e0451e4a073cbfab6a421e217443 Mon Sep 17 00:00:00 2001 From: Bruno FG Date: Tue, 26 Dec 2023 18:22:53 +1100 Subject: [PATCH] Update readme and phpcs.xml.dist --- README.md | 40 ++++++++++++++++++++++++++++------------ phpcs.xml.dist | 2 +- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index f09d6ff..e40cc6f 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,47 @@ -# Custom Post Types and Taxonomies (Custom PTT) Plugin +# Custom Post Types and Taxonomies (Custom PTT) -The Custom PTT plugin is a powerful tool for extending the functionality of WordPress by creating Custom Taxonomies and Custom Post Types. +The Custom PTT plugin is a simple yet efficient WordPress Plugin to extending the functionality of WordPress by creating Custom Taxonomies and Custom Post Types. ![Unit Tests](https://github.com/freibergergarcia/custom-post-types-taxonomies/actions/workflows/run-phpunit.yml/badge.svg) ![PHP Code Sniffer](https://github.com/freibergergarcia/custom-post-types-taxonomies/actions/workflows/run-phpcs.yml/badge.svg) -[See the code coverage report](https://freibergergarcia.github.io/custom-post-types-taxonomies/html/) - ## Why Custom PTT? -Custom PTT is designed to provide developers with a simple and efficient way to extend the built-in functionality of WordPress. With Custom PTT, you can create your own taxonomies and post types, allowing for greater flexibility and control over your content. +Custom PTT is designed to provide developers with a simple and efficient way to extend the built-in functionality of WordPress. ## Features -- Easy creation of Custom Taxonomies. -- Simple interface for generating Custom Post Types. +Once the plugin is activate, there is no need to generate any code for you to put in your `theme` or `plugin`. +We register the Custom Post Types and Custom Taxonomies for you. + +- Easily add Custom Taxonomies +- Easily add Custom Post Types +- Extend with a built-in filter in case you would like to modify the default arguments + +`custom_ptt_taxonomy_args` filter is available to modify the default arguments used when registering a taxonomy. +```php +/** + * Filters the arguments used when registering a taxonomy. + * + * @param array $args The arguments used when registering a taxonomy. + * @param string $taxonomy_slug The taxonomy slug. + * @param array $taxonomy_data The taxonomy data. + * @since 0.1.0-alpha + */ + $args = apply_filters( 'custom_ptt_taxonomy_args', $args, $taxonomy_slug, $taxonomy_data ); +``` ## Installation - -## Usage - - +Composer install is suficient +``` +composer install +``` ## Contributing - +Anyone is welcome to contribute to Custom PTT. Please follow our guidelines, which are specified on the [phpcs.xml.dist](phpcs.xml.dist) file. +PR's should be raised to the `develop` branch. ## License diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 1575957..5d38d4c 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -4,7 +4,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd" > - Custom ruleset for Custom PTT functionalities + Custom ruleset for Custom PTT vendor/*