Tags::ap_list_filters( array $filters )

Description #

Add tags sorting in list filters

Parameters #

  • $filters
    array (Required) Filters.

Source #

File: addons/tags/tags.php

	public 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