Form_Settings_Page::add_page_content()

Adds tabs, sub-tabs, sections and fields to this page.

Description

This method should call the methods add_tab(), add_subtab(), add_section() and add_field() to populate the page.

See also

Source

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

	protected function add_page_content() {
		$tabs = $this->get_tabs();
		foreach ( $tabs as $slug => $args ) {
			$this->add_tab( $slug, $args );
		}

		$subtabs = $this->get_subtabs();
		foreach ( $subtabs as $slug => $args ) {
			$this->add_subtab( $slug, $args );
		}

		$sections = $this->get_sections();
		foreach ( $sections as $slug => $args ) {
			$this->add_section( $slug, $args );
		}

		$fields = $this->get_fields();
		foreach ( $fields as $slug => $args ) {
			$type = 'text';
			if ( isset( $args['type'] ) ) {
				$type = $args['type'];
				unset( $args['type'] );
			}

			$this->add_field( $slug, $type, $args );
		}

		/**
		 * Fires after the form settings page content has been registered.
		 *
		 * @since 1.0.0
		 *
		 * @param awsmug\Torro_Forms\DB_Objects\Forms\Form_Settings_Page $settings_page The settings page instance.
		 */
		do_action( "{$this->manager->get_prefix()}add_settings_content", $this );
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.