Browse Source

Merge pull request #222 from pressbooks/pbald-219-UserAdminLinkMenu

Adding user admin access in the menu
pull/224/head
Ricardo Aragon 4 years ago committed by GitHub
parent
commit
ea6d4b6fd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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