Row actions for custom post types?

When using custom post type you use the post_row_actions filter hook and check the post type to modify it only:

add_filter('post_row_actions','my_action_row', 10, 2);

function my_action_row($actions, $post){
    //check for your post type
    if ($post->post_type =="feedbacks"){
        /*do you stuff here
        you can unset to remove actions
        and to add actions ex:
        $actions['in_google'] = '<a href="http://www.google.com/?q='.get_permalink($post->ID).'">check if indexed</a>';
        */
    }
    return $actions;
}

Quick update:

thanks to somatic
if you custom post type is “hierarchical” then you action hook is:
page_row_actions.

Leave a Comment