From 8e073d210022e89809741715850220621a8dcaf5 Mon Sep 17 00:00:00 2001 From: StevenDufresne Date: Mon, 15 Jul 2024 14:28:54 +0900 Subject: [PATCH 1/2] Update order of the navigation items. --- .../wporg-pattern-directory-2024/inc/block-config.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/public_html/wp-content/themes/wporg-pattern-directory-2024/inc/block-config.php b/public_html/wp-content/themes/wporg-pattern-directory-2024/inc/block-config.php index ae4bc73c..4d89cb47 100644 --- a/public_html/wp-content/themes/wporg-pattern-directory-2024/inc/block-config.php +++ b/public_html/wp-content/themes/wporg-pattern-directory-2024/inc/block-config.php @@ -299,9 +299,14 @@ function add_site_navigation_menus( $menus ) { $categories = array(); $statuses = array(); + $menu[] = array( + 'label' => __( 'New pattern', 'wporg-patterns' ), + 'url' => '/new-pattern/', + ); $menu[] = array( 'label' => __( 'My favorites', 'wporg-patterns' ), 'url' => '/favorites/', + 'className' => 'has-separator' ); if ( is_user_logged_in() ) { $menu[] = array( @@ -309,10 +314,7 @@ function add_site_navigation_menus( $menus ) { 'url' => '/my-patterns/', ); } - $menu[] = array( - 'label' => __( 'New pattern', 'wporg-patterns' ), - 'url' => '/new-pattern/', - ); + $current_status = isset( $wp_query->query['status'] ) ? $wp_query->query['status'] : false; $statuses = array( From 0bd99bdc6cefe92850030cf44e88aa90be59a918 Mon Sep 17 00:00:00 2001 From: StevenDufresne Date: Tue, 16 Jul 2024 09:34:59 +0900 Subject: [PATCH 2/2] Fix lint errors. --- .../themes/wporg-pattern-directory-2024/inc/block-config.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public_html/wp-content/themes/wporg-pattern-directory-2024/inc/block-config.php b/public_html/wp-content/themes/wporg-pattern-directory-2024/inc/block-config.php index 4d89cb47..39a787f7 100644 --- a/public_html/wp-content/themes/wporg-pattern-directory-2024/inc/block-config.php +++ b/public_html/wp-content/themes/wporg-pattern-directory-2024/inc/block-config.php @@ -306,7 +306,7 @@ function add_site_navigation_menus( $menus ) { $menu[] = array( 'label' => __( 'My favorites', 'wporg-patterns' ), 'url' => '/favorites/', - 'className' => 'has-separator' + 'className' => 'has-separator', ); if ( is_user_logged_in() ) { $menu[] = array( @@ -315,7 +315,6 @@ function add_site_navigation_menus( $menus ) { ); } - $current_status = isset( $wp_query->query['status'] ) ? $wp_query->query['status'] : false; $statuses = array( array(