INVP::keys_and_types()

Produces an array of arrays that define all the meta fields that define our vehicle post type for all vehicle types including boats.


Return Return

(array) An array of arrays, defining the meta fields that are registered and used by this class.


Top ↑

Source Source

File: includes/class-invp.php

			if ( empty( $term_meta[ 'phone_' . $p . '_uid' ][0] ) ) {
				// No, we're done with this location.
				break;
			}

			$phones[] = array(
				'uid'         => $term_meta[ 'phone_' . $p . '_uid' ][0],
				'description' => self::meta_array_value_single( $term_meta, 'phone_' . $p . '_description' ),
				'number'      => self::meta_array_value_single( $term_meta, 'phone_' . $p . '_number' ),
			);
		}
		return $phones;
	}

	/**
	 * This is an array of the post meta keys this object uses. These keys
	 * must be prefixed by an apply_filters() call before use.
	 *
	 * @return array An array of the post meta keys this vehicle object uses
	 */
	public static function keys() {
		return array_column( self::keys_and_types(), 'name' );
	}

	/**
	 * Produces an array of arrays that define all the meta fields that
	 * define our vehicle post type for all vehicle types including boats.
	 *
	 * @return array An array of arrays, defining the meta fields that are registered and used by this class.
	 */
	public static function keys_and_types() {
		return apply_filters(
			'invp_meta_fields',
			array(
				array(
					'label'  => __( 'Availability', 'inventory-presser' ),
					'name'   => 'availability',
					'sample' => __( 'For Sale', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label' => __( 'Beam', 'inventory-presser' ),
					'name'  => 'beam', // for boats.
					'type'  => 'string',
				),
				array(
					'label'  => __( 'Body Style', 'inventory-presser' ),
					'name'   => 'body_style',
					'sample' => __( 'EXTENDED CAB PICKUP', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'KBB Book Value', 'inventory-presser' ), // Kelley Blue Book.
					'name'   => 'book_value_kbb',
					'sample' => 13500,
					'type'   => 'number',
				),
				array(
					'label'  => __( 'NADA Book Value', 'inventory-presser' ), // NADA Guides.
					'name'   => 'book_value_nada',
					'sample' => 13500,
					'type'   => 'number',
				),
				array(
					'label' => __( 'Car ID', 'inventory-presser' ),
					'name'  => 'car_id', // unique identifier.
					'type'  => 'integer',
				),
				array(
					'label' => __( 'Carfax Accident Free', 'inventory-presser' ),
					'name'  => 'carfax_accident_free',
					'type'  => 'boolean',
				),
				array(
					'label' => __( 'Carfax Have Report', 'inventory-presser' ),
					'name'  => 'carfax_have_report',
					'type'  => 'boolean',
				),
				array(
					'label' => __( 'Carfax One Owner', 'inventory-presser' ),
					'name'  => 'carfax_one_owner',
					'type'  => 'boolean',
				),
				array(
					'label' => __( 'Carfax Top Condition', 'inventory-presser' ),
					'name'  => 'carfax_top_condition',
					'type'  => 'boolean',
				),
				array(
					'label' => __( 'Carfax Icon URL', 'inventory-presser' ),
					'name'  => 'carfax_url_icon',
					'type'  => 'string',
				),
				array(
					'label' => __( 'Carfax Accident-Free Badge URL', 'inventory-presser' ),
					'name'  => 'carfax_url_icon_accident_free',
					'type'  => 'string',
				),
				array(
					'label' => __( 'Carfax One-Owner Badge URL', 'inventory-presser' ),
					'name'  => 'carfax_url_icon_one_owner',
					'type'  => 'string',
				),
				array(
					'label' => __( 'Carfax Top-Condition Badge URL', 'inventory-presser' ),
					'name'  => 'carfax_url_icon_top_condition',
					'type'  => 'string',
				),
				array(
					'label' => __( 'Carfax Report URL', 'inventory-presser' ),
					'name'  => 'carfax_url_report',
					'type'  => 'string',
				),
				array(
					'label' => __( 'Certified Pre-owned', 'inventory-presser' ),
					'name'  => 'certified_preowned',
					'type'  => 'boolean',
				),
				array(
					'label'  => __( 'Color', 'inventory-presser' ),
					'name'   => 'color',
					'sample' => __( 'Merlot Jewel Metallic', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Base Color', 'inventory-presser' ),
					'name'   => 'color_base',
					'sample' => __( 'Red', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Boat Condition', 'inventory-presser' ),
					'name'   => 'condition_boat', // for boats.
					'sample' => __( 'Excellent', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Condition', 'inventory-presser' ),
					'name'   => 'condition',
					'sample' => __( 'Used', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Cylinders', 'inventory-presser' ),
					'name'   => 'cylinders',
					'sample' => 6,
					'type'   => 'integer',
				),
				array(
					'label'  => __( 'Date Entered', 'inventory-presser' ),
					'name'   => 'date_entered',
					'sample' => 'Mon, 24 Feb 2020 08:17:37 -0500',
					'type'   => 'string',
				),
				array(
					'label' => __( 'Dealer ID', 'inventory-presser' ),
					'name'  => 'dealer_id',
					'type'  => 'integer',
				),
				array(
					'label'  => __( 'Description', 'inventory-presser' ),
					'name'   => 'description',
					'sample' => __( 'Clean, non-smoker, must-see!', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Doors', 'inventory-presser' ),
					'name'   => 'doors',
					'sample' => 4,
					'type'   => 'integer',
				),
				array(
					'label'  => __( 'Down Payment', 'inventory-presser' ),
					'name'   => 'down_payment',
					'sample' => 2500,
					'type'   => 'number',
				),
				array(
					'label'  => __( 'Drive Type', 'inventory-presser' ),
					'name'   => 'drive_type',
					'sample' => __( 'Rear Wheel Drive', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label' => __( 'Edmunds Style ID', 'inventory-presser' ),
					'name'  => 'edmunds_style_id',
					'type'  => 'integer',
				),
				array(
					'label'  => __( 'Engine', 'inventory-presser' ),
					'name'   => 'engine',
					'sample' => __( '3.7L 5 cylinder', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( '# of Engines', 'inventory-presser' ),
					'name'   => 'engine_count', // For boats.
					'sample' => 1,
					'type'   => 'integer',
				),
				array(
					'label'  => __( 'Engine Make', 'inventory-presser' ),
					'name'   => 'engine_make', // For boats.
					'sample' => __( 'Yamaha', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Engine Model', 'inventory-presser' ),
					'name'   => 'engine_model', // For boats.
					'sample' => 'F200LB',
					'type'   => 'string',
				),
				array(
					'label' => __( 'Featured', 'inventory-presser' ),
					'name'  => 'featured',
					'type'  => 'boolean',
				),
				array(
					'label'  => __( 'Fuel', 'inventory-presser' ),
					'name'   => 'fuel',
					'sample' => __( 'Gas', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Fuel Economy Name (fuel type 1)', 'inventory-presser' ),
					'name'   => 'fuel_economy_1_name',
					'sample' => __( 'Regular Gasoline', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Fuel Economy Annual Fuel Consumption (fuel type 1)', 'inventory-presser' ),
					'name'   => 'fuel_economy_1_annual_consumption',
					'sample' => __( '13.18 barrels', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Fuel Economy Annual Fuel Cost (fuel type 1)', 'inventory-presser' ),
					'name'   => 'fuel_economy_1_annual_cost',
					'sample' => 1600,
					'type'   => 'number',
				),
				array(
					'label'  => __( 'Fuel Economy Annual Tailpipe CO2 Emissions (fuel type 1)', 'inventory-presser' ),
					'name'   => 'fuel_economy_1_annual_emissions',
					'sample' => __( '355 grams per mile', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Fuel Economy City (fuel type 1)', 'inventory-presser' ),
					'name'   => 'fuel_economy_1_city',
					'sample' => 22,
					'type'   => 'number',
				),
				array(
					'label'  => __( 'Fuel Economy Combined (fuel type 1)', 'inventory-presser' ),
					'name'   => 'fuel_economy_1_combined',
					'sample' => 25,
					'type'   => 'number',
				),
				array(
					'label'  => __( 'Fuel Economy Highway (fuel type 1)', 'inventory-presser' ),
					'name'   => 'fuel_economy_1_highway',
					'sample' => 31,
					'type'   => 'number',
				),
				array(
					'label'  => __( 'Fuel Economy Name (fuel type 2)', 'inventory-presser' ),
					'name'   => 'fuel_economy_2_name',
					'sample' => __( 'Regular Gasoline', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Fuel Economy Annual Fuel Consumption (fuel type 2)', 'inventory-presser' ),
					'name'   => 'fuel_economy_2_annual_consumption',
					'sample' => __( '13.18 barrels', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Fuel Economy Annual Fuel Cost (fuel type 2)', 'inventory-presser' ),
					'name'   => 'fuel_economy_2_annual_cost',
					'sample' => 1600,
					'type'   => 'number',
				),
				array(
					'label'  => __( 'Fuel Economy Annual Tailpipe CO2 Emissions (fuel type 2)', 'inventory-presser' ),
					'name'   => 'fuel_economy_2_annual_emissions',
					'sample' => __( '355 grams per mile', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Fuel Economy City (fuel type 2)', 'inventory-presser' ),
					'name'   => 'fuel_economy_2_city',
					'sample' => 22,
					'type'   => 'number',
				),
				array(
					'label'  => __( 'Fuel Economy Combined (fuel type 2)', 'inventory-presser' ),
					'name'   => 'fuel_economy_2_combined',
					'sample' => 25,
					'type'   => 'number',
				),
				array(
					'label'  => __( 'Fuel Economy Highway (fuel type 2)', 'inventory-presser' ),
					'name'   => 'fuel_economy_2_highway',
					'sample' => 31,
					'type'   => 'number',
				),
				array(
					'label'  => __( 'Fuel Economy Five Year Savings', 'inventory-presser' ),
					'name'   => 'fuel_economy_five_year_savings',
					'sample' => 2250,
					'type'   => 'number',
				),
				array(
					'label' => __( 'Horsepower', 'inventory-presser' ),
					'name'  => 'horsepower', // for boats.
					'type'  => 'integer',
				),
				array(
					'label' => __( 'Hull Material', 'inventory-presser' ),
					'name'  => 'hull_material', // for boats.
					'type'  => 'string',
				),
				array(
					'label'  => __( 'Interior Color', 'inventory-presser' ),
					'name'   => 'interior_color',
					'sample' => __( 'Black', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Last Modified', 'inventory-presser' ),
					'name'   => 'last_modified',
					'sample' => 'Mon, 24 Feb 2020 08:17:37 -0500',
					'type'   => 'string',
				),
				array(
					'label' => __( 'Leads ID', 'inventory-presser' ),
					'name'  => 'leads_id', // dealer id that receives leads.
					'type'  => 'integer',
				),
				array(
					'label' => __( 'Length', 'inventory-presser' ),
					'name'  => 'length', // for boats.
					'type'  => 'string',
				),
				array(
					'label'  => __( 'Location', 'inventory-presser' ),
					'name'   => 'location',
					'sample' => __( '120 Mall Blvd', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Make', 'inventory-presser' ),
					'name'   => 'make',
					'sample' => __( 'GMC', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Max Draft', 'inventory-presser' ),
					'name'   => 'draft', // for boats.
					'sample' => '1\' 0"',
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Model', 'inventory-presser' ),
					'name'   => 'model',
					'sample' => 'Canyon',
					'type'   => 'string',
				),
				array(
					'label'  => __( 'MSRP', 'inventory-presser' ),
					'name'   => 'msrp',
					'sample' => 23905,
					'type'   => 'number',
				),
				array(
					'label' => __( 'NextGear Inspection URL', 'inventory-presser' ),
					'name'  => 'nextgear_inspection_url',
					'type'  => 'string',
				),
				array(
					'label'  => __( 'Odometer', 'inventory-presser' ), // Do not filter this one. It causes infinite loops.
					'name'   => 'odometer',
					'sample' => '102000',
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Options', 'inventory-presser' ),
					'name'   => 'options_array',
					'sample' => __( 'Heated Seats', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Payment', 'inventory-presser' ),
					'name'   => 'payment',
					'sample' => 200,
					'type'   => 'number',
				),
				array(
					'label'  => __( 'Payment Frequency', 'inventory-presser' ),
					'name'   => 'payment_frequency',
					'sample' => __( 'monthly', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Price', 'inventory-presser' ),
					'name'   => 'price',
					'sample' => 13499,
					'type'   => 'number',
				),
				array(
					'label'  => __( 'Propulsion Type', 'inventory-presser' ),
					'name'   => 'propulsion_type',
					'sample' => __( 'Outboard', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Rate', 'inventory-presser' ),
					'name'   => 'rate',
					'sample' => 6.99,
					'type'   => 'number',
				),
				array(
					'label'  => __( 'Stock Number', 'inventory-presser' ),
					'name'   => 'stock_number',
					'sample' => '147907',
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Term', 'inventory-presser' ),
					'name'   => 'term',
					'sample' => 72,
					'type'   => 'integer',
				),
				array(
					'label'  => __( 'Title Status', 'inventory-presser' ),
					'name'   => 'title_status',
					'sample' => __( 'Clean', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Transmission', 'inventory-presser' ),
					'name'   => 'transmission',
					'sample' => __( 'Automatic', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Transmission Speeds', 'inventory-presser' ),
					'name'   => 'transmission_speeds',
					'sample' => '4',
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Trim Level', 'inventory-presser' ),
					'name'   => 'trim',
					'sample' => __( 'SLE-1 Ext. Cab 4WD', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'Type', 'inventory-presser' ),
					'name'   => 'type',
					'sample' => __( 'Passenger Car', 'inventory-presser' ),
					'type'   => 'string',
				),
				array(
					'label'  => __( 'VIN', 'inventory-presser' ),