BBP_Admin::suggest_topic()
Ajax action for facilitating the discussion auto-suggest
Description
Source
File: bp-forums/admin/admin.php
633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 | public function suggest_topic() { $html = '<option value="0">' .esc_html__( '-- Select Discussion --' , 'buddyboss' ). '</option>' ; $posts = get_posts( array ( 'post_type' => bbp_get_topic_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
Version | Description |
---|---|
bbPress (r4261) | 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.