Skip to main content
White Label registers two read-only abilities in the mainwp-white-label category. They use the mainwp/ namespace on your MainWP Dashboard.

What You’ll Learn

  • Read the general White Label flags and the number of accessible sites that override them
  • List accessible sites with stored White Label settings, one page at a time
  • Understand which settings the responses leave out

Prerequisites

  • WordPress 6.9 or later on the MainWP Dashboard site
  • MainWP Dashboard with Abilities API support; use version 6.2 or later for the input_json example below
  • White Label with Abilities support, active in MainWP Dashboard
  • An authenticated user with manage_options
  • Access to the White Label Add-on
Team Control restrictions apply. Both abilities check the user’s access to the White Label Add-on. The site list and the override count include only sites the user is allowed to access. Use an Application Password or the authentication methods in the Abilities API overview. The examples use an Application Password.

Available Abilities

Discover the abilities and their full input and output schemas:
Both abilities are marked readonly: true, destructive: false, and idempotent: true.
These abilities read what the White Label Add-on has stored on your MainWP Dashboard. They do not save settings, push settings to Child sites, sync sites, or contact Child sites. A stored value does not prove that a Child site currently shows it.

Get General Settings

Ability: mainwp/get-white-label-settings-v1
Method: GET
This ability takes no input. Send no input or an empty object; any property is rejected.
Example response:
The response contains only these 11 fields. It does not return the custom plugin header text, the support contact email, support messages, or appearance settings such as logos, colors, and custom CSS.

List Sites

Ability: mainwp/list-white-label-sites-v1
Method: GET
Lists accessible sites that have stored White Label settings on the Dashboard. A site with no stored White Label settings does not appear in the list. Any other property is rejected.
To check one site, pass its ID:
Example response:
A page past the last site returns an empty sites array with the same total. When site_id names an accessible site with no stored White Label settings, the response has an empty sites array and total: 0. Each entry in sites contains: Each entry contains only these 13 fields. The site URL, the custom plugin header text, the support contact email, support messages, and appearance settings are not returned. The ability reports what is stored for each site; it does not tell you which settings a Child site received in its last update. Per-site flags apply when override is true. Otherwise, the site’s stored values do not replace the general settings.

Labels

contact_button_label and name are plain text, limited to 128 characters, with HTML removed. A value that looks like contact or link information comes back as an empty string:
  • Any value containing @, containing ://, or starting with //
  • A contact_button_label containing www.
An empty string can mean the label is not set or that it was withheld under these rules.

Handle Errors

If the White Label database table does not exist yet, the site list is empty and override_site_count is 0.