Remove "Trash" from Wordpress Pages -


i trying remove "trash" link wordpress pages in wp-admin. have managed create function removes posts cannot seem find info on doing same pages.

function removing trash link posts:

<?php add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 ); function remove_row_actions( $actions ) {     if( get_post_type() === 'post' )          unset( $actions['clone'] );         unset( $actions['trash'] );      return $actions; } ?> 

paste below code function.php , check in post/page section in admin

add_filter( 'post_row_actions', 'remove_row_actions_post', 10, 1 ); function remove_row_actions_post( $actions ) { if( get_post_type() === 'post' ) { unset( $actions['clone'] ); unset( $actions['trash'] ); return $actions; } } add_filter( 'page_row_actions', 'remove_row_actions_page', 10, 1 ); function remove_row_actions_page( $actions ) { if( get_post_type() === 'page' ) { unset( $actions['clone'] ); unset( $actions['trash'] ); return $actions; } } 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -