AnsPress_Tag::init()
Description #
Initialize the class
Source #
File: addons/free/tag.php
public static function init() { ap_register_page( 'tag', __( 'Tag', 'anspress-question-answer' ), [ __CLASS__, 'tag_page' ], false ); ap_register_page( 'tags', __( 'Tags', 'anspress-question-answer' ), [ __CLASS__, 'tags_page' ] ); anspress()->add_action( 'ap_form_addon-free_tag', __CLASS__, 'option_fields' ); anspress()->add_action( 'widgets_init', __CLASS__, 'widget_positions' ); anspress()->add_action( 'init', __CLASS__, 'register_question_tag', 1 ); anspress()->add_action( 'ap_admin_menu', __CLASS__, 'admin_tags_menu' ); anspress()->add_action( 'ap_display_question_metas', __CLASS__, 'ap_display_question_metas', 10, 2 ); anspress()->add_action( 'ap_question_info', __CLASS__, 'ap_question_info' ); anspress()->add_action( 'ap_assets_js', __CLASS__, 'ap_assets_js' ); anspress()->add_action( 'ap_enqueue', __CLASS__, 'ap_localize_scripts' ); 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( 'ap_processed_new_question', __CLASS__, 'after_new_question', 0, 2 ); anspress()->add_action( 'ap_processed_update_question', __CLASS__, 'after_new_question', 0, 2 ); anspress()->add_filter( 'ap_page_title', __CLASS__, 'page_title' ); anspress()->add_filter( 'ap_breadcrumbs', __CLASS__, 'ap_breadcrumbs' ); anspress()->add_action( 'wp_ajax_ap_tags_suggestion', __CLASS__, 'ap_tags_suggestion' ); anspress()->add_action( 'wp_ajax_nopriv_ap_tags_suggestion', __CLASS__, 'ap_tags_suggestion' ); 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_current_page', __CLASS__, 'ap_current_page' ); anspress()->add_action( 'posts_pre_query', __CLASS__, 'modify_query_archive', 9999, 2 ); // List filtering. anspress()->add_filter( 'ap_list_filters', __CLASS__, 'ap_list_filters' ); anspress()->add_action( 'ap_ajax_load_filter_qtag', __CLASS__, 'load_filter_tag' ); anspress()->add_action( 'ap_ajax_load_filter_tags_order', __CLASS__, 'load_filter_tags_order' ); anspress()->add_filter( 'ap_list_filter_active_qtag', __CLASS__, 'filter_active_tag', 10, 2 ); anspress()->add_filter( 'ap_list_filter_active_tags_order', __CLASS__, 'filter_active_tags_order', 10, 2 ); }
Expand full source code Collapse full source code View on GitHub: addons/free/tag.php:33
Add your comment