AnsPress_Category::init()
Description #
Initialize the class.
Source #
File: addons/free/category.php
public static function init() { SELF::includes(); ap_register_page( 'category', __( 'Category', 'anspress-question-answer' ), array( __CLASS__, 'category_page' ), false ); ap_register_page( 'categories', __( 'Categories', 'anspress-question-answer' ), array( __CLASS__, 'categories_page' ) ); anspress()->add_action( 'init', __CLASS__, 'register_question_categories', 1 ); anspress()->add_action( 'ap_form_addon-free_category', __CLASS__, 'load_options' ); anspress()->add_action( 'admin_enqueue_scripts', __CLASS__, 'admin_enqueue_scripts' ); anspress()->add_action( 'ap_load_admin_assets', __CLASS__, 'ap_load_admin_assets' ); anspress()->add_action( 'ap_admin_menu', __CLASS__, 'admin_category_menu' ); anspress()->add_action( 'ap_display_question_metas', __CLASS__, 'ap_display_question_metas', 10, 2 ); anspress()->add_action( 'ap_assets_js', __CLASS__, 'ap_assets_js' ); anspress()->add_filter( 'term_link', __CLASS__, 'term_link_filter', 10, 3 ); anspress()->add_action( 'ap_question_form_fields', __CLASS__, 'ap_question_form_fields' ); anspress()->add_action( 'save_post_question', __CLASS__, 'after_new_question', 0, 2 ); anspress()->add_filter( 'ap_breadcrumbs', __CLASS__, 'ap_breadcrumbs' ); anspress()->add_action( 'terms_clauses', __CLASS__, 'terms_clauses', 10, 3 ); anspress()->add_filter( 'ap_list_filters', __CLASS__, 'ap_list_filters' ); anspress()->add_action( 'question_category_add_form_fields', __CLASS__, 'image_field_new' ); anspress()->add_action( 'question_category_edit_form_fields', __CLASS__, 'image_field_edit' ); anspress()->add_action( 'create_question_category', __CLASS__, 'save_image_field' ); anspress()->add_action( 'edited_question_category', __CLASS__, 'save_image_field' ); anspress()->add_action( 'ap_rewrites', __CLASS__, 'rewrite_rules', 10, 3 ); anspress()->add_filter( 'ap_main_questions_args', __CLASS__, 'ap_main_questions_args' ); anspress()->add_filter( 'ap_question_subscribers_action_id', __CLASS__, 'subscribers_action_id' ); anspress()->add_filter( 'ap_ask_btn_link', __CLASS__, 'ap_ask_btn_link' ); //anspress()->add_filter( 'ap_canonical_url', __CLASS__, 'ap_canonical_url' ); anspress()->add_filter( 'wp_head', __CLASS__, 'category_feed' ); anspress()->add_filter( 'manage_edit-question_category_columns', __CLASS__, 'column_header' ); anspress()->add_filter( 'manage_question_category_custom_column', __CLASS__, 'column_content', 10, 3 ); anspress()->add_filter( 'ap_current_page', __CLASS__, 'ap_current_page' ); anspress()->add_action( 'posts_pre_query', __CLASS__, 'modify_query_category_archive', 9999, 2 ); // List filtering. anspress()->add_action( 'ap_ajax_load_filter_category', __CLASS__, 'load_filter_category' ); anspress()->add_filter( 'ap_list_filter_active_category', __CLASS__, 'filter_active_category', 10, 2 ); }
Expand full source code Collapse full source code View on GitHub: addons/free/category.php:35
Add your comment