Skip to content

Commit

Permalink
Navigation: Highlight the handbook menu item when on handbook pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ryelle committed Sep 12, 2024
1 parent 9f976ba commit 4444fd3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions themes/wporg-5ftf-2024/inc/block-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
function add_site_navigation_menus( $menus ) {
global $wp_query;

$is_handbook = function_exists( 'wporg_is_handbook' ) && wporg_is_handbook();

$menu = array();

$menu[] = array(
Expand All @@ -33,6 +35,7 @@ function add_site_navigation_menus( $menus ) {
$menu[] = array(
'label' => __( 'Handbook', 'wporg-5ftf' ),
'url' => '/handbook/',
'className' => $is_handbook ? 'current-menu-item' : '',
);
$menu[] = array(
'label' => __( 'Pledges', 'wporg-5ftf' ),
Expand Down

0 comments on commit 4444fd3

Please sign in to comment.