public function renderRevisionsTable( $slug, $post_id ) {

		$args = [
			'posts_per_page' => 10,
			'post_type' => 'revision',
			'post_status' => 'inherit',
			'post_parent' => $post_id,
			'orderby' => 'date',
			'order' => 'DESC',
		];

		$q = new \WP_Query();
		$results = $q->query( $args );

		$html = '<table class="widefat fixed">';
		$html .= '<thead><tr><th>' . __( 'Last 10 Revisions', 'pressbooks' ) . ' <em>(' . $this->supported[ $slug ] . ')</em> </th></tr></thead><tbody>';
		foreach ( $results as $post ) {
			$html .= '<tr><td>' . wp_post_revision_title( $post ) . ' ';
			$html .= __( 'by', 'pressbooks' ) . ' ' . get_userdata( $post->post_author )->user_login . '</td></tr>';
		}
		$html .= '</tbody></table>';

		return $html;
	}
public function renderRevisionsTable( $slug, $post_id ) {

		$args = [
			'posts_per_page' => 10,
			'post_type' => 'revision',
			'post_status' => 'inherit',
			'post_parent' => $post_id,
			'orderby' => 'date',
			'order' => 'DESC',
		];

		$q = new \WP_Query();
		$results = $q->query( $args );

		$html = '<table class="widefat fixed">';
		$html .= '<thead><tr><th>' . __( 'Last 10 Revisions', 'pressbooks' ) . ' <em>(' . $this->supported[ $slug ] . ')</em> </th></tr></thead><tbody>';
		foreach ( $results as $post ) {
			$html .= '<tr><td>' . wp_post_revision_title( $post ) . ' ';
			$html .= __( 'by', 'pressbooks' ) . ' ' . get_userdata( $post->post_author )->user_login . '</td></tr>';
		}
		$html .= '</tbody></table>';

		return $html;
	}
public function renderRevisionsTable ( $ slug , $ post_id ) { $ args = [ 'posts_per_page' => 10 , 'post_type' => 'revision' , 'post_status' => 'inherit' , 'post_parent' => $ post_id , 'orderby' => 'date' , 'order' => 'DESC' , ] ; $ q = new \ WP_Query ( ) ; $ results = $ q -> query ( $ args ) ; $ html = '<table class="widefat fixed">' ; $ html .= '<thead><tr><th>' . __ ( 'Last 10 Revisions' , 'pressbooks' ) . ' <em>(' . $ this -> supported [ $ slug ] . ')</em> </th></tr></thead><tbody>' ; foreach ( $ results as $ post ) { $ html .= '<tr><td>' . wp_post_revision_title ( $ post ) . ' ' ; $ html .= __ ( 'by' , 'pressbooks' ) . ' ' . get_userdata ( $ post -> post_author ) -> user_login . '</td></tr>' ; } $ html .= '</tbody></table>' ; return $ html ; }
Render table for revisions.

@param string $slug
@param int $post_id

@return string
Render table for revisions .