Deprecated

This function has been deprecated.

ap_current_page_is()

Description #

Return current AnsPress page

Changelog #

VersionDescription
4.1.0Introduced.

Source #

File: includes/deprecated.php

function ap_current_page_is() {
	_deprecated_function( __FUNCTION__, '4.1.0' );

	if ( is_anspress() ) {
		if ( is_question() ) {
			$template = 'question';
		} elseif ( is_ask() ) {
			$template = 'ask';
		} elseif ( is_question_categories() ) {
			$template = 'categories';
		} elseif ( is_question_category() ) {
			$template = 'category';
		} elseif ( is_ap_search() ) {
			$template = 'search';
		} elseif ( get_query_var( 'ap_page' ) == '' ) {
			$template = 'base';
		} else {
			$template = 'not-found';
		}

		return apply_filters( 'ap_current_page_is', $template );
	}

	return false;
}

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