public function create( $args = array(), $definitions = null ) {
		if ( is_null( $definitions ) ) {
			$definitions = $this->_definitions;
		}

		$callbacks = array();
		$generated_args = $this->_generateArgs( $args, $definitions, $callbacks );
		if ( is_wp_error( $generated_args ) ) {
			return $generated_args;
		}

		$created = $this->_createObject( $generated_args );
		if ( ! $created || is_wp_error( $created ) ) {
			return $created;
		}

		if ( ! empty( $callbacks ) ) {
			$updated_fields = $this->_applyCallbacks( $callbacks, $created );
			$save_result = $this->_updateObject( $created, $updated_fields );
			if ( ! $save_result || is_wp_error( $save_result ) ) {
				return $save_result;
			}
		}

		if ( ! empty( $created ) && !is_wp_error( $created ) ) {
			$this->_objects[] = $created;
		}

		return $created;
	}
public function create( $args = array(), $definitions = null ) {
		if ( is_null( $definitions ) ) {
			$definitions = $this->_definitions;
		}

		$callbacks = array();
		$generated_args = $this->_generateArgs( $args, $definitions, $callbacks );
		if ( is_wp_error( $generated_args ) ) {
			return $generated_args;
		}

		$created = $this->_createObject( $generated_args );
		if ( ! $created || is_wp_error( $created ) ) {
			return $created;
		}

		if ( ! empty( $callbacks ) ) {
			$updated_fields = $this->_applyCallbacks( $callbacks, $created );
			$save_result = $this->_updateObject( $created, $updated_fields );
			if ( ! $save_result || is_wp_error( $save_result ) ) {
				return $save_result;
			}
		}

		if ( ! empty( $created ) && !is_wp_error( $created ) ) {
			$this->_objects[] = $created;
		}

		return $created;
	}
public function create ( $ args = array ( ) , $ definitions = null ) { if ( is_null ( $ definitions ) ) { $ definitions = $ this -> _definitions ; } $ callbacks = array ( ) ; $ generated_args = $ this -> _generateArgs ( $ args , $ definitions , $ callbacks ) ; if ( is_wp_error ( $ generated_args ) ) { return $ generated_args ; } $ created = $ this -> _createObject ( $ generated_args ) ; if ( ! $ created || is_wp_error ( $ created ) ) { return $ created ; } if ( ! empty ( $ callbacks ) ) { $ updated_fields = $ this -> _applyCallbacks ( $ callbacks , $ created ) ; $ save_result = $ this -> _updateObject ( $ created , $ updated_fields ) ; if ( ! $ save_result || is_wp_error ( $ save_result ) ) { return $ save_result ; } } if ( ! empty ( $ created ) && ! is_wp_error ( $ created ) ) { $ this -> _objects [ ] = $ created ; } return $ created ; }
Creates a new object.

@since 1.0.0

@access public
@param array $args The array of arguments to use during a new object creation.
@param array $definitions Custom difinitions of default values for a new object properties.
@return object|boolean|\WP_Error A new object identifier on success, otherwise FALSE or a WP_Error object.
Creates a new object .