Extending the settings
Adding your own sections and fields to the POM LMS settings screen.
The filter
add_filter( 'pom_lms_settings', 'my_lms_settings' );
function my_lms_settings( array $settings ): array {
// Add your section.
return $settings;
}
pom_lms_settings receives the definition of the whole settings screen — the sections, their tabs, and the setting groups inside them — and must return it.
The structure
Each section carries a title, the roles allowed to change it, and its tabs. Each tab carries setting groups, and each group names a directory of field definitions.
The plugin's own sections are Course, Lesson and Account, plus the license section.
Add a section of your own rather than inserting fields into the plugin's. Editors then know which settings belong to which product, and your section survives changes to the plugin's own layout.
Allowed roles
Every section declares which roles may change it. The plugin's sections allow administrator, editor and shop manager.
Choose deliberately for your own section. If it configures something with financial or access consequences, restricting it to administrators is reasonable — but do not assume the plugin's list is right for your settings just because it is the default here.
Fields
Fields are defined in their own file per setting group, returning an array of field definitions: type, name, label, options, default, and optional dependencies that show or hide a field based on another.
Follow the shape of the plugin's existing groups. The types available are the theme's, which is why a POM LMS setting can offer the site's color palette or button styles without defining them.
Naming
Prefix your setting names. A collision with a POM LMS setting means one value silently overwrites the other.
Reading your settings
Read them through the framework's settings accessor, the same way the plugin reads its own — not by going to the option directly. The storage layout is not a public interface, and reading it directly is the first thing to break on an upgrade.
Where not to put settings
Not everything belongs on this screen. If your integration is a plugin of its own, it should have its own settings screen; adding a section to POM LMS ties your configuration to another product's lifecycle, and it disappears if POM LMS is deactivated.
Add a section here when the settings genuinely configure courses and lessons — a catalogue layout, an integration between courses and your own system. Put everything else on your own screen.
Settings are site-wide
Like the plugin's own, anything you add here applies to the whole site. There is no per-course settings mechanism to hook into.
If your feature needs per-course configuration, add a field to the course editor instead. See Extending the course metabox.
Compatibility
The filter is stable. The contents of the structure are not — sections and groups may be added or reorganized between releases.
Add your own keys and return the array. Do not depend on the plugin's section names being present, and do not remove them.