Download the PHP package pinkcrab/registerables without Composer

On this page you can find all versions of the php package pinkcrab/registerables. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package registerables

Registerables

Latest Stable Version Total Downloads License PHP Version Require GitHub contributors GitHub issues

WP6.2 [PHP7.4-8.2] Tests WP6.3 [PHP7.4-8.2] Tests WP6.4 [PHP7.4-8.3] Tests WP6.5 [PHP7.4-8.3] Tests WP6.6 [PHP7.4-8.4] Tests WP6.7 [PHP7.4-8.4] Tests

codecov Scrutinizer Code Quality Maintainability

A collection of Abstract Classes for creating common WordPress fixtures which need registering.

For Perique V2.1.*

Why?

WordPress has a number of Registerable functions for Post Types, Post Meta and Taxonomies. These tend to require large arrays of arguments to be defined. This library provides Classes which can be registered and used with the Registration process.

Setup

You need to include the module and the Registerable_Middleware will be included automatically. They come with their own dependencies which will need to be added using the module() method from the App_Factory instance.

Once the middleware has been included, you can use Post_Type, Taxonomies, Meta Data and Meta boxes as part of the usual Registration process

Post Type

Creates a simple post type.

See full Post Type docs

Taxonomy

Creates a flat taxonomy for the Post Post Type.

See full Taxonomy Docs

Meta Box

Create a simple meta box as part of a post type definition.

If your meta box has any level of complexity, it is recommended to create a separate service which handles this and inject it into the Post_Type class.

See full Meta Box Docs

Shared Meta Boxes

In case you would like to render the same meta box on multiple Custom Post Types or to add it to existing ones, you can use the Shared_Meta_Box_Controller base class and extend it to register independent meta boxes.

Defining Meta Data

The above Meta Box would be shown on both acme_post_type_a and acme_post_type_b
You can also inject any dependencies via the constructor too.

MetaData

You can register post, term, user and comment meta fields either as a part of Post Types/Taxonomy Registerables or on there own. This fluent object based definition makes it easy to create these inline.

You can add full REST support by supplying a schema for the field and the Registrar will register the field also.

See full Meta Data Docs

You can also define MetaData for Taxonomies when creating them.

Additional_Meta_Data_Controller

To register standalone Meta_Data, you can use the Additional_Meta_Data_Controller which has a single method meta_data(array $meta_data): array. Like in the example above, you add your Meta_Data instances to the array and return.

The class has an empty constructor, so you can easily inject dependencies in and make use of the App_Config meta options.

Example

You can see an example project which included a CPT, Taxonomy, Meta Box and Meta Data here

Contributions

If you would like to contribute to this project, please feel free to fork and submit a PR. If any issue doesn't exist for the problem, please create one.

Please ensure your changes to do not drop coverage lower than they currently are, unless it can not be helped (include a reason why)

To run test suite

Setup the dev environment $ composer install

Please note the CI Actions runs composer all on multiple PHP and WP versions. Running locally will only run with your version of PHP and latest major or WP.

License

MIT License

http://www.opensource.org/licenses/mit-license.html

Previous Versions

Change Log


All versions of registerables with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0
pinkcrab/perique-framework-core Version 2.1.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pinkcrab/registerables contains the following files

Loading the files please wait ....