Skip to content

Commit fcfc739

Browse files
author
Ariel Jolo
committed
Adding patterns
1 parent 1949a0b commit fcfc739

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

themes/osi/inc/block-patterns.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
function register_osi_patterns() {
2+
register_block_pattern(
3+
'osi/ai-header',
4+
[
5+
'title' => __('AI Header', 'osi'),
6+
'description' => __('Reusable header for AI template.', 'osi'),
7+
'content' => '<!-- wp:group {"align":"full"} -->
8+
<div class="wp-block-group alignfull">
9+
<p>AI Header Content Here</p>
10+
</div>
11+
<!-- /wp:group -->',
12+
]
13+
);
14+
15+
register_block_pattern(
16+
'osi/ai-footer',
17+
[
18+
'title' => __('AI Footer', 'osi'),
19+
'description' => __('Reusable footer for AI template.', 'osi'),
20+
'content' => '<!-- wp:group {"align":"full"} -->
21+
<div class="wp-block-group alignfull">
22+
<p>&copy; ' . date('Y') . ' The Open Source Initiative</p>
23+
<ul class="wp-block-social-links">
24+
<li><a href="https://go.opensource.org/mastodon">Mastodon</a></li>
25+
<li><a href="https://bsky.app/profile/opensource.org">Bluesky</a></li>
26+
<li><a href="https://www.linkedin.com/company/open-source-initiative-osi-">LinkedIn</a></li>
27+
<li><a href="https://www.reddit.com/user/opensourceinitiative/">Reddit</a></li>
28+
</ul>
29+
</div>
30+
<!-- /wp:group -->',
31+
]
32+
);
33+
}
34+
add_action('init', 'register_osi_patterns');

0 commit comments

Comments
 (0)