diff --git a/wp-includes/class-walker-category.php b/wp-includes/class-walker-category.php index 6df6431b6b..7b13264b95 100644 --- a/wp-includes/class-walker-category.php +++ b/wp-includes/class-walker-category.php @@ -204,8 +204,9 @@ class Walker_Category extends Walker { * @param array $args An array of wp_list_categories() arguments. */ $css_classes = implode( ' ', apply_filters( 'category_css_class', $css_classes, $category, $depth, $args ) ); + $css_classes = $css_classes ? ' class="' . esc_attr( $css_classes ) . '"' : ''; - $output .= ' class="' . $css_classes . '"'; + $output .= $css_classes; $output .= ">$link\n"; } elseif ( isset( $args['separator'] ) ) { $output .= "\t$link" . $args['separator'] . "\n"; diff --git a/wp-includes/version.php b/wp-includes/version.php index 94638ed237..26589f5cd3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-alpha-44413'; +$wp_version = '5.1-alpha-44414'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.