classes/cli/PodsAPI_CLI_Command.php
public function add_pod( $args, $assoc_args ) {

		// Don't allow id to be set.
		if ( isset( $assoc_args['id'] ) ) {
			unset( $assoc_args['id'] );
		}

		$api = pods_api();

		$id = 0;

		try {
			$id = $api->save_pod( $assoc_args );
		} catch ( Exception $e ) {
			WP_CLI::error( sprintf( __( 'Error saving pod: %s', 'pods' ), $e->getMessage() ) );
		}

		if ( 0 < $id ) {
			WP_CLI::success( __( 'Pod added.', 'pods' ) );
			WP_CLI::line( sprintf( __( 'New ID: %s', 'pods' ), $id ) );
		} else {
			WP_CLI::error( __( 'Pod not added.', 'pods' ) );
		}

	}
public function add_pod( $args, $assoc_args ) {

		// Don't allow id to be set.
		if ( isset( $assoc_args['id'] ) ) {
			unset( $assoc_args['id'] );
		}

		$api = pods_api();

		$id = 0;

		try {
			$id = $api->save_pod( $assoc_args );
		} catch ( Exception $e ) {
			WP_CLI::error( sprintf( __( 'Error saving pod: %s', 'pods' ), $e->getMessage() ) );
		}

		if ( 0 < $id ) {
			WP_CLI::success( __( 'Pod added.', 'pods' ) );
			WP_CLI::line( sprintf( __( 'New ID: %s', 'pods' ), $id ) );
		} else {
			WP_CLI::error( __( 'Pod not added.', 'pods' ) );
		}

	}
public function add_pod ( $ args , $ assoc_args ) { // Don't allow id to be set. if ( isset ( $ assoc_args [ 'id' ] ) ) { unset ( $ assoc_args [ 'id' ] ) ; } $ api = pods_api ( ) ; $ id = 0 ; try { $ id = $ api -> save_pod ( $ assoc_args ) ; } catch ( Exception $ e ) { WP_CLI :: error ( sprintf ( __ ( 'Error saving pod: %s' , 'pods' ) , $ e -> getMessage ( ) ) ) ; } if ( 0 < $ id ) { WP_CLI :: success ( __ ( 'Pod added.' , 'pods' ) ) ; WP_CLI :: line ( sprintf ( __ ( 'New ID: %s' , 'pods' ) , $ id ) ) ; } else { WP_CLI :: error ( __ ( 'Pod not added.' , 'pods' ) ) ; } }
Add a pod.

## OPTIONS

--name=<name>
: The pod name, the default type is post_type.

[--<field>=<value>]
: The field => value pair(s) to save.

## EXAMPLES

wp pods-api add-pod --name=book
wp pods-api add-pod --name=book --type=post_type
wp pods-api add-pod --name=book --type=post_type --label=Books --singular_label=Book
wp pods-api add-pod --name=genre --type=taxonomy --label=Genres --singular_label=Genre

@subcommand add-pod

@param $args
@param $assoc_args
Add a pod .