AnsPress_BP_Hooks::init()

Description #

Initialize the class

Changelog #

VersionDescription
2.0.1Introduced.

Source #

File: addons/free/buddypress.php

	public static function init() {
		add_post_type_support( 'question', 'buddypress-activity' );
		add_post_type_support( 'answer', 'buddypress-activity' );

		anspress()->add_action( 'bp_init', __CLASS__, 'bp_init' );
		anspress()->add_action( 'ap_assets_js', __CLASS__, 'ap_assets_js' );
		// anspress()->add_action( 'ap_enqueue', 'bp_activity_mentions_script' );
		anspress()->add_action( 'bp_setup_nav', __CLASS__, 'content_setup_nav' );
		anspress()->add_action( 'bp_init', __CLASS__, 'question_answer_tracking' );
		anspress()->add_action( 'bp_activity_entry_meta', __CLASS__, 'activity_buttons' );
		anspress()->add_filter( 'bp_activity_custom_post_type_post_action', __CLASS__, 'activity_action', 10, 2 );

		anspress()->add_filter( 'ap_the_question_content', __CLASS__, 'ap_the_question_content' );
		anspress()->add_action( 'bp_setup_globals', __CLASS__, 'notifier_setup_globals' );
		anspress()->add_action( 'ap_after_new_answer', __CLASS__, 'new_answer_notification' );
		anspress()->add_action( 'ap_publish_comment', __CLASS__, 'new_comment_notification' );
		anspress()->add_action( 'ap_trash_question', __CLASS__, 'remove_answer_notify' );
		//anspress()->add_action( 'ap_trash_question', __CLASS__, 'remove_comment_notify' );
		anspress()->add_action( 'ap_trash_answer', __CLASS__, 'remove_answer_notify' );
		anspress()->add_action( 'ap_trash_answer', __CLASS__, 'remove_comment_notify' );
		anspress()->add_action( 'ap_unpublish_comment', __CLASS__, 'remove_comment_notify' );
		anspress()->add_action( 'before_delete_post', __CLASS__, 'remove_answer_notify' );
		//anspress()->add_action( 'before_delete_post', __CLASS__, 'remove_comment_notify' );
		anspress()->add_action( 'the_post', __CLASS__, 'mark_bp_notify_as_read' );

		anspress()->add_action( 'ap_ajax_bp_loadmore', __CLASS__, 'bp_loadmore' );
	}

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