We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8848113 commit e06b47dCopy full SHA for e06b47d
themes/osi/inc/block-patterns.php
@@ -1,12 +1,20 @@
1
<?php
2
add_filter('block_editor_rest_api_preload_paths', '__return_empty_array');
3
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
+
11
function register_osi_patterns() {
12
register_block_pattern(
13
'osi/ai-header',
14
[
15
'title' => __('AI Header', 'osi'),
16
'description' => __('Reusable header for AI template.', 'osi'),
17
+ 'categories' => ['ai'],
18
'content' => <<<HTML
19
<!-- wp:group {"align":"full"} -->
20
<div class="wp-block-group alignfull header-header-two">
0 commit comments