Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7752467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:48:29+00:00 2026-06-01T11:48:29+00:00

Am trying to add a link besides the Edit | Delete links in wordpress

  • 0

Am trying to add a link besides the Edit | Delete links in wordpress admin > users > all users list through a plugin.. this is my first attempt at making a wordpress plugin by looking at other plugins or search google..

I have added a function

function pa_user_list_pay_link( $actions, $user_object ) {
    if ( current_user_can( 'administrator', $user_object->ID ) )
        $actions['pay'] = '<a href="#">Pay</a>';
    return $actions;
}

and the applied the filter

add_filter( 'user_row_actions', array( $this, 'pa_user_list_pay_link' ), 10, 2 );

But something seems to go wrong as this link is not appearing and the Edit | Delete links also disappear (no longer in the html output)

UPDATE 1 :
I modified /wp-admin/includes/class-wp-users-list-table.php

After this line

$actions = apply_filters( 'user_row_actions', $actions, $user_object );

I added this

file_put_contents("test_output.txt" , count($actions));

the test_output.txt was written to /wp-admin/
and it contained 0

I think i am doing some mistake in applying the filter..

Update 2: Answered my own question.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T11:48:30+00:00Added an answer on June 1, 2026 at 11:48 am
    function pa_user_list_pay_link( $actions, $user_object ) {
        if ( current_user_can( 'administrator', $user_object->ID ) )
            $actions['pay'] = '<a href="#">Pay</a>';
        return $actions;
    }
    
    add_filter( 'user_row_actions', 'pa_user_list_pay_link', 10, 2 );
    

    Works! 😀

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to add a text link to a specific tag post in Wordpress
I have this will_paginate for micropost link and I am trying to add the
I'm using jwplayer nad all works fine. I'm trying to add an external link
I'm currently working on this page and I'm trying to add a link within
I am trying to add a link into the pop-up text bubble of a
I am trying to hide my Add friend link if - current_user and @user
I'm trying add a tab to my web page that looks like this: Using
Trying to add a class object into a List using reflection, but when invoking
I'm trying to get add a link to a DNN usercontrol where when the
I'm trying to add a link to my page depending on what page you're

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.