BBP_Walker_Reply::start_el( $output,  $object,  $depth,  $args = array(),  $current_object_id )


Description Description

See also See also


Top ↑

Source Source

File: includes/common/classes.php

	public function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) {

		// Set up reply
		$depth++;
		bbpress()->reply_query->reply_depth = (int) $depth;
		bbpress()->reply_query->post        = $object;
		bbpress()->current_reply_id         = $object->ID;

		// Check for a callback and use it if specified
		if ( ! empty( $args['callback'] ) ) {
			ob_start();
			call_user_func( $args['callback'], $object, $args, $depth );
			$output .= ob_get_clean();
			return;
		}

		// Style for div or list element
		if ( ! empty( $args['style'] ) && ( 'div' === $args['style'] ) ) {
			$output .= "<div>\n";
		} else {
			$output .= "<li>\n";
		}

		$output .= bbp_buffer_template_part( 'loop', 'single-reply', false );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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