Download the PHP package aurooba/cpt without Composer

On this page you can find all versions of the php package aurooba/cpt. 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 cpt

Packagist Downloads

Packagist PHP Version Support Packagist License

Custom Post Type and Taxonomies Generator

Quickly register custom post types and associated taxonomies with intelligent defaults in your WordPress projects.

For complete documentation of Custom Post Type registration, see https://developer.wordpress.org/reference/functions/register_post_type/

For complete documentation of Taxonomy registration, see https://developer.wordpress.org/reference/functions/register_taxonomy/

Minimum Requirements

Installation

The easiest way is to install this through Composer with:

Make sure you have composer autoload set up where you are adding the package.

For themes, in your functions.php file:

For plugins, in your main plugin file, near the top:

Usage

Don't see an option you use often and would love for it to be easier too? Open an issue or pop it into the Discussion area, let's make it happen. :)

Have a question about your specific use case? Ask in a support discussion.

Basic Usage

The class, by default, takes in just one parameter: a singular name, like resource. It's smart enough to convert resource into resources, country into countries, potato into potatoes, goose into geese, and handles some exceptions as well.

At this time, it is not smart enough to handle uncountable nouns such as rice, tea, knowledge, etc. This is a planned addition, coming later.

Customized Usage

Icons

The default icon, set up in the class is the screenoptions Dashicon, purely because I like it.

Feel free to pass a different Dashicon to your class as shown in this different icon example.

You can also pass custom SVG icons, as shown in this custom svg icon example.

Taxonomies

The class can also generate a new taxonomy to attach to the CPT.

Examples

Register a basic Custom Post Type:

Register and associate a basic taxonomy with the Custom Post Type:

Register a Custom Post Type with a different icon

Register a Custom Post Type with a custom icon

Create a customized Custom Post Type:

Create a customized taxonomy:

Attach an existing taxonomy:

Contributing

Contributors are welcome! Come help extend, test, and improve this package so it becomes an insanely helpful library. Check out CONTRIBUTING.md for more information.

License

Created by Aurooba Ahmed. Licensed under the terms of the GPL v2 or later.


All versions of cpt with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
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 aurooba/cpt contains the following files

Loading the files please wait ....