Categories::__construct()

Description #

Initialize the class.

Changelog #

VersionDescription
4.2.1Introduced.

Source #

File: addons/categories/categories.php

	protected function __construct() {
		ap_register_page( 'category', __( 'Category', 'anspress-question-answer' ), array( $this, 'category_page' ), false );
		ap_register_page( 'categories', __( 'Categories', 'anspress-question-answer' ), array( $this, 'categories_page' ) );

		anspress()->add_action( 'init', $this, 'register_question_categories', 1 );
		anspress()->add_action( 'ap_settings_menu_features_groups', $this, 'load_options' );
		anspress()->add_filter( 'ap_form_options_features_category', $this, 'register_general_settings_form' );
		anspress()->add_action( 'admin_enqueue_scripts', $this, 'admin_enqueue_scripts' );
		anspress()->add_action( 'ap_load_admin_assets', $this, 'ap_load_admin_assets' );
		anspress()->add_action( 'ap_admin_menu', $this, 'admin_category_menu' );
		anspress()->add_action( 'ap_display_question_metas', $this, 'ap_display_question_metas', 10, 2 );
		anspress()->add_action( 'ap_enqueue', $this, 'ap_assets_js' );
		anspress()->add_filter( 'term_link', $this, 'term_link_filter', 10, 3 );
		anspress()->add_action( 'ap_question_form_fields', $this, 'ap_question_form_fields' );
		anspress()->add_action( 'save_post_question', $this, 'after_new_question', 0, 2 );
		anspress()->add_filter( 'ap_breadcrumbs', $this, 'ap_breadcrumbs' );
		anspress()->add_action( 'terms_clauses', $this, 'terms_clauses', 10, 3 );
		anspress()->add_filter( 'ap_list_filters', $this, 'ap_list_filters' );
		anspress()->add_action( 'question_category_add_form_fields', $this, 'image_field_new' );
		anspress()->add_action( 'question_category_edit_form_fields', $this, 'image_field_edit' );
		anspress()->add_action( 'create_question_category', $this, 'save_image_field' );
		anspress()->add_action( 'edited_question_category', $this, 'save_image_field' );
		anspress()->add_action( 'ap_rewrites', $this, 'rewrite_rules', 10, 3 );
		anspress()->add_filter( 'ap_main_questions_args', $this, 'ap_main_questions_args' );
		anspress()->add_filter( 'ap_question_subscribers_action_id', $this, 'subscribers_action_id' );
		anspress()->add_filter( 'ap_ask_btn_link', $this, 'ap_ask_btn_link' );
		anspress()->add_filter( 'wp_head', $this, 'category_feed' );
		anspress()->add_filter( 'manage_edit-question_category_columns', $this, 'column_header' );
		anspress()->add_filter( 'manage_question_category_custom_column', $this, 'column_content', 10, 3 );
		anspress()->add_filter( 'ap_current_page', $this, 'ap_current_page' );
		anspress()->add_action( 'posts_pre_query', $this, 'modify_query_category_archive', 9999, 2 );

		// List filtering.
		anspress()->add_action( 'ap_ajax_load_filter_category', $this, 'load_filter_category' );
		anspress()->add_filter( 'ap_list_filter_active_category', $this, 'filter_active_category', 10, 2 );

		anspress()->add_action( 'widgets_init', $this, 'widget' );
	}

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