Download the PHP package sergeliatko/wpsettings without Composer

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

WPSettings

WordPress Settings API Framework

This PHP package helps speed up the development of your settings screens in WordPress admin. The framework allows you to easily add options, settings sections and admin pages to WordPress admin, including managing registering, sanitizing, properly adding and displaying your settings according to both WordPress Settings API and best coding standards.

Who this is useful for

WPSettings framework is intended to help plugin and theme developers who need to quickly create consistent admin interfaces in WordPress no matter how large or small their projects. It is especially useful for developers who use WordPress as a "spare wheel" and may not be very experienced with WordPress specifics and its proprietary logic.

Is it overkill to use a framework such as this that helps you interact with WordPress Settings API? Is it secure to rely on code that you do not yourself control?

Following more than 10 years of deep WordPress development, including admin interfaces that always appear native to WordPress, I coded this framework primarily for my own uses, and it has become something that I use on all of my projects. Simply put, this saves me tons of time and headache!

As regards security, the library is completely open source, and you may always fork it on GitHub, customize to your own liking, and even create a pull request to allow others to benefit from your new feature. The code will remain public and be available to all of us. And, if you want to suggest features or take part in feature votes or simply support the project, you're most welcome to do so.

How it works

WPSettings Framework

With WPSettings Framework, adding a simple text field to General Settings in WordPress admin and all the code that sanitizes the option value in the database can be accomplished simply as follows:

...and that's it. Seriously, that's all the code needed to make it happen.

WordPress Settings API

Now count the lines of PHP necessary to get the same (cleanly registered and properly sanitized) result for the same option using the standard WordPress Settings API:

6 lines with WPSettings framework vs 30 lines using WordPress Settings API. Sure, if you add more options - not all of them will take 30 lines, but still it is easily 5 times faster in coding and eliminates the huge undertaking of learning the WordPress Settings API’s hidden tips and tricks.

The best part

WPSettings Framework takes care of:

WPSettings Framework allows you to rewrite any functionality of the main classes providing your own extensions.

Installation

Using composer

Install the latest version of the framework with:

Using git

Install the latest version of the framework with:

Install all the required libraries:

As a submodule

Git submodules are a powerful tool, which allows you to easily include a third-party project of your own while still treating them as two separate projects. Rather than provide an in-depth explanation of the benefits and use of submodules, it's recommended you take a moment and read through the submodules page in the official Git documentation. When you're ready to dive in, the following command generates a clone of WPSettings as a submodule:

Do not forget the required libraries:

Manually

Download zip files for all necessary libraries:

And extract them in your project resources folder.

Loading the framework classes

Using composer

Composer will load the framework automatically.

Manually

If loading the classes manually (after manual installation or after installation with git), make sure the autoload.php files in all 3 libraries are included in your project:

Basic usage

Adding a setting

Please see src/Setting.php for additional details and accepted parameters.

Adding a settings section

Please see src/Section.php for additional details and accepted parameters.

Adding admin page

Please see src/Page.php for additional details and accepted parameters.

Extending the core functionality

Following classes may be extended:

To do so, extend the class with your code and add _class key with your extension class fully qualified name as value to the parameters array.

For details see src/Factory.php

Getting option value from database

Please use get_option() WordPress function to get option value from the database. The framework deliberately does not save all your settings inside one option to stay as close as possible to WordPress default functionality and allow you to benefit from WordPress native hooks and filters over your options, thus keeping your code even more compatible with other WordPress functions.

Documentation is on its way...

While the full documentation is still in development, the code source has extensive comments and parameters descriptions to help you to get the idea of possibilities.

I would be most appreciative of your contributions to the project documentation via README.md file edits as well as posting your documentation suggestions to issues.

Support WPSettings Financially

Support WPSettings and help fund the project via the GitHub Sponsorship Program. For a price of a cup of coffee, you can access to early updates and tips. If you're using the framework for your commercial projects, I recommend you choose a bigger contribution plan to obtain the feature voting power and/or my personal support via chat.

Code review, product guidelines and consulting services are also available to help your product development. Feel free to contact me to discuss your project.

Also, all the funds collected will be used to cover the expenses of the project documentation and promotion.

About

Current version

Requirements

Feature requests, Questions, Support and Bug Reports

Please submit your questions and requests in GitHub Issues .

Licence

WPSettings is licenced under GPL-3.0. See LICENCE file for details.

Author

Serge Liatko - contact(at)sergeliatko.com - https://sergeliatko.com

Build with


All versions of wpsettings with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
sergeliatko/form-fields Version >=1.0.8
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 sergeliatko/wpsettings contains the following files

Loading the files please wait ....