BBP_Admin::suggest_reply()

Ajax action for facilitating the reply auto-suggest

Description

Source

File: bp-forums/admin/admin.php

	public function suggest_reply() {

		$html = '<option value="0">'.esc_html__('-- Select Reply --','buddyboss').'</option>';

		$posts  = get_posts( array(
			'post_type'          => bbp_get_reply_post_type(),
			'post_status'        => 'publish',
			'post_parent'        => $_POST['post_parent'],
			'numberposts'        => -1,
			'orderby'            => 'title',
			'order'              => 'ASC',
			'walker'             => '',
		) );

		add_filter( 'list_pages', 'bbp_reply_attributes_meta_box_discussion_reply_title', 99, 2 );
		$html .= walk_page_dropdown_tree( $posts, 0);
		remove_filter( 'list_pages', 'bbp_reply_attributes_meta_box_discussion_reply_title', 99, 2  );

		echo $html;
		wp_die();
	}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.