Inventory_Presser_Plugin::register_widgets()

register_widgets


Description Description

Registers every widget that ships with this plugin.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: inventory-presser.php

	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( "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_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' );
		/**
		 * The query needs to be altered for the Maximum Price Filters widget.
		 */
		if ( ! is_admin() && isset( $_GET['max_price'] ) )
		{
			add_action( 'pre_get_posts', array( $this, 'modify_query_for_max_price' ), 99, 1 );
		}
	}