Inventory_Presser_Plugin::register_meta_fields()

Registers all meta fields our custom post type uses to define a vehicle and its attachments.


Return

(void)


Source

File: inventory-presser.php

			// Add meta fields to attachments.
			foreach ( $attachment_keys as $key_arr ) {
				$key = apply_filters( 'invp_prefix_meta_key', $key_arr['name'] );
				register_post_meta(
					'attachment',
					$key,
					array(
						'sanitize_callback' => 'sanitize_text_field',
						'show_in_rest'      => true,
						'single'            => true,
						'type'              => $key_arr['type'],
					)
				);
			}
		}

		/**
		 * Registers every widget that ships with this plugin.
		 *
		 * @return void
		 */
		public function register_widgets() {
			/**
			 * Make a widget available to sort vehicles by post meta fields.
			 * Or, enable order by year, make, price, odometer, etc.
			 */
			register_widget( 'Inventory_Presser_Order_By_Widget' );

			/**
			 * Make a widget available to show EPA Fuel Economy data
			 */
			register_widget( 'Inventory_Presser_Fuel_Economy_Widget' );

			/**
			 * Make a widget available to embed a Google map pointed at one of
			 * the addresses in our location taxonomy.
			 */
			register_widget( 'Inventory_Presser_Google_Maps_Widget' );
			register_widget( 'Inventory_Presser_Google_Maps_Widget_V3' );
			register_widget( 'Inventory_Presser_Map_Widget' );

			register_widget( 'Inventory_Presser_Carfax_Widget' );
			register_widget( 'Inventory_Presser_Grid' );
			register_widget( 'Inventory_Presser_KBB_Widget' );
			register_widget( 'Inventory_Presser_Location_Address' );
			register_widget( 'Inventory_Presser_Location_Hours' );
			register_widget( 'Inventory_Presser_Location_Phones' );
			register_widget( 'Inventory_Presser_Slider' );
			register_widget( 'Inventory_Presser_Maximum_Price_Filter' );