Categories::ap_ask_btn_link( string $link )

Description #

Filter ask button link to append current category link.

Parameters #

  • $link
    string (Required) Ask button link.

Source #

File: addons/categories/categories.php

	public function ap_ask_btn_link( $link ) {
		if ( is_question_category() ) {
			$question_category = get_queried_object();
			return $link . '?category=' . $question_category->term_id;
		}

		return $link;
	}

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