Skip to content

Commit e06b47d

Browse files
author
Ariel Jolo
committed
Adding patterns
1 parent 8848113 commit e06b47d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

themes/osi/inc/block-patterns.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
<?php
22
add_filter('block_editor_rest_api_preload_paths', '__return_empty_array');
33

4+
add_action('init', function () {
5+
register_block_pattern_category(
6+
'ai', // Unique slug for the category
7+
['label' => __('AI', 'osi')] // Category label (visible in the editor)
8+
);
9+
});
10+
411
function register_osi_patterns() {
512
register_block_pattern(
613
'osi/ai-header',
714
[
815
'title' => __('AI Header', 'osi'),
916
'description' => __('Reusable header for AI template.', 'osi'),
17+
'categories' => ['ai'],
1018
'content' => <<<HTML
1119
<!-- wp:group {"align":"full"} -->
1220
<div class="wp-block-group alignfull header-header-two">

0 commit comments

Comments
 (0)