Download the PHP package marspress/wp-options without Composer

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

MarsPress Options

Installation

Require the composer package in your composer.json with marspress/wp-options with minimum dev-main OR run composer require marspress/wp-options

WP Options

Options are generally under the Settings menu in wp-admin.

Resources

Usage

new \MarsPress\Options\Settings\Option_Group() takes 1 required parameter.

Available Methods

new \MarsPress\Options\Settings\Option takes 8 parameter, 3 required and 5 optional.

new \MarsPress\Options\Settings\Page takes 7 parameter, 3 required and 4 optional.

Examples

First, you must create and Option Group:

Then you can add Options to your Option Group (including examples of each field type):

Then you can create a Page:

You can them access your option values:

Method / Class Chaining

Because the add_options method of the Option Group class returns itself, you are able to use class and method chaining as such:

Although you could chain inside the \MarsPress\Options\Settings\Page constructor as well, it is recommended that you store your instance of your Option Group so you can access the option values easily.

WP Theme Mods

Theme mods are generally in the Appearance Customizer.

Resources

Usage

new \MarsPress\Options\ThemeMods\Customization_Section() takes 4 parameters, 2 required and 2 optional.

Available Methods

new \MarsPress\Options\ThemeMods\Customization() takes 10 parameters, 3 required and 7 optional.

Examples

First you need to make a Section:

Then you can add theme mods to the Section (including examples of the most common field types):

Method / Class Chaining

Because the add_customizations method of the Customization Section class returns itself, you are able to use class and method chaining as such:


All versions of wp-options with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
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 marspress/wp-options contains the following files

Loading the files please wait ....