Merge pull request #7552 from NickIvanter/patch-6

Allow custom CSS classes to be specified for [product] shortcode
This commit is contained in:
Mike Jolley 2015-03-02 09:55:49 +00:00
commit 8a42ed06f1
1 changed files with 8 additions and 1 deletions

View File

@ -466,7 +466,14 @@ class WC_Shortcodes {
wp_reset_postdata();
return '<div class="woocommerce">' . ob_get_clean() . '</div>';
$css_class = 'woocommerce';
if ( isset( $atts['class'] ) ) {
$css_class .= ' ' . $atts['class'];
}
return '<div class="' . esc_attr( $css_class ) . '">' . ob_get_clean() . '</div>';
}
/**