Skip to content

Sections

linchpin edited this page Feb 22, 2023 · 10 revisions

Sections

Sections Class

  • Full name: \CourierNotices\Controller\Admin\Fields\Sections

Methods

__construct

public __construct(): mixed

do_settings_sections

Prints out all settings sections added to a particular settings page

public do_settings_sections(string $page): mixed

Part of the Settings API. Use this in a settings page callback function to output all the sections and fields that were added to that $page with add_settings_section() and add_settings_field()

Parameters:

Parameter Type Description
$page string The slug name of the page whose settings sections you want to output.

do_settings_fields

Print out the settings fields for a particular settings section.

public do_settings_fields(string $page, string $section): mixed

Part of the Settings API. Use this in a settings page to output a specific section. Should normally be called by do_settings_sections() rather than directly.

Parameters:

Parameter Type Description
$page string Slug title of the admin page whose settings fields you want to show.
$section string Slug title of the settings section whose fields you want to show.


Automatically generated from source code comments on 2023-02-22 using phpDocumentor and saggre/phpdocumentor-markdown