diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:57:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:57:30 +0000 |
commit | fa9a33d818470a5796f0ff8797f98b510ed8de18 (patch) | |
tree | bde6a1eede376f9b5df5898ce812330152984d8e /wp-includes/block-patterns.php | |
parent | Releasing progress-linux version 6.4.3+dfsg1-1~progress7.99u1. (diff) | |
download | wordpress-fa9a33d818470a5796f0ff8797f98b510ed8de18.tar.xz wordpress-fa9a33d818470a5796f0ff8797f98b510ed8de18.zip |
Merging upstream version 6.5+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/block-patterns.php')
-rw-r--r-- | wp-includes/block-patterns.php | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/wp-includes/block-patterns.php b/wp-includes/block-patterns.php index 66bdfd6..d672ffd 100644 --- a/wp-includes/block-patterns.php +++ b/wp-includes/block-patterns.php @@ -136,6 +136,20 @@ function _register_core_block_patterns_and_categories() { ) ); register_block_pattern_category( + 'videos', + array( + 'label' => _x( 'Videos', 'Block pattern category' ), + 'description' => __( 'Different layouts containing videos.' ), + ) + ); + register_block_pattern_category( + 'audio', + array( + 'label' => _x( 'Audio', 'Block pattern category' ), + 'description' => __( 'Different layouts containing audio.' ), + ) + ); + register_block_pattern_category( 'posts', array( 'label' => _x( 'Posts', 'Block pattern category' ), @@ -377,13 +391,7 @@ function _register_theme_block_patterns() { continue; } - // The actual pattern content is the output of the file. - ob_start(); - include $file_path; - $pattern_data['content'] = ob_get_clean(); - if ( ! $pattern_data['content'] ) { - continue; - } + $pattern_data['filePath'] = $file_path; // Translate the pattern metadata. // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText,WordPress.WP.I18n.NonSingularStringLiteralDomain,WordPress.WP.I18n.LowLevelTranslationFunction |