summaryrefslogtreecommitdiffstats
path: root/wp-includes/block-patterns.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:26 +0000
commit30883c26bdceb9eaf32c8d4a1b0c1bce223b5226 (patch)
tree39a02e2aeb21ab5b7923c6f5757d66d55b708912 /wp-includes/block-patterns.php
parentAdding upstream version 6.4.3+dfsg1. (diff)
downloadwordpress-30883c26bdceb9eaf32c8d4a1b0c1bce223b5226.tar.xz
wordpress-30883c26bdceb9eaf32c8d4a1b0c1bce223b5226.zip
Adding upstream version 6.5+dfsg1.upstream/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.php22
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