public static function options_setup( $type = null, $options = null ) {

		$core_defaults = array(
			'id'             => 0,
			'name'           => '',
			'label'          => '',
			'description'    => '',
			'help'           => '',
			'default'        => null,
			'attributes'     => array(),
			'class'          => '',
			'type'           => 'text',
			'group'          => 0,
			'grouped'        => 0,
			'developer_mode' => false,
			'dependency'     => false,
			'depends-on'     => array(),
			'excludes-on'    => array(),
			'options'        => array(),
		);

		if ( ! empty( $options ) && is_array( $options ) ) {
			$core_defaults = array_merge( $core_defaults, $options );
		}

		if ( null === $type ) {
			return $core_defaults;
		} else {
			self::field_loader( $type );
		}

		$options = apply_filters( "pods_field_{$type}_options", (array) self::$loaded[ $type ]->options(), $type );

		$first_field = current( $options );

		if ( ! empty( $options ) && ! isset( $first_field['name'] ) && ! isset( $first_field['label'] ) ) {
			$all_options = array();

			foreach ( $options as $group => $group_options ) {
				$all_options = array_merge( $all_options, self::fields_setup( $group_options, $core_defaults ) );
			}

			$options = $all_options;
		} else {
			$options = self::fields_setup( $options, $core_defaults );
		}

		return $options;
	}