Download the PHP package martijnvdb/wordpress-plugin-tools without Composer

On this page you can find all versions of the php package martijnvdb/wordpress-plugin-tools. 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 wordpress-plugin-tools

Wordpress Plugin Tools

The goal of this library is to simplify the proces of creating custom post types and settings pages in Wordpress.

Installation

You can install the package via composer:

Usage

All documented objects use a fluent interface, which allows you to chain methods. For example:

Every chain should end with a build() method. The build() method will register the object using the Wordpress action hooks. Except when using an object as an argument in a method. In the following example, the CustomField object should not end with the build() method:

PostType

This object allows you to easily create one or multiple post types without having to worry about the Wordpress hooks. Chain any method you like and end with the build() method to register the post type.

Create a new PostType

Add a MetaBox to the PostType

MetaBoxes on their own won't be shown anywhere. They have to be added to a PostType. These methods will do exactly that.

Add labels to the PostType

All the Wordpress labels can be used. See a full list of supported labels.

Add a description to the PostType

Make the PostType public

PostTypes are false by default. Using this method the PostType will be shown in the admin interface.

Set menu position of the PostType

Set the icon of the PostType

Add feature support to the PostType

Any Wordpress core feature can be used. The core features are title, editor, comments, revisions, trackbacks, author, excerpt, page-attributes, thumbnail, custom-fields and post-formats.

See a full list of supported features

Remove feature support from the PostType

Any Wordpress core feature can be removed. The core features are title, editor, comments, revisions, trackbacks, author, excerpt, page-attributes, thumbnail, custom-fields and post-formats.

See a full list of supported features

Set the slug of the PostType

Use the block editor in the PostType

Add any supported option to the PostType

This library only has a handfull of dedicated methods to set post type options. To use any other post type option you can use the addOption() method. See a full list of possible options.

CustomField

This object allows you to easily create one or multiple custom fields without having to worry about the Wordpress hooks. Chain any method you like and end with the build() method to register the custom field.

Create a new CustomField

Set the CustomField type

The possible CustomField types are text, textarea, checkbox, number, select, radio and editor.

Set the label of the CustomField

Add options to the CustomField

This will only be used if the CustomField is a select or radio type.

Set the minimal value of the CustomField

This will only be used if the CustomField is a number type.

Set the maximum value of the CustomField

This will only be used if the CustomField is a number type.

Set the size of the steps of the CustomField

This will only be used if the CustomField is a number type.

MetaBox

This object allows you to easily create one or multiple metaboxes without having to worry about the Wordpress hooks. Chain any method you like and end with the build() method to register the metabox.

Create a new MetaBox

Set the title of the MetaBox

Add a CustomField to a MetaBox

Add a list to a MetaBox

This library allows you to easily create a growable and reorderable list of items. Each item in the list can contain multiple CustomFields. If for example you would like to add multiple URLs with a title and a description to a post, you can use a list for this.

Add the MetaBox to a Wordpress post type

The ID of the post types has to be used as an argument of these methods. These methods allow you to add MetaBoxes to existing post types which aren't created with this library.

Customize text

This library uses two text strings in the MetaBox which can be customized or translated. The following texts are used:

This is how to customize them:

SettingsPage

This object allows you to easily create one or multiple setting pages without having to worry about the Wordpress hooks. Chain any method you like and end with the build() method to register the setting page.

Set the page title of the SettingsPage

Set the menu title of the SettingsPage

Set the slug of the SettingsPage

Set the icon of the SettingsPage

Add CustomFields to the SettingsPage


All versions of wordpress-plugin-tools with dependencies

PHP Build Version
Package Version
Requires twig/twig Version ^3.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 martijnvdb/wordpress-plugin-tools contains the following files

Loading the files please wait ....