classes/PodsAPI.php
public function delete_wp_object( $object_type, $id, $force_delete = true ) {

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

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

		if ( empty( $id ) ) {
			return false;
		}

		if ( in_array( $object_type, array( 'post' ) ) ) {
			return wp_delete_post( $id, $force_delete );
		}

		if ( function_exists( 'wp_delete_' . $object_type ) ) {
			return call_user_func( 'wp_delete_' . $object_type, $id );
		}

		return false;
	}
public function delete_wp_object( $object_type, $id, $force_delete = true ) {

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

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

		if ( empty( $id ) ) {
			return false;
		}

		if ( in_array( $object_type, array( 'post' ) ) ) {
			return wp_delete_post( $id, $force_delete );
		}

		if ( function_exists( 'wp_delete_' . $object_type ) ) {
			return call_user_func( 'wp_delete_' . $object_type, $id );
		}

		return false;
	}
public function delete_wp_object ( $ object_type , $ id , $ force_delete = true ) { if ( in_array ( $ object_type , array ( 'post_type' , 'media' ) ) ) { $ object_type = 'post' ; } if ( 'taxonomy' === $ object_type ) { $ object_type = 'term' ; } if ( empty ( $ id ) ) { return false ; } if ( in_array ( $ object_type , array ( 'post' ) ) ) { return wp_delete_post ( $ id , $ force_delete ) ; } if ( function_exists ( 'wp_delete_' . $ object_type ) ) { return call_user_func ( 'wp_delete_' . $ object_type , $ id ) ; } return false ; }
Delete a WP object

@param string $object_type  Object type: post|user|comment
@param int    $id           Object ID
@param bool   $force_delete (optional) Force deletion instead of trashing (post types only)

@return bool|mixed

@since 2.0.0
Delete a WP object