Escape all at the same time

This commit is contained in:
Claudio Sanches 2018-04-17 12:54:01 -03:00
parent f18220a009
commit a7ce4ff6d3
1 changed files with 1 additions and 1 deletions

View File

@ -651,7 +651,7 @@ function wc_get_product_class( $class = '', $product_id = null ) {
* @param int|WP_Post|WC_Product $product_id Product ID or product object. * @param int|WP_Post|WC_Product $product_id Product ID or product object.
*/ */
function wc_product_class( $class = '', $product_id = null ) { function wc_product_class( $class = '', $product_id = null ) {
echo 'class="' . join( ' ', array_map( 'esc_attr', wc_get_product_class( $class, $product_id ) ) ) . '"'; echo 'class="' . esc_attr( join( ' ', wc_get_product_class( $class, $product_id ) ) ) . '"';
} }
/** /**