Method: Generate every possible combination of rewrite rules, including paging, based on post type taxonomy
Read MoreInventory_Presser_Plugin::get_last_word()
Method: Given a string, return the last word.
Read MoreInventory_Presser_Plugin::hooks()
Method: This is the driver function of the entire plugin. Includes dependencies and adds all hooks.
Read MoreInventory_Presser_Plugin::include_dependencies()
Method: Includes all the includes! This function loads all the other PHP files that contain this plugin’s code.
Read MoreInventory_Presser_Plugin::include_scripts_and_styles()
Method: Registers JavaScripts and stylesheets for front-end users and dashboard users. Includes some inline styles and scripts depending on the plugin settings and page request.
Read MoreInventory_Presser_Plugin
Inventory_Presser_Plugin::add_orderby_to_query()
Method: Filter callback that adds an ORDER BY clause to the main query when a user requests a list of vehicles.
Read MoreInventory_Presser_Plugin::change_order_by_for_odometer()
Method: Removes commas from the meta value used in the ORDER BY of the query so that odometer values can be sorted as numbers instead of strings.
Read Moreinvp_unprefix_meta_key
Filter Hook: Maybe append to the meta_query if it is already set. If we are sorting by make, then we want to also add a secondary sort of model and a tertiary sort of trim. That’s what users want. Apply the same logic to sorts by year and model.
Read Moreinvp_prefix_meta_key
Filter Hook: Determine if this meta field should be sorted as a number 1. Parse out the meta key name from $pieces[‘where’] 2. Run it through INVP::meta_value_is_number
Read More