protected function _createObject( $args ) {
		$post_id = wp_insert_post( $args, true );
		if ( $post_id && ! is_wp_error( $post_id ) ) {
			$this->_debug( 'Generated post ID: ' . $post_id );
		} elseif ( is_wp_error( $post_id ) ) {
			$this->_debug(
				'Post generation failed with message [%s] %s',
				$post_id->get_error_code(),
				$post_id->get_error_messages()
			);
		} else {
			$this->_debug( 'Post generation failed' );
		}

		return $post_id;
	}
protected function _createObject( $args ) {
		$post_id = wp_insert_post( $args, true );
		if ( $post_id && ! is_wp_error( $post_id ) ) {
			$this->_debug( 'Generated post ID: ' . $post_id );
		} elseif ( is_wp_error( $post_id ) ) {
			$this->_debug(
				'Post generation failed with message [%s] %s',
				$post_id->get_error_code(),
				$post_id->get_error_messages()
			);
		} else {
			$this->_debug( 'Post generation failed' );
		}

		return $post_id;
	}
protected function _createObject ( $ args ) { $ post_id = wp_insert_post ( $ args , true ) ; if ( $ post_id && ! is_wp_error ( $ post_id ) ) { $ this -> _debug ( 'Generated post ID: ' . $ post_id ) ; } elseif ( is_wp_error ( $ post_id ) ) { $ this -> _debug ( 'Post generation failed with message [%s] %s' , $ post_id -> get_error_code ( ) , $ post_id -> get_error_messages ( ) ) ; } else { $ this -> _debug ( 'Post generation failed' ) ; } return $ post_id ; }
Generates a new post.

@since 1.0.0

@access protected
@param array $args The array of arguments to use during a new post creation.
@return int|\WP_Error The newly created post's ID on success, otherwise a WP_Error object.
Generates a new post .