Download the PHP package felixarntz/leavesandlove-wp-plugin-util without Composer

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

Latest Stable Version License

LaL WP Plugin Util

This is a library to initialize WordPress plugins in a proper fashion, making usual processes a lot easier to handle and adding a few useful features, for example plugin dependency management or automatic multisite-compatibility. I originally developed this library to use it in my own plugins, but version 2.0.0 marks its initial public release.

Features

This library uses WordPress best practices to initialize plugins and enhances the default behavior only where necessary - it does not reinvent the wheel or bloat the admin with dozens of internal settings.

Requirements

Your plugin itself must:

Getting Started

To use the library, first add it to your project by adding it to your composer.json (composer require felixarntz/leavesandlove-wp-plugin-util:2.0.1). The library uses autoloading to load its classes. It is recommended that you also use autoloading with your plugin's own files.

Your plugin must have a main initialization class which is called App and resides in your plugin's root namespace (do not put this class in the actual plugin main file!). This main class must extend the LaL_WP_Plugin class bundled in this library. For more information on how to extend this class, please check out it's PHPDoc block. See a little bit further below for a basic example of what that class could look like.

Then you initialize the main class from your plugin's main file. The following code snippet gives you an example:

The above code is all that you should include in your plugin's main file. In case you already wondered: You must not wrap any of the code into a plugins_loaded function - the plugin loader handles that for you. For an overview of how to leverage the advanced initialization methods, please check out the plugin loader class' PHPDoc block.

Based on the above example, the following is the absolute minimal code that your main class should have:

It is recommended to always wrap all your classes and functions into an if clause whether they already exist as this prevents fatal errors that may happen if a plugin is used as a regular plugin and as a bundled library at the same time.

For a detailed guide and reference on how to use this library, please read the Wiki on Github. Detailed guide coming soon - for now please refer to the PHPDoc.

Contributions and Bugs

If you have ideas on how to improve the library or if you discover a bug, please open a new issue or a pull-request.

You can also contribute to the library by translating it. In the library's /languages/ directory, there is a .pot file which you can use as a starting point. When you're done with a translation, you can either create a pull request with the new translation files or you can send them to me manually.


All versions of leavesandlove-wp-plugin-util 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 felixarntz/leavesandlove-wp-plugin-util contains the following files

Loading the files please wait ....