2017 © Pedro Peláez
 

library registry

A wp-kit component that handles Post Type and Taxonomy registration

image

wp-kit/registry

A wp-kit component that handles Post Type and Taxonomy registration

  • Wednesday, February 28, 2018
  • by terence1990
  • Repository
  • 1 Watchers
  • 1 Stars
  • 291 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 12 % Grown

The README.md

wp-kit/registry

This is a wp-kit component that handles PostType and Taxonomy registration., (*1)

This component was built to run within an Illuminate\Container\Container so is perfect for frameworks such as Themosis, Assely and wp-kit/theme., (*2)

wp-kit/registry is fully comptaible with Themosis and if you are using Themosis you'll notice it already has a PostTypeBuilder and a TaxonomyBuilder but wp-kit/registry just simplifies the process by providing an OOP approach to registering PostTypes and Taxonomies., (*3)

Installation

If you're using Themosis, install via Composer in the Themosis route folder, otherwise install in your Composer driven theme folder:, (*4)

composer require "wp-kit/registry"

Setup

Add Service Provider

Just register the service provider and facade in the providers config and theme config:, (*5)

//inside theme/resources/config/providers.config.php

return [
    //
    WPKit\Registry\RegistryServiceProvider::class,
    //
];

Add PRS4 Class Reference (Themosis Only)

Just add the following line to resources/config/loading.config.php in the Themosis theme folder:, (*6)

'Theme\\Taxonomies\\' => themosis_path('theme.resources').'taxonomies',
'Theme\\PostTypes\\' => themosis_path('theme.resources').'postTypes',

Add Config & View File

The recommended method of installing config files for wp-kit components is via wp kit vendor:publish command., (*7)

First, install WP CLI, and then install this component, wp kit vendor:publish will automatically be installed with wp-kit/utils, once installed you can run:, (*8)

wp kit vendor:publish, (*9)

For more information, please visit wp-kit/utils., (*10)

Alternatively, you can place the config file(s), post type file(s) and taxonomy file(s) in your theme/resources/config, theme/resources/postTypes and theme/resources/taxonomies directories manually., (*11)

Usage

Adding Classes

wp-kit\registry comes with two classes that can extended, WPKit\Registry\PostType and WPKit\Registry\Taxonomy., (*12)

Any custom PostTypes and Taxonomies should be added inside resources/shortcodes within the namespace Theme\PostType or Theme\Taxonomy., (*13)

Here is an example PostType class., (*14)

Here is an example Taxonomy class., (*15)

Get Involved

To learn more about how to use wp-kit check out the docs:, (*16)

View the Docs, (*17)

Any help is appreciated. The project is open-source and we encourage you to participate. You can contribute to the project in multiple ways by:, (*18)

  • Reporting a bug issue
  • Suggesting features
  • Sending a pull request with code fix or feature
  • Following the project on GitHub
  • Sharing the project around your community

For details about contributing to the framework, please check the contribution guide., (*19)

Requirements

Wordpress 4+, (*20)

PHP 5.6+, (*21)

License

wp-kit/registry is open-sourced software licensed under the MIT License., (*22)

The Versions

28/02 2018

dev-master

9999999-dev https://github.com/wp-kit/registry

A wp-kit component that handles Post Type and Taxonomy registration

  Sources   Download

MIT

The Requires

 

wordpress taxonomy oop themosis posttype wp-kit

28/02 2018

2.0.1

2.0.1.0 https://github.com/wp-kit/registry

A wp-kit component that handles Post Type and Taxonomy registration

  Sources   Download

MIT

The Requires

 

wordpress taxonomy oop themosis posttype wp-kit

18/09 2017

2.0.0

2.0.0.0 https://github.com/wp-kit/registry

A wp-kit component that handles Post Type and Taxonomy registration

  Sources   Download

MIT

The Requires

 

wordpress taxonomy oop themosis posttype wp-kit