Skip to content

Commit

Permalink
Navigation: Add "Log in" link to local nav
Browse files Browse the repository at this point in the history
  • Loading branch information
ryelle committed Sep 10, 2024
1 parent 3aa6886 commit f2ac341
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ function add_site_navigation_menus( $menus ) {
)
);

if ( ! is_user_logged_in() ) {
global $wp;
$redirect_url = home_url( $wp->request );
$items['plugins'][] = array(
'label' => __( 'Log in', 'wporg-plugins' ),
'url' => wp_login_url( $redirect_url ),
);
}

/*
// Not usually in the menu, but we need to show these somehow.
if ( is_tax( 'plugin_section', 'adopt-me' ) ) {
Expand Down

0 comments on commit f2ac341

Please sign in to comment.