Make WordPress Core


Ignore:
Timestamp:
05/25/2021 02:19:14 PM (5 years ago)
Author:
youknowriad
Message:

Block Editor: Introduce block templates for classic themes.

With this patch, users will be able to create custom block based templates
and assign them to specific pages/posts.

Themes can also opt-out of this feature

Props bernhard-reiter, carlomanf.
Fixes #53176.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r50935 r51003  
    171171                        '_builtin'          => true,
    172172                        'show_in_nav_menus' => current_theme_supports( 'post-formats' ),
     173                )
     174        );
     175
     176        register_taxonomy(
     177                'wp_theme',
     178                array( 'wp_template' ),
     179                array(
     180                        'public'            => false,
     181                        'hierarchical'      => false,
     182                        'labels'            => array(
     183                                'name'          => __( 'Themes' ),
     184                                'singular_name' => __( 'Theme' ),
     185                        ),
     186                        'query_var'         => false,
     187                        'rewrite'           => false,
     188                        'show_ui'           => false,
     189                        '_builtin'          => true,
     190                        'show_in_nav_menus' => false,
     191                        'show_in_rest'      => false,
    173192                )
    174193        );
Note: See TracChangeset for help on using the changeset viewer.