Download the PHP package oberonlai/wp-option without Composer

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

WP Option v1.0

Simple WordPress class for settings api modifed from boo-settings-helper

Requirements

Installation

Install with composer

Run the following in your terminal to install with Composer.

WP Option PSR-4 autoloading and can be used with the Composer's autoloader. Below is a basic example of getting started, though your setup may be different depending on how you are using Composer.

See Composer's basic usage guide for details on working with Composer and autoloading.

Basic Usage

Below is a basic example of setting up a simple option page.

Usage

To create a option, first instantiate an instance of Option. The class takes one argument, which is an plugin prefix. All of the options' name will add this prefix.

After instantiating the above option, you have to add settings menu and tab.

Menu

Firstly, we need to add admin menu to our admin page.

You have to set option to true if you want to add menu under the settings menu.

Tab

You have to add one tab at least. The fields are placed in tab.

Avaiable fields

Fields list

Common params of fields:

Text

There are three arguments. First is the tab ID, second is text field params, and last is callback function of render field.

With render callback function:

URL

Number

Color

Textarea

Radio Button

Select

HTML

Add static html in table row.

Checkbox

Checkboxes

Posts

Add specific post type. The third params is the name of custom post type.

Password

File Uploader

Media Uploader

Render field

You can use callback function when add field to render the field.

Add links in plugins list

You can add links below the plugin name in list.

Retrive field's value

You can use WordPress get_option() to get value. Don't forget the prefix name of field id. For example::

If you want to retrive field value of 'my_text_field', use code below:


All versions of wp-option with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
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 oberonlai/wp-option contains the following files

Loading the files please wait ....