Make WordPress Core


Ignore:
Timestamp:
05/25/2021 02:19:14 PM (4 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/default-filters.php

    r50973 r51003  
    556556add_action( 'wp_footer', 'wp_maybe_inline_styles', 1 ); // Run for late-loaded styles in the footer.
    557557
     558add_action( 'admin_footer-post.php', 'wp_add_iframed_editor_assets_html' );
     559add_action( 'admin_footer-post-new.php', 'wp_add_iframed_editor_assets_html' );
     560
    558561// Taxonomy.
    559562add_action( 'init', 'create_initial_taxonomies', 0 ); // Highest priority.
     
    634637add_filter( 'user_has_cap', 'wp_maybe_grant_site_health_caps', 1, 4 );
    635638
     639// Block Templates CPT and Rendering
     640add_filter( 'render_block_context', '_block_template_render_without_post_block_context' );
     641add_filter( 'pre_wp_unique_post_slug', 'wp_filter_wp_template_unique_post_slug', 10, 5 );
     642add_action( 'wp_footer', 'the_block_template_skip_link' );
     643
    636644unset( $filter, $action );
Note: See TracChangeset for help on using the changeset viewer.