Browse Source

Adding user admin url top menu link for users who doesn't belongs to a book, blog or site' && git push origin pbald-219-UserAdminLinkMenu

pull/222/head
Ricardo Aragon 4 years ago
parent
commit
7635a4d94d
  1. 6
      inc/helpers/namespace.php

6
inc/helpers/namespace.php

@ -200,6 +200,12 @@ function get_default_menu( $items = '' ) {
admin_url(), admin_url(),
__( 'Admin', 'pressbooks-aldine' ) __( 'Admin', 'pressbooks-aldine' )
); );
} else {
$items .= sprintf(
'<li><a href="%1$s">%2$s</a></li>',
user_admin_url(),
__( 'Admin', 'pressbooks-aldine' )
);
} }
$user_info = get_userdata( get_current_user_id() ); $user_info = get_userdata( get_current_user_id() );
if ( $user_info->primary_blog ) { if ( $user_info->primary_blog ) {

Loading…
Cancel
Save