Make sure there is a name, otherwise the taxonomy + base will conflict with other post types if empty

This commit is contained in:
Mike Jolley 2017-04-06 17:50:04 +01:00
parent f3156fb5f4
commit 56eb3c4da3
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ class WC_Post_types {
),
);
if ( 1 === $tax->attribute_public ) {
if ( 1 === $tax->attribute_public && sanitize_title( $tax->attribute_name ) ) {
$taxonomy_data['rewrite'] = array(
'slug' => trailingslashit( $permalinks['attribute_rewrite_slug'] ) . sanitize_title( $tax->attribute_name ),
'with_front' => false,