AnsPress_Tag::term_link_filter( string $url, array $term, string $taxonomy )
Description #
Filter tag term link.
Parameters #
- $urlstring (Required) Default URL of taxonomy.
- $termarray (Required) Term array.
- $taxonomystring (Required) Taxonomy type.
Source #
File: addons/free/tag.php
public static function term_link_filter( $url, $term, $taxonomy ) { if ( 'question_tag' === $taxonomy ) { if ( get_option( 'permalink_structure' ) != '' ) { $opt = get_option( 'ap_tags_path', 'tags' ); return home_url( $opt ) . '/' . $term->slug . '/'; } else { return add_query_arg( [ 'ap_page' => 'tag', 'question_tag' => $term->slug ], home_url() ); } } return $url; }
Expand full source code Collapse full source code View on GitHub: addons/free/tag.php:331
Add your comment