Vehicle_URLs_By_VIN::add_vin_rewrite_rule( array $rules )
Adds a rewrite rule to redirect URLs like https://demo.inventorypresser.com/vin/JM1NB354940406328/
On This Page
Parameters Parameters
- $rules
-
(array) (Required) An array of rewrite rules.
Return Return
(array)
Source Source
File: includes/class-vehicle-urls-by-vin.php
public function add_vin_rewrite_rule( $rules ) { // Allow VINs as short as five digits because classic cars. $rules['^vin/([A-Z0-9]{5,17})/?$'] = 'index.php?vin=$matches[1]'; return $rules; }
Expand full source codeCollapse full source codeView on Github