classes/PodsAPI.php
public function save_wp_object( $object_type, $data, $meta = array(), $strict = false, $sanitized = false, $fields = array() ) {

		if ( in_array( $object_type, array( 'post_type', 'media' ) ) ) {
			$object_type = 'post';
		}

		if ( 'taxonomy' === $object_type ) {
			$object_type = 'term';
		}

		if ( $sanitized ) {
			$data = pods_unsanitize( $data );
			$meta = pods_unsanitize( $meta );
		}

		if ( in_array( $object_type, array( 'post', 'term', 'user', 'comment' ) ) ) {
			return call_user_func( array( $this, 'save_' . $object_type ), $data, $meta, $strict, false, $fields );
		} elseif ( 'settings' === $object_type ) {
			// Nothing to save
			if ( empty( $meta ) ) {
				return true;
			}

			return $this->save_setting( pods_var( 'option_id', $data ), $meta, false );
		}

		return false;
	}
public function save_wp_object( $object_type, $data, $meta = array(), $strict = false, $sanitized = false, $fields = array() ) {

		if ( in_array( $object_type, array( 'post_type', 'media' ) ) ) {
			$object_type = 'post';
		}

		if ( 'taxonomy' === $object_type ) {
			$object_type = 'term';
		}

		if ( $sanitized ) {
			$data = pods_unsanitize( $data );
			$meta = pods_unsanitize( $meta );
		}

		if ( in_array( $object_type, array( 'post', 'term', 'user', 'comment' ) ) ) {
			return call_user_func( array( $this, 'save_' . $object_type ), $data, $meta, $strict, false, $fields );
		} elseif ( 'settings' === $object_type ) {
			// Nothing to save
			if ( empty( $meta ) ) {
				return true;
			}

			return $this->save_setting( pods_var( 'option_id', $data ), $meta, false );
		}

		return false;
	}
public function save_wp_object ( $ object_type , $ data , $ meta = array ( ) , $ strict = false , $ sanitized = false , $ fields = array ( ) ) { if ( in_array ( $ object_type , array ( 'post_type' , 'media' ) ) ) { $ object_type = 'post' ; } if ( 'taxonomy' === $ object_type ) { $ object_type = 'term' ; } if ( $ sanitized ) { $ data = pods_unsanitize ( $ data ) ; $ meta = pods_unsanitize ( $ meta ) ; } if ( in_array ( $ object_type , array ( 'post' , 'term' , 'user' , 'comment' ) ) ) { return call_user_func ( array ( $ this , 'save_' . $ object_type ) , $ data , $ meta , $ strict , false , $ fields ) ; } elseif ( 'settings' === $ object_type ) { // Nothing to save if ( empty ( $ meta ) ) { return true ; } return $ this -> save_setting ( pods_var ( 'option_id' , $ data ) , $ meta , false ) ; } return false ; }
Save a WP object and its meta

@param string $object_type Object type: post|taxonomy|user|comment|setting
@param array  $data        All post data to be saved
@param array  $meta        (optional) Associative array of meta keys and values
@param bool   $strict      (optional) Decides whether the previous saved meta should be deleted or not
@param bool   $sanitized   (optional) Will unsanitize the data, should be passed if the data is sanitized before
sending.
@param array  $fields      (optional) The array of fields and their options, for further processing with

@return bool|mixed

@since 2.0.0
Save a WP object and its meta