Inventory_Presser_Schema_Org_Generator::schema_org_drive_type( string $drive_type )

schema_org_drive_type


Description Description

Translates our drive type term name into a schema.org vehicle drive type value.


Top ↑

Parameters Parameters

$drive_type

(string) (Required) A drive type term name like "Front Wheel Drive"


Top ↑

Return Return

(string|null) A schema.org vehicle drive type string like "FrontWheelDriveConfiguration"


Top ↑

Source Source

File: includes/class-schema-org-generator.php

	function schema_org_drive_type( $drive_type )
	{
		switch( $drive_type )
		{
			case 'Front Wheel Drive w/4x4':
			case 'Rear Wheel Drive w/4x4':
				return 'FourWheelDriveConfiguration';

			case 'Two Wheel Drive':
			case 'Rear Wheel Drive':
				return 'RearWheelDriveConfiguration';

			case 'Front Wheel Drive':
				return 'FrontWheelDriveConfiguration';

			case 'All Wheel Drive':
				return 'AllWheelDriveConfiguration';
		}
		return null;
	}