WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to know is there any hook to remove the Restore link in the edit page - trash page?


I know I can hide it with a css/jquery trick, but I prefer to use a hook for this.

enter image description here

share|improve this question
Are you referring to this: cl.ly/HewQ ? In any case, please add more details to your question... – brasofilo Jun 26 '12 at 14:44
Yes, this is what I meant – dev-jim Jun 26 '12 at 16:01
up vote 3 down vote accepted

This will do:

add_filter('post_row_actions', 'wpse_56560_remove_untrash', 10, 2);
add_filter('page_row_actions', 'wpse_56560_remove_untrash', 10, 2);

function wpse_56560_remove_untrash( $actions, $post ) 
    if( !isset( $actions['untrash'] ) ) 
        return $actions;

    // If NOT administrator, remove Untrash
    if( !current_user_can('administrator') )
        unset( $actions['untrash'] );

    return $actions; 
share|improve this answer
It's work. Thanks – dev-jim Jun 26 '12 at 18:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.