Tags::page_title( string $title )

Description #

Tags page title.

Parameters #

  • $title
    string (Required) Title.

Source #

File: addons/tags/tags.php

	public function page_title( $title ) {
		if ( is_question_tags() ) {
			$title = ap_opt( 'tags_page_title' );
		} elseif ( is_question_tag() ) {
			$tag_id = sanitize_title( get_query_var( 'q_tag' ) );
			$tag    = $tag_id ? get_term_by( 'slug', $tag_id, 'question_tag' ) : get_queried_object();

			if ( $tag ) {
				$title = $tag->name;
			}
		}

		return $title;
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment