title: Wordpress filter user_row_actions
body: <p>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..</p>
  
  <p>I have added a function</p>
  
  <pre><code>function pa_user_list_pay_link( $actions, $user_object ) {
      if ( current_user_can( 'administrator', $user_object-&gt;ID ) )
          $actions['pay'] = '&lt;a href="#"&gt;Pay&lt;/a&gt;';
      return $actions;
  }
  </code></pre>
  
  <p>and the applied the filter</p>
  
  <pre><code>add_filter( 'user_row_actions', array( $this, 'pa_user_list_pay_link' ), 10, 2 );
  </code></pre>
  
  <p>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)</p>
  
  <p>UPDATE 1 :
  I modified /wp-admin/includes/class-wp-users-list-table.php</p>
  
  <p>After this line</p>
  
  <pre><code>$actions = apply_filters( 'user_row_actions', $actions, $user_object );
  </code></pre>
  
  <p>I added this</p>
  
  <pre><code>file_put_contents("test_output.txt" , count($actions));
  </code></pre>
  
  <p>the test_output.txt was written to /wp-admin/
  and it contained <strong>0</strong></p>
  
  <p>I think i am doing some mistake in applying the filter..</p>
  
  <p>Update 2: Answered my own question.</p>