WordPress.org

Make WordPress Core

Ticket #38085: 38085.3.patch

File 38085.3.patch, 1.2 KB (added by viralsampat, 3 years ago)

Fixed

  • wp-admin/includes/class-wp-users-list-table.php

     
    408408                                $edit = "<strong>$user_object->user_login</strong><br />";
    409409                        }
    410410
     411                        //check get author post url is not empty and add the view user link on user listing page
     412                        if ( !empty( get_author_posts_url( $user_object->ID ) ) && $author_posts_url = get_author_posts_url( $user_object->ID ) ) {
     413                        $view_link = esc_url( add_query_arg( 'wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), $author_posts_url ) );
     414                            $actions['view'] = '<a href="' . $view_link . '">' . __('View') . '</a>';
     415                        }
     416
    411417                        if ( !is_multisite() && get_current_user_id() != $user_object->ID && current_user_can( 'delete_user', $user_object->ID ) )
    412418                                $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url( "users.php?action=delete&amp;user=$user_object->ID", 'bulk-users' ) . "'>" . __( 'Delete' ) . "</a>";
    413419                        if ( is_multisite() && get_current_user_id() != $user_object->ID && current_user_can( 'remove_user', $user_object->ID ) )