AnsPress_Tag::ap_list_filters( $filters )

Description #

Add tags sorting in list filters

Source #

File: addons/free/tag.php

	public static function ap_list_filters( $filters ) {
		global $wp;

		if ( ! isset( $wp->query_vars['ap_tags'] ) ) {
			$filters['qtag'] = array(
				'title'    => __( 'Tag', 'anspress-question-answer' ),
				'search'   => true,
				'multiple' => true,
			);
		}

		if ( 'tags' === ap_current_page() ) {
			return array( 'tags_order' => array(
				'title'    => __( 'Order', 'anspress-question-answer' ),
			) );
		}

		return $filters;
	}

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