Ночной режим / Night mode

When it comes to development of plugins and themes under the platform of WordPress, developers have to face the fact that there are many different ways to make menus and functionality for the verification of the input information.
WordPress API

But the point is that there is only one really sure way to accomplish this in WordPress – it consists in the application Settings API.

Basic concepts
Before writing code you should understand the three main concepts used in the Settings API. In particular, field. This is a special options that appear on the network pages. Field is the smallest unit. It can be radio button, text field, checkbox and much more. All values are stored in the WordPress database.

A partition is a field that is grouped by logical principle. This tool is very convenient if you are working with a large number of fields. If the product includes a large number of settings pages, all the sections can be link to a specific page or tab. Settings you must register after you define sections, and fields. Did not understand the nature of these components? You should not worry about it, because in the process you are sure to all hearken to.
Sandbox (Sandbox) settings
In order to understand the issue, you initially should set a standard theme. To get started, you should create a directory WordPress-Settings-Sandbox. Here you want to create multiple files.

style.css is the FAI for the styles of your theme. It includes all meta-information. For WordPress this is a required file. As for index.php it the standard template. This is also a mandatory file, which so far can be left blank. File functions.php intended for basic work.
The creation of the first options
You should understand that your page in any case should consist of a title, content (content) and footer. Using Settings API create section “General”. It create three containers, which will be linked to all of these categories. How to do it?

You must first determine the section that will be used to group fields.
In the section add the three listed fields.
Settings are registered using the WordPress API.

As you can see, there is nothing complicated. In order to make it easier to use manual that will be presented below. To cope with the task even people who are far from modern technology. So you can get to work right now.