bbp_topic_replies_metabox( object $topic = false )

Output the topic replies meta-box


Description Description


Parameters Parameters

$topic

(Optional)

Default value: false


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/admin/metaboxes.php

function bbp_topic_replies_metabox( $topic = false ) {

	// Bail if no topic to load replies for
	if ( empty( $topic ) ) {
		return;
	}

	// Pull in the list table class
	if ( ! class_exists( 'BBP_Topic_Replies_List_Table' ) ) {
		require_once bbp_admin()->admin_dir . '/classes/class-bbp-topic-replies-list-table.php';
	}

	// Look for pagination value
	$page = isset( $_REQUEST['page'] )
		? (int) $_REQUEST['page']
		: 0;

	// Load up the list table
	$replies_list_table = new BBP_Topic_Replies_List_Table();
	$replies_list_table->prepare_items( $topic->ID ); ?>

	<form id="bbp-topic-replies" method="get">
		<input type="hidden" name="page" value="<?php echo esc_attr( $page ); ?>" />

		<?php $replies_list_table->display(); ?>
	</form>

	<?php
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.