Download the PHP package screenfeed/autowpoptions without Composer

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

AutoWPOptions

Allows to manage a set of options in WordPress.

Requires php 5.4 and WordPress 4.4.

What you will be able to do

How to install

With composer:

How to use

Create one class that extends Sanitization\AbstractSanitization. This class will contain the following:

Default values

Required. They are used when an option has no value yet. Their type is used to decide how to cast the values.

Reset values

Optional. Reset values are used if the whole set of options does not exist yet: sometimes you may want them to be different from the default values. Default values are used for the missing reset values.
You could also use them in a "Reset Options" process for example.

A sanitization method

Required. It is run for each option, when getting/updating it.

A validation method

Required (but can simply return the entry if not needed). It is run once for all options on update. It allows to edit some values, depending on others for example.

Two keywords as class properties

Required. They are used in hook names.

Example

How to create an option that is stored as an array in the WordPress' options table:

The MyOptionsSanitization class:

An "upgrade process"?

The plugin version used when instanciating MyOptionsSanitization is stored in the option and can be used in a future plugin release for an upgrade process.
For example:

Reserved keyworks

Don't use the following keywords as option keys, they are used internally:

Extending

You may want to store your options elsewhere than the WordPress' options table, maybe in configuration file (heck, why not). This package is built in such a way that it is possible.
To do so, you need to create a class that will replace Screenfeed\AutoWPOptions\Storage\WpOption, and implement Screenfeed\AutoWPOptions\Storage\StorageInterface.


All versions of autowpoptions with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.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 screenfeed/autowpoptions contains the following files

Loading the files please wait ....