classes/Pods.php
public function add( $data = null, $value = null ) {

		if ( null !== $value ) {
			$data = array( $data => $value );
		}

		$data = (array) $this->do_hook( 'add', $data );

		if ( empty( $data ) ) {
			return 0;
		}

		$params = array(
			'pod'                 => $this->pod,
			'data'                => $data,
			'allow_custom_fields' => true,
		);

		return $this->api->save_pod_item( $params );
	}
public function add( $data = null, $value = null ) {

		if ( null !== $value ) {
			$data = array( $data => $value );
		}

		$data = (array) $this->do_hook( 'add', $data );

		if ( empty( $data ) ) {
			return 0;
		}

		$params = array(
			'pod'                 => $this->pod,
			'data'                => $data,
			'allow_custom_fields' => true,
		);

		return $this->api->save_pod_item( $params );
	}
public function add ( $ data = null , $ value = null ) { if ( null !== $ value ) { $ data = array ( $ data => $ value ) ; } $ data = ( array ) $ this -> do_hook ( 'add' , $ data ) ; if ( empty ( $ data ) ) { return 0 ; } $ params = array ( 'pod' => $ this -> pod , 'data' => $ data , 'allow_custom_fields' => true , ) ; return $ this -> api -> save_pod_item ( $ params ) ; }
Add an item to a Pod by giving an array of field data or set a specific field to
a specific value if you're just wanting to add a new item but only set one field.

You may be looking for save() in most cases where you're setting a specific field.

@see   PodsAPI::save_pod_item

@param array|string $data  Either an associative array of field information or a field name.
@param mixed        $value (optional) Value of the field, if $data is a field name.

@return int The item ID

@since 2.0.0
@link  https://pods.io/docs/add/
Add an item to a Pod by giving an array of field data or set a specific field to a specific value if you re just wanting to add a new item but only set one field .