-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See #363 git-svn-id: https://meta.svn.wordpress.org/sites/trunk@14030 74240141-8908-4e6f-9713-ba540dce6ec7
- Loading branch information
Adam Wood
committed
Sep 9, 2024
1 parent
5e30ad8
commit 0f9be02
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
wordpress.org/public_html/wp-content/themes/pub/wporg-breathe-2024/patterns/local-nav.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
ob_start(); | ||
do_action('wporg_breathe_before_name', 'front'); | ||
$team_icon = ob_get_clean(); | ||
|
||
if ( function_exists( 'register_block_pattern' ) ) { | ||
register_block_pattern( | ||
'wporg-breathe/local-nav', | ||
array( | ||
'title' => __( 'Local Nav', 'wporg-breathe' ), | ||
'content' => sprintf( | ||
'<!-- wp:wporg/local-navigation-bar {"className":"has-display-contents","backgroundColor":"charcoal-2","style":{"elements":{"link":{"color":{"text":"var:preset|color|white"},":hover":{"color":{"text":"var:preset|color|white"}}}}},"textColor":"white","fontSize":"small"} --> | ||
<!-- wp:paragraph {"fontSize":"small"} --> | ||
<p class="wp-block-site-title has-small-font-size"><a href="%1$s">%2$s %3$s</a></p> | ||
<!-- /wp:paragraph --> | ||
<!-- wp:navigation {"icon":"menu","overlayBackgroundColor":"charcoal-2","overlayTextColor":"white","layout":{"type":"flex","orientation":"horizontal"},"fontSize":"small","menuSlug":"breathe"} /--> | ||
<!-- /wp:wporg/local-navigation-bar -->', | ||
esc_url( home_url() ), | ||
$team_icon, | ||
esc_html( get_bloginfo('name') ) | ||
), | ||
) | ||
); | ||
} |