{"id":2659,"date":"2022-03-25T03:33:08","date_gmt":"2022-03-24T22:03:08","guid":{"rendered":"https:\/\/imageattributespro.com\/?p=2659"},"modified":"2023-04-07T09:25:59","modified_gmt":"2023-04-07T03:55:59","slug":"add-bulk-action-to-any-post-type","status":"publish","type":"post","link":"https:\/\/imageattributespro.com\/add-bulk-action-to-any-post-type\/","title":{"rendered":"Add “Update image attributes” Bulk Action To Any Post Type"},"content":{"rendered":"

Image Attributes Pro 3.0 ships with a Bulk action “Update image attributes<\/a>“. This is added to the Bulk actions in WordPress Media Library, Posts, Pages and WooCommerce Products by default. <\/p>

\/**\n * Add Image Attributes Pro Bulk action \"Update image attributes\" to a post type. \n * \n * Remember to replace {$this->screen->id} with the screen ID of the Edit post type screen.\n * \n * @link https:\/\/imageattributespro.com\/add-bulk-action-to-any-post-type\/\n *\/\nadd_filter( 'bulk_actions-{$this->screen->id}', 'iaffpro_add_bulk_action_update_image_attributes_to_posts' );\nadd_filter( 'handle_bulk_actions-{$this->screen->id}', 'iaffpro_handle_posts_bulk_action_update_image_attributes', 10, 3 );<\/code><\/pre>

How To Find {$this->screen->id}<\/h2>