Inventory_Presser_Plugin::change_term_links( string $termlink, object $term )
Change links to terms in our taxonomies to include /inventory before /tax/term.
On This Page
Parameters Parameters
- $termlink
-
(string) (Required) URL to modify.
- $term
-
(object) (Required) An instance of the WP_Term class.
Return Return
(string) A modified term link that has our post type slug prepended.
Source Source
File: inventory-presser.php
global $wpdb; return str_replace( "{$wpdb->postmeta}.meta_value+0", "REPLACE( {$wpdb->postmeta}.meta_value, ',', '' )+0", $orderby ); } /** * Action hook callback that adds rewrite rules to the global $wp_rewrite. * These rewrite rules are what power URLs like /inventory/make/subaru. * * @return void */ public function add_pretty_search_urls() { global $wp_rewrite; $wp_rewrite->rules = $this->generate_rewrite_rules( INVP::POST_TYPE ) + $wp_rewrite->rules; } /** * Change links to terms in our taxonomies to include /inventory before * /tax/term.
Expand full source codeCollapse full source codeView on Github