get_edit_profile_url example

$section_description .= '<ul>';
        $section_description .= '<li id="editor-keyboard-trap-help-2">' . __( 'In the editing area, the Tab key enters a tab character.' ) . '</li>';
        $section_description .= '<li id="editor-keyboard-trap-help-3">' . __( 'To move away from this area, press the Esc key followed by the Tab key.' ) . '</li>';
        $section_description .= '<li id="editor-keyboard-trap-help-4">' . __( 'Screen reader users: when in forms mode, you may need to press the Esc key twice.' ) . '</li>';
        $section_description .= '</ul>';

        if ( 'false' !== wp_get_current_user()->syntax_highlighting ) {
            $section_description .= '<p>';
            $section_description .= sprintf(
                /* translators: 1: Link to user profile, 2: Additional link attributes, 3: Accessibility text. */
                __( 'The edit field automatically highlights code syntax. You can disable this in your <a href="%1$s" %2$s>user profile%3$s</a> to work in plain text mode.' ),
                esc_url( get_edit_profile_url() ),
                'class="external-link" target="_blank"',
                sprintf(
                    '<span class="screen-reader-text"> %s</span>',
                    /* translators: Hidden accessibility text. */
                    __( '(opens in a new tab)' )
                )
            );
            $section_description .= '</p>';
        }

        $section_description .= '<p class="section-description-buttons">';
        

function wp_admin_bar_my_account_item( $wp_admin_bar ) {
    $user_id      = get_current_user_id();
    $current_user = wp_get_current_user();

    if ( ! $user_id ) {
        return;
    }

    if ( current_user_can( 'read' ) ) {
        $profile_url = get_edit_profile_url( $user_id );
    } elseif ( is_multisite() ) {
        $profile_url = get_dashboard_url( $user_id, 'profile.php' );
    } else {
        $profile_url = false;
    }

    $avatar = get_avatar( $user_id, 26 );
    /* translators: %s: Current user's display name. */
    $howdy = sprintf( __( 'Howdy, %s' ), '<span class="display-name">' . $current_user->display_name . '</span>' );
    $class = empty( $avatar ) ? '' : 'with-avatar';

    
$screen = get_current_screen();

        $content  = '<p>';
        $content .= __( 'Use the Custom HTML widget to add arbitrary HTML code to your widget areas.' );
        $content .= '</p>';

        if ( 'false' !== wp_get_current_user()->syntax_highlighting ) {
            $content .= '<p>';
            $content .= sprintf(
                /* translators: 1: Link to user profile, 2: Additional link attributes, 3: Accessibility text. */
                __( 'The edit field automatically highlights code syntax. You can disable this in your <a href="%1$s" %2$s>user profile%3$s</a> to work in plain text mode.' ),
                esc_url( get_edit_profile_url() ),
                'class="external-link" target="_blank"',
                sprintf(
                    '<span class="screen-reader-text"> %s</span>',
                    /* translators: Hidden accessibility text. */
                    __( '(opens in a new tab)' )
                )
            );
            $content .= '</p>';

            $content .= '<p id="editor-keyboard-trap-help-1">' . __( 'When using a keyboard to navigate:' ) . '</p>';
            $content .= '<ul>';
            

    ?> <div class="error default-password-nag"> <p> <strong><?php _e( 'Notice:' ); ?></strong> <?php _e( 'You are using the auto-generated password for your account. Would you like to change it?' ); ?> </p> <p> <?php         printf(
            '<a href="%1$s">%2$s</a> | ',
            esc_url( get_edit_profile_url() . '#password' ),
            __( 'Yes, take me to my profile page' )
        );
        printf(
            '<a href="%1$s" id="default-password-nag-no">%2$s</a>',
            '?default_password_nag=0',
            __( 'No thanks, do not remind me again' )
        );
        ?> </p> </div> <?php }
if ( empty( $user_id ) || ! current_user_can( 'edit_user', $user_id ) ) {
        return '';
    }

    $user = get_userdata( $user_id );

    if ( ! $user ) {
        return '';
    }

    if ( get_current_user_id() == $user->ID ) {
        $link = get_edit_profile_url( $user->ID );
    } else {
        $link = add_query_arg( 'user_id', $user->ID, self_admin_url( 'user-edit.php' ) );
    }

    /** * Filters the user edit link. * * @since 3.5.0 * * @param string $link The edit link. * @param int $user_id User ID. */
Home | Imprint | This part of the site doesn't use cookies.