[wp-trac] [WordPress Trac] #19343: Allow Quick Edit to be Disabled for Custom Post Types

WordPress Trac wp-trac at lists.automattic.com
Fri Nov 25 07:48:52 UTC 2011


#19343: Allow Quick Edit to be Disabled for Custom Post Types
-----------------------------+------------------------------
 Reporter:  Jick             |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Quick/Bulk Edit  |     Version:  3.3
 Severity:  normal           |  Resolution:
 Keywords:                   |
-----------------------------+------------------------------
Changes (by mikeschinkel):

 * cc: mikeschinkel@… (added)


Comment:

 @Jick: While I agree that it would be nice to maybe have a switch for this
 in `register_post_type()`, I think it is easier than you are thinking,
 unless I misunderstand what you are looking for.

 Try this code; does it not do what you want?

 {{{
 // Use this for hierarchical post types
 add_action( 'page_row_actions', 'yoursite_row_actions', 10, 2 );

 // Use this for non-hierarchical post types
 add_action( 'post_row_actions', 'yoursite_row_actions', 10, 2 );

 function yoursite_row_actions( $actions, $post ) {
   if ( 'your_post_type' == $post->post_type )
     unset( $actions['inline hide-if-no-js'] );
   return $actions;
 }

 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19343#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list