' . __( 'Continued', 'pressbooks-aldine' ) . ''; } /** * Add things to the menu. * * @param string $items * @param object $args * @return string */ function adjust_menu( $items, $args ) { if ( $args->theme_location === 'primary-menu' ) { if ( ! is_front_page() ) { $items = sprintf( '
  • %2$s
  • ', '/', __( 'Home', 'pressbooks-aldine' ) ) . $items; } if ( get_option( 'pb_network_contact_form' ) ) { $items .= sprintf( '
  • %2$s
  • ', '#contact', __( 'Contact', 'pressbooks-aldine' ) ); } if ( ! is_user_logged_in() ) { $items .= sprintf( '
  • %2$s
  • ', wp_login_url( get_permalink() ), __( 'Sign in', 'pressbooks-aldine' ) ); if ( in_array( get_site_option( 'registration' ), [ 'user', 'all' ], true ) ) { $items .= sprintf( '
  • %2$s
  • ', network_home_url( '/wp-signup.php' ), __( 'Sign up', 'pressbooks-aldine' ) ); } } else { if ( is_super_admin() || is_user_member_of_blog() ) { $items .= sprintf( '
  • %2$s
  • ', admin_url(), __( 'Admin', 'pressbooks-aldine' ) ); } $items .= sprintf( '
  • %2$s
  • ', wp_logout_url( get_permalink() ), __( 'Sign out', 'pressbooks-aldine' ) ); } /* @codingStandardsIgnoreStart $items .= sprintf( '', get_search_form( false ) ); @codingStandardsIgnoreEnd */ } return $items; }