mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-30 07:20:01 +01:00
Bundled Themes: Avoid loading translations too early.
Load block patterns for bundled themes on the `init` hook to avoid triggering notices caused by loading the translations too early. The change is applied to Twenty Ten, Twenty Twelve, Twenty Thirteen, Twenty Fourteen, Twenty Fifteen, Twenty Sixteen and Twenty Twenty. Props domainsupport, swissspidy. Fixes #62237. See #44937. Built from https://develop.svn.wordpress.org/trunk@59244 git-svn-id: http://core.svn.wordpress.org/trunk@58636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
172d5084a4
commit
3c5699206b
@ -657,8 +657,12 @@ require get_template_directory() . '/inc/template-tags.php';
|
|||||||
require get_template_directory() . '/inc/customizer.php';
|
require get_template_directory() . '/inc/customizer.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Block Patterns.
|
* Register block patterns and pattern categories.
|
||||||
*
|
*
|
||||||
* @since Twenty Fifteen 3.0
|
* @since Twenty Fifteen 3.9
|
||||||
*/
|
*/
|
||||||
require get_template_directory() . '/inc/block-patterns.php';
|
function twentyfifteen_register_block_patterns() {
|
||||||
|
require get_template_directory() . '/inc/block-patterns.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'init', 'twentyfifteen_register_block_patterns' );
|
||||||
|
@ -728,8 +728,16 @@ require get_template_directory() . '/inc/template-tags.php';
|
|||||||
// Add Customizer functionality.
|
// Add Customizer functionality.
|
||||||
require get_template_directory() . '/inc/customizer.php';
|
require get_template_directory() . '/inc/customizer.php';
|
||||||
|
|
||||||
// Add support for block patterns.
|
/**
|
||||||
require get_template_directory() . '/inc/block-patterns.php';
|
* Register block patterns and pattern categories.
|
||||||
|
*
|
||||||
|
* @since Twenty Fourteen 4.1
|
||||||
|
*/
|
||||||
|
function twentyfourteen_register_block_patterns() {
|
||||||
|
require get_template_directory() . '/inc/block-patterns.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'init', 'twentyfourteen_register_block_patterns' );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add Featured Content functionality.
|
* Add Featured Content functionality.
|
||||||
|
@ -384,6 +384,12 @@ require get_template_directory() . '/inc/template-tags.php';
|
|||||||
require get_template_directory() . '/inc/customizer.php';
|
require get_template_directory() . '/inc/customizer.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Block Patterns.
|
* Register block patterns and pattern categories.
|
||||||
|
*
|
||||||
|
* @since Twenty Nineteen 3.0
|
||||||
*/
|
*/
|
||||||
require get_template_directory() . '/inc/block-patterns.php';
|
function twentynineteen_register_block_patterns() {
|
||||||
|
require get_template_directory() . '/inc/block-patterns.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'init', 'twentynineteen_register_block_patterns' );
|
||||||
|
@ -737,6 +737,12 @@ require get_parent_theme_file_path( '/inc/customizer.php' );
|
|||||||
require get_parent_theme_file_path( '/inc/icon-functions.php' );
|
require get_parent_theme_file_path( '/inc/icon-functions.php' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Block Patterns.
|
* Register block patterns and pattern categories.
|
||||||
|
*
|
||||||
|
* @since Twenty Seventeen 3.8
|
||||||
*/
|
*/
|
||||||
require get_template_directory() . '/inc/block-patterns.php';
|
function twentyseventeen_register_block_patterns() {
|
||||||
|
require get_template_directory() . '/inc/block-patterns.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'init', 'twentyseventeen_register_block_patterns' );
|
||||||
|
@ -528,10 +528,17 @@ function twentysixteen_hex2rgb( $color ) {
|
|||||||
*/
|
*/
|
||||||
require get_template_directory() . '/inc/template-tags.php';
|
require get_template_directory() . '/inc/template-tags.php';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Block Patterns.
|
* Register block patterns and pattern categories.
|
||||||
|
*
|
||||||
|
* @since Twenty Sixteen 3.4
|
||||||
*/
|
*/
|
||||||
require get_template_directory() . '/inc/block-patterns.php';
|
function twentysixteen_register_block_patterns() {
|
||||||
|
require get_template_directory() . '/inc/block-patterns.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'init', 'twentysixteen_register_block_patterns' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customizer additions.
|
* Customizer additions.
|
||||||
|
@ -781,8 +781,16 @@ function twentyten_block_editor_styles() {
|
|||||||
}
|
}
|
||||||
add_action( 'enqueue_block_editor_assets', 'twentyten_block_editor_styles' );
|
add_action( 'enqueue_block_editor_assets', 'twentyten_block_editor_styles' );
|
||||||
|
|
||||||
// Block Patterns.
|
/**
|
||||||
require get_template_directory() . '/block-patterns.php';
|
* Register block patterns and pattern categories.
|
||||||
|
*
|
||||||
|
* @since Twenty Ten 4.3
|
||||||
|
*/
|
||||||
|
function twentyten_register_block_patterns() {
|
||||||
|
require get_template_directory() . '/block-patterns.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'init', 'twentyten_register_block_patterns' );
|
||||||
|
|
||||||
if ( ! function_exists( 'wp_body_open' ) ) :
|
if ( ! function_exists( 'wp_body_open' ) ) :
|
||||||
/**
|
/**
|
||||||
|
@ -46,11 +46,15 @@ if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Block Patterns.
|
* Register block patterns and pattern categories.
|
||||||
*
|
*
|
||||||
* @since Twenty Thirteen 3.4
|
* @since Twenty Thirteen 4.3
|
||||||
*/
|
*/
|
||||||
require get_template_directory() . '/inc/block-patterns.php';
|
function twentythirteen_register_block_patterns() {
|
||||||
|
require get_template_directory() . '/inc/block-patterns.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'init', 'twentythirteen_register_block_patterns' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Twenty Thirteen setup.
|
* Twenty Thirteen setup.
|
||||||
|
@ -140,9 +140,15 @@ add_action( 'after_setup_theme', 'twentytwelve_setup' );
|
|||||||
require get_template_directory() . '/inc/custom-header.php';
|
require get_template_directory() . '/inc/custom-header.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add block patterns.
|
* Register block patterns and pattern categories.
|
||||||
|
*
|
||||||
|
* @since Twenty Twelve 4.4
|
||||||
*/
|
*/
|
||||||
require get_template_directory() . '/inc/block-patterns.php';
|
function twentytwelve_register_block_patterns() {
|
||||||
|
require get_template_directory() . '/inc/block-patterns.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'init', 'twentytwelve_register_block_patterns' );
|
||||||
|
|
||||||
if ( ! function_exists( 'twentytwelve_get_font_url' ) ) :
|
if ( ! function_exists( 'twentytwelve_get_font_url' ) ) :
|
||||||
/**
|
/**
|
||||||
|
@ -175,8 +175,16 @@ require get_template_directory() . '/classes/class-twentytwenty-non-latin-langua
|
|||||||
// Custom CSS.
|
// Custom CSS.
|
||||||
require get_template_directory() . '/inc/custom-css.php';
|
require get_template_directory() . '/inc/custom-css.php';
|
||||||
|
|
||||||
// Block Patterns.
|
/**
|
||||||
require get_template_directory() . '/inc/block-patterns.php';
|
* Register block patterns and pattern categories.
|
||||||
|
*
|
||||||
|
* @since Twenty Twenty 2.8
|
||||||
|
*/
|
||||||
|
function twentytwenty_register_block_patterns() {
|
||||||
|
require get_template_directory() . '/inc/block-patterns.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'init', 'twentytwenty_register_block_patterns' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register and Enqueue Styles.
|
* Register and Enqueue Styles.
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.7-beta3-59243';
|
$wp_version = '6.7-beta3-59244';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user