AnsPress_Tag::ap_breadcrumbs( array $navs )
Description #
Hook into AnsPress breadcrums to show tags page.
Parameters #
- $navsarray (Required) Breadcrumbs navs.
Source #
File: addons/free/tag.php
public static function ap_breadcrumbs( $navs ) { if ( is_question_tag() ) { $tag_id = sanitize_title( get_query_var( 'q_tag' ) ); $tag = get_term_by( 'slug', $tag_id, 'question_tag' ); // @codingStandardsIgnoreLine. $navs['page'] = array( 'title' => __( 'Tags', 'anspress-question-answer' ), 'link' => ap_get_link_to( 'tags' ), 'order' => 8 ); if ( $tag ) { $navs['tag'] = array( 'title' => $tag->name, 'link' => get_term_link( $tag, 'question_tag' ), // @codingStandardsIgnoreLine. 'order' => 8, ); } } elseif ( is_question_tags() ) { $navs['page'] = array( 'title' => __( 'Tags', 'anspress-question-answer' ), 'link' => ap_get_link_to( 'tags' ), 'order' => 8 ); } return $navs; }
Expand full source code Collapse full source code View on GitHub: addons/free/tag.php:418
Add your comment