Tribe__Settings_Tab::addFields( $fields )

filters the fields array from Tribe__Settings and adds the current tab’s fields to it


Parameters

$field

(array) (Required) the $fields from Tribe__Settings


Top ↑

Return

(array) $fields the filtered fields


Top ↑

Source

File: src/Tribe/Settings_Tab.php

		public function addFields( $fields ) {
			if ( ! empty ( $this->fields ) ) {
				$fields[ $this->id ] = $this->fields;
			} elseif ( has_action( 'tribe_settings_content_tab_' . $this->id ) ) {
				$fields[ $this->id ] = $this->fields = array( 0 => null ); // just to trick it
			}

			return $fields;
		}