Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 134392

will83 on "post_row_actions in 3.4"

$
0
0

I'm looking to unset some actions within the page/post listing.
I've found that code somewhere on the web, but the 'post_row_actions' seems to be deprecated (i'm using 3.4 version).
Do you know what can I update in those lines of code to make them work ?

add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 );
function remove_row_actions( $actions )
{
    if( get_post_type() === 'post' )
        unset( $actions['edit'] );
        unset( $actions['view'] );
        unset( $actions['trash'] );
        unset( $actions['inline hide-if-no-js'] );
    return $actions;
}

Thank you !


Viewing all articles
Browse latest Browse all 134392

Trending Articles