You can use the below code for this. You just need to change the “posttype” in the action name, for which you want to remove draft from the bulk action.
function remove_draft_from_bulk_actions( $actions ) {
if( isset( $actions[ 'draft' ] ) ) {
unset( $actions[ 'draft' ] );
}
return $actions;
}
add_filter( 'bulk_actions-edit-posttype', 'remove_draft_from_bulk_actions', 99 );
Below is the screenshot for this:
Related Posts:
- Update Multiple Post Meta for the Same Post In One call?
- Comparisson between date() and a date from wp_postmeta
- Show the “ratingValue” and “ratingCount” values of KK Star Ratings Plugin
- Updating post meta for custom post types
- How can I add a custom meta value on file upload?
- How to get custom field image url of specific size
- How do I add advanced custom fields / meta fields to Elasticsearch? [closed]
- Set attached to state
- How to change ID of an attachment in wp_posts and its related tables correctly?
- Add multiple attributes to product from php
- Make the checkbox meta field checked by default
- Where to hook my plugin’s action
- Is there a filter for get_post_custom()?
- dynamically generating plugin syntax
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- Create digital-virtual-downloadable WooCommerce products from the frontend using Gravity Forms? [closed]
- What is generating my meta og:description?
- Assign / update custom field value for all posts (How can I assign only to posts without custom field value?)
- How to display the “ratingValue” and “ratingCount” values generated by the KK Star Ratings plugin into my page’s recipe ld+json schema
- get current date + 90 days and checking every day
- How can I change the meta_key for a particular piece of information?
- WordPress Post Visibility Options for Frontend
- Bulk update all posts from plugin settings screen
- Meta box losing its value when scheduled post is published
- How to insert multiple postmeta values with one query?
- Mass SQL WordPress Meta Key deletion
- Date format – Meta Box plugin
- get meta value from database by post id
- Adding custom meta boxes to specified custom post type
- How to select a paragraph other than the 1st to be the post’s excerpt?
- Set Multiple Meta Values as an Array Using dispatch( ‘core/editor’ ).editPost() Call in Gutenberg/JS
- How can I concatenate variables to search results title? [closed]
- Remember the Meta Value With Radio Buttons
- Link Posts to External URL
- Why does “updated_post_meta” did not fire when uploading media other than image?
- What snippet do I need to type to show my ACF field show up on my theme?
- Is there a way to make [Table Of Content] plugin while not using revision data?
- Help to Create a Simple Plugin to make a post
- get_post_meta shortcode returns empty field
- Add an action based on custom post meta field
- how to auto random increment for post view
- How to securely controlling data without keeping it in postmeta?
- “Enable Media Replace” plugin does not update serialized object in WPMeta
- Custom Field used to allow a Free Story; no longer works
- Performance considerations – postmeta table versus new table for custom posts with foreign keys?
- Get and Update Most Meta Value as an array in HTML form
- How to create meta fields with more than 1 relation?
- Get value from an input field and pass into update_meta_data as $meta_value
- How to get post that has non zero or greater than zero meta value
- Delete postmeta when uninstall/delete plugin
- Same Title on two different post type with single custom taxonomy
- How can I make my plugin display custom post meta data on the front end?
- Storing values in Post Meta vs new tables
- Add meta tags with a plugin?
- WordPress User Frontend Editing Custom Fields
- wordpress last all added get meta value by post id
- Get post id in Post Page within Wp-admin
- Output plugin post like system count [closed]
- getting image alt text via ACF plugin in WordPress [closed]
- Update post meta Rest Api
- how to add meta for order in woocommerce
- How to get home page ID?
- WordPress plugin executing code twice
- How to Override a Pluggable Function
- Does WordPress contain “default” anti-SQL injection code that responds with a 404 error?
- How to override a theme function (within a class) using a plugin
- Is there a WordPress Plugin that allows voting “does this coupon work” on specific links like Retailmenot
- Force plugin to fail activation
- Can anyone identify this like plugin (not facebook like)?
- How do plugins get executed automatically from wp-content?
- Force CSS and JS loading of plugin only where needed
- how to find and correct plugin query performance issues
- Hooking in to replace the Sidebar/Widget areas
- Problem with $wpdb
- Why namespaces are rarely used in WordPress plugins?
- Uninstalling plugins across all sites
- the_tags : can we insert a class
- override filter in a plugin
- How to load different homepage on Mobile.?
- Hook into the rendering of a WordPress Template
- Add a “View all” button on WooCommerce product archives pages
- I am trying to make a field show and save from quickedit screen
- How do I add an options page at the bottom of the list?
- how to request a script more than once in wordpress
- Ajax 400 error when used inside a plugin
- Error thrown Call to a member function get() on null
- Undefined offset: 0 in WordPress after latest version upgrade [closed]
- Adding shortcodes to multiple pages with function
- Media Dialog CSS broken in WP v.5.3.2
- Slide through page effect?
- Get a list of Product Categories inside a loop
- Suspect incomplete .pot file – what to do?
- jquery conflict with widget page
- Automatically add child pages to menu
- Infinite Scroll plugin scrolling truly “infinitely” (i.e. does not recognize end of posts)
- Simply Exclude – Category feed exclusion is excluding from category feed instead of just the main feed
- White Screen When Includding A Folder With PHP Files
- making a simple plugin
- Custom single-product page for product from category x
- GTranslate Plugin – Showing Different Codes With if-else