Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Allow additional CSS classes attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Aljullu committed Jul 2, 2019
1 parent b71af2e commit 5df7338
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/BlockTypes/ReviewsByProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class ReviewsByProduct extends AbstractDynamicBlock {
*/
protected function get_attributes() {
return array(
'className' => $this->get_schema_string(),
'editMode' => $this->get_schema_boolean( true ),
'editMode' => $this->get_schema_boolean( true ),
'orderby' => $this->get_schema_reviews_orderby(),
'reviewsShown' => $this->get_schema_number( 10 ),
Expand Down Expand Up @@ -163,6 +165,6 @@ public function render( $attributes = array(), $content = '' ) {
if ( ! $this->attributes['showReviewerPicture'] ) {
add_action( 'woocommerce_review_before', 'woocommerce_review_display_gravatar', 10 );
}
return '<div id="reviews"><ol class="commentlist">' . $list_comments . '</ol></div>';
return '<div class="' . $this->attributes['className'] . '"><ul>' . $list_comments . '</ul></div>';
}
}

0 comments on commit 5df7338

Please sign in to comment.