Download the PHP package laegel/wp-plugin-maker without Composer

On this page you can find all versions of the php package laegel/wp-plugin-maker. 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 wp-plugin-maker

A WordPress OOP library

The goal is to normalize WP plugins structures to avoid dirty code and, by extension, bugs and security breaches.

Features

Better structure implies better code

This package focuses on the way the code in your plugin is structured. By default, a plugin generated (and processed) by WP Plugin Maker CLI looks like this:

It splits the features you want to provide through your plugin into five parts: admin, CLI, front, REST and all. Each folder speaks for himself, and "all" concerns code that will appear in every part.

What am I supposed to put in those folders? Basically, your WP filters and actions declarations.

Wait, I don't only have filters and actions in my plugin... Though there are five defined folders/namespaces with specific behaviours, you can add any other folder to put your other classes (models, etc...) into them.

Automatic filters and actions

Okay, file structure is nice but what are those "require" files you have here? As you may have noticed, those files are named from the parts previously evoked - except "all".

When defining a class method with "action" or "filter" prefix, it means you create respectively an action or a filter.

How does it work? Should I just code? Though this lib can seem to be magic, it is not. You'll have to use WP Plugin Maker CLI to automatize your filters/actions registrations by watching your plugin folder. So, when changes happen, your "require" files will be refreshed.

Your controllers will be parsed with reflection and every relevant action will be cached.

Here is a sample controller (src/Admin/Test_Controller.php):

And here is the generated "require-admin" file:

So, when in WP back office, this file will be included and all actions defined will be registered.

In standard WP plugin, you'd have to write:

for each action/filter you define, which is not an OOP way of thinking.

WAIT. I want to change the priority!!! By using docblocks on the method, you can change the priority:

A doc for all metadata will soon be provided.

What of the "args_count" arg? When the method is parsed, if it requires parameters, "args_count" will be the count of parameters the method needs. Time saver.

How to install

If using WP Plugin Maker CLI, just create a new plugin. If not (BUT NOT RECOMMENDED), go to your plugin root, then as any other Composer package :

If you really want to add this package to your plugin but require some help, please send me a message.

Notes

Any suggestion? Question? Need help for the setup? Contact me!

My email is displayed in my personal informations.

Any issue?

Open a ticket, I'll try to answer as soon as possible.


All versions of wp-plugin-maker with dependencies

PHP Build Version
Package Version
No informations.
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 laegel/wp-plugin-maker contains the following files

Loading the files please wait ....