Change URL of view button


I have the following app made with WordPress. The image below is from :


enter image description here

When hover over the view button the below URL is shown:


When I click the view button I’m redirected to /wp-admin page.

But I want to change the link of view button to:

I’ve already created the tempate user-detail.php and added the following hook in my plugin.

    function init() {
       add_filter('page_row_actions', array($this, 'view_user_detail'), 10, 2);

    function view_user_detail($actions, $user){
        $actions['view'] = '<a href="'.get_site_url().'/wp-admin/admin.php?page=user-detail&id='.$user->userID.'"></a>';
        return $actions;

But the link of view button is still the same. I would be very thankful if someone could help me to figure it out.

Pawan Rai 1 month 0 Answers 11 views 0

Leave an answer