get_edit_user_link example


    }
}

$message = '';
if ( isset( $_GET['update'] ) ) {
    if ( 'added' === $_GET['update'] ) {
        $edit_link = '';
        if ( isset( $_GET['user_id'] ) ) {
            $user_id_new = absint( $_GET['user_id'] );
            if ( $user_id_new ) {
                $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) )get_edit_user_link( $user_id_new ) ) );
            }
        }

        $message = __( 'User added.' );

        if ( $edit_link ) {
            $message .= sprintf( ' <a href="%s">%s</a>', $edit_link__( 'Edit user' ) );
        }
    }
}

'edit'   => false,
        ),
        'editLink'      => false,
        'meta'          => false,
    );

    $author = new WP_User( $attachment->post_author );

    if ( $author->exists() ) {
        $author_name            = $author->display_name ? $author->display_name : $author->nickname;
        $response['authorName'] = html_entity_decode( $author_name, ENT_QUOTES, get_bloginfo( 'charset' ) );
        $response['authorLink'] = get_edit_user_link( $author->ID );
    } else {
        $response['authorName'] = __( '(no author)' );
    }

    if ( $attachment->post_parent ) {
        $post_parent = get_post( $attachment->post_parent );
        if ( $post_parent ) {
            $response['uploadedToTitle'] = $post_parent->post_title ? $post_parent->post_title : __( '(no title)' );
            $response['uploadedToLink']  = get_edit_post_link( $attachment->post_parent, 'raw' );
        }
    }

    
$super_admin = ' &mdash; ' . __( 'Super Admin' );
            }
        }

        // Check if the user for this row is editable.         if ( current_user_can( 'list_users' ) ) {
            // Set up the user editing link.             $edit_link = esc_url(
                add_query_arg(
                    'wp_http_referer',
                    urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ),
                    get_edit_user_link( $user_object->ID )
                )
            );

            if ( current_user_can( 'edit_user', $user_object->ID ) ) {
                $edit            = "<strong><a href=\"{$edit_link}\">{$user_object->user_login}</a>{$super_admin}</strong><br />";
                $actions['edit'] = '<a href="' . $edit_link . '">' . __( 'Edit' ) . '</a>';
            } else {
                $edit = "<strong>{$user_object->user_login}{$super_admin}</strong><br />";
            }

            if ( ! is_multisite()
                
$media_dims = apply_filters( 'media_meta', $media_dims$post );

    $att_url = wp_get_attachment_url( $attachment_id );

    $author = new WP_User( $post->post_author );

    $uploaded_by_name = __( '(no author)' );
    $uploaded_by_link = '';

    if ( $author->exists() ) {
        $uploaded_by_name = $author->display_name ? $author->display_name : $author->nickname;
        $uploaded_by_link = get_edit_user_link( $author->ID );
    }
    ?> <div class="misc-pub-section misc-pub-uploadedby"> <?php if ( $uploaded_by_link ) { ?> <?php _e( 'Uploaded by:' ); ?> <a href="<?php echo $uploaded_by_link; ?>"><strong><?php echo $uploaded_by_name; ?></strong></a> <?php } else { ?> <?php _e( 'Uploaded by:' ); ?> <strong><?php echo $uploaded_by_name; ?></strong> <?php } ?> </div> <?php

    public function column_username( $user ) {
        $super_admins = get_super_admins();
        $avatar       = get_avatar( $user->user_email, 32 );

        echo $avatar;

        if ( current_user_can( 'edit_user', $user->ID ) ) {
            $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) )get_edit_user_link( $user->ID ) ) );
            $edit      = "<a href=\"{$edit_link}\">{$user->user_login}</a>";
        } else {
            $edit = $user->user_login;
        }

        ?> <strong> <?php             echo $edit;

            if ( in_array( $user->user_login, $super_admins, true ) ) {
                
$edit_term_link = get_edit_term_link( $current_object->term_id, $current_object->taxonomy );
            if ( $tax && $edit_term_link && current_user_can( 'edit_term', $current_object->term_id ) ) {
                $wp_admin_bar->add_node(
                    array(
                        'id'    => 'edit',
                        'title' => $tax->labels->edit_item,
                        'href'  => $edit_term_link,
                    )
                );
            }
        } elseif ( is_a( $current_object, 'WP_User' ) && current_user_can( 'edit_user', $current_object->ID ) ) {
            $edit_user_link = get_edit_user_link( $current_object->ID );
            if ( $edit_user_link ) {
                $wp_admin_bar->add_node(
                    array(
                        'id'    => 'edit',
                        'title' => __( 'Edit User' ),
                        'href'  => $edit_user_link,
                    )
                );
            }
        }
    }
}
__( 'You must be <a href="%s">logged in</a> to post a comment.' ),
                /** This filter is documented in wp-includes/link-template.php */
                wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id )$post_id ) )
            )
        ),
        'logged_in_as'         => sprintf(
            '<p class="logged-in-as">%s%s</p>',
            sprintf(
                /* translators: 1: User name, 2: Edit user link, 3: Logout URL. */
                __( 'Logged in as %1$s. <a href="%2$s">Edit your profile</a>. <a href="%3$s">Log out?</a>' ),
                $user_identity,
                get_edit_user_link(),
                /** This filter is documented in wp-includes/link-template.php */
                wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id )$post_id ) )
            ),
            $required_text
        ),
        'comment_notes_before' => sprintf(
            '<p class="comment-notes">%s%s</p>',
            sprintf(
                '<span id="email-notes">%s</span>',
                __( 'Your email address will not be published.' )
            ),
            
        $errors = edit_user( $user_id );

        // Grant or revoke super admin status if requested.         if ( is_multisite() && is_network_admin()
            && ! IS_PROFILE_PAGE && current_user_can( 'manage_network_options' )
            && ! isset( $super_admins ) && empty( $_POST['super_admin'] ) === is_super_admin( $user_id )
        ) {
            empty( $_POST['super_admin'] ) ? revoke_super_admin( $user_id ) : grant_super_admin( $user_id );
        }

        if ( ! is_wp_error( $errors ) ) {
            $redirect = add_query_arg( 'updated', true, get_edit_user_link( $user_id ) );
            if ( $wp_http_referer ) {
                $redirect = add_query_arg( 'wp_http_referer', urlencode( $wp_http_referer )$redirect );
            }
            wp_redirect( $redirect );
            exit;
        }

        // Intentional fall-through to display $errors.     default:
        $profile_user = get_user_to_edit( $user_id );

        


require_once ABSPATH . 'wp-admin/admin-header.php';

if ( isset( $_GET['update'] ) ) {
    $messages = array();
    if ( is_multisite() ) {
        $edit_link = '';
        if ( ( isset( $_GET['user_id'] ) ) ) {
            $user_id_new = absint( $_GET['user_id'] );
            if ( $user_id_new ) {
                $edit_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) )get_edit_user_link( $user_id_new ) ) );
            }
        }

        switch ( $_GET['update'] ) {
            case 'newuserconfirmation':
                $messages[] = __( 'Invitation email sent to new user. A confirmation link must be clicked before their account is created.' );
                break;
            case 'add':
                $messages[] = __( 'Invitation email sent to user. A confirmation link must be clicked for them to be added to your site.' );
                break;
            case 'addnoconfirmation':
                
Home | Imprint | This part of the site doesn't use cookies.