Skip to content

Commit

Permalink
Make wp_theme taxonomy registration unconditional
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed May 25, 2021
1 parent 3471404 commit cba7648
Showing 1 changed file with 18 additions and 20 deletions.
38 changes: 18 additions & 20 deletions src/wp-includes/taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,26 +173,24 @@ function create_initial_taxonomies() {
)
);

if ( current_theme_supports( 'block-templates' ) ) {
register_taxonomy(
'wp_theme',
array( 'wp_template' ),
array(
'public' => false,
'hierarchical' => false,
'labels' => array(
'name' => __( 'Themes' ),
'singular_name' => __( 'Theme' ),
),
'query_var' => false,
'rewrite' => false,
'show_ui' => false,
'_builtin' => true,
'show_in_nav_menus' => false,
'show_in_rest' => false,
)
);
}
register_taxonomy(
'wp_theme',
array( 'wp_template' ),
array(
'public' => false,
'hierarchical' => false,
'labels' => array(
'name' => __( 'Themes' ),
'singular_name' => __( 'Theme' ),
),
'query_var' => false,
'rewrite' => false,
'show_ui' => false,
'_builtin' => true,
'show_in_nav_menus' => false,
'show_in_rest' => false,
)
);
}

/**
Expand Down

0 comments on commit cba7648

Please sign in to comment.