Download the PHP package keironlowe/posty without Composer

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

Posty

Posty is an object orientated post type manager for WordPress. It makes it a breeze to manage your post types and any custom columns.

Roadmap

Installation

Posty has no dependencies, and requires PHP >= 7.4.

Usage

Posty provides a fluent API for managing both your post types and columns. To get started, just use the make method, providing the singular and plural names, to create a new post type. It's important to note that the register method must always be called last. Any changes made after the register method won't take effect.

This post type slug/ID will be automatically generated based on the singular name, so in this case it would be product. Optionally, you can pass a third argument to define this yourself.

Setting labels and arguments

Posty handles setting up all the labels, along with some sensible default arguments, but we know that one size doesn't fit all, so you can update these using the setLabels and setArguments methods.

Both setLabels and setArguments should receive an array, this can either by passed directly, or as a result of a callback function.

Columns

To manage the columns, we first need to grab the ColumnRepository instance using the columns method. This class has the add, remove and reorder methods. Each of these methods should receive an array, this can either by passed directly, or as a result of a callback function.

Adding Columns

The add method should receive an array of columns. Each column should be an array of key => value pairs, with two required elements, label and value

The label is the label for the column, and the value should be a function which takes the ID of the post, and returns the correct value. Optionally, there is also the order element, which should be an integer and allows you to reorder the column.

The ID of the field is automatically generated from the label, but in the case you need to manually set this, you can use the id element.

You can make the column sortable by setting the sort element to either alpha or numeric.

Removing Columns

The remove method should receive an array of column IDs to be removed. By default, custom post types have cb (checkbox), title, author and date columns which you can remove if neccessary.

Reordering Columns

The reorder method should receive an array of column IDs in the order that you wish. By default, custom post types have cb (checkbox), title, author and date columns which you should bear in mind when reordering. Any columns that aren't included in the array will be added at the end.


All versions of posty with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
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 keironlowe/posty contains the following files

Loading the files please wait ....