Form_Settings_Page::add_section( string $id, array $args = array() )

Adds a section to the settings page.

Description

Parameters

$id

(string) (Required) Section identifier.

$args

(array) (Optional) Section arguments.

  • 'title'
    (string) Section title.
  • 'description'
    (string) Section description.
  • 'subtab'
    (string) Identifier of the sub-tab this section should belong to.

Default value: array()

Source

File: src/db-objects/forms/form-settings-page.php

	public function add_section( $id, $args = array() ) {
		$this->sections[ $id ] = wp_parse_args( $args, array(
			'title'       => '',
			'description' => '',
			'subtab'      => '',
		) );
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.