mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-22 11:03:43 +03:00
parent
642b193c88
commit
7e89a1778e
|
@ -47,6 +47,14 @@ function add_site_navigation_menus( $menus ) {
|
||||||
'url' => '/my-pledges/',
|
'url' => '/my-pledges/',
|
||||||
'className' => 'has-separator',
|
'className' => 'has-separator',
|
||||||
);
|
);
|
||||||
|
if ( ! is_user_logged_in() ) {
|
||||||
|
global $wp;
|
||||||
|
$redirect_url = home_url( $wp->request );
|
||||||
|
$menu[] = array(
|
||||||
|
'label' => __( 'Log in', 'wporg-5ftf' ),
|
||||||
|
'url' => wp_login_url( $redirect_url ),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'main' => $menu,
|
'main' => $menu,
|
||||||
|
|
Loading…
Reference in a new issue