{"id":34910561,"url":"https://github.com/arraypress/wp-register-bulk-actions","last_synced_at":"2026-01-20T16:29:21.174Z","repository":{"id":326945996,"uuid":"1083865545","full_name":"arraypress/wp-register-bulk-actions","owner":"arraypress","description":"Lightweight library for registering custom bulk actions in WordPress admin tables.","archived":false,"fork":false,"pushed_at":"2025-11-30T20:07:02.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-27T21:09:40.296Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arraypress.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-26T21:26:57.000Z","updated_at":"2025-12-15T17:00:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/arraypress/wp-register-bulk-actions","commit_stats":null,"previous_names":["arraypress/wp-register-bulk-actions"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arraypress/wp-register-bulk-actions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arraypress%2Fwp-register-bulk-actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arraypress%2Fwp-register-bulk-actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arraypress%2Fwp-register-bulk-actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arraypress%2Fwp-register-bulk-actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arraypress","download_url":"https://codeload.github.com/arraypress/wp-register-bulk-actions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arraypress%2Fwp-register-bulk-actions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-26T11:08:05.300Z","updated_at":"2026-01-20T16:29:21.159Z","avatar_url":"https://github.com/arraypress.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Register Bulk Actions\n\nSimple library for adding custom bulk actions to WordPress admin tables.\n\n## Installation\n\n```bash\ncomposer require arraypress/wp-register-bulk-actions\n```\n\n## Usage\n\n### Posts\n\n```php\nregister_post_bulk_actions( 'post', [\n    'mark_featured' =\u003e [\n        'label'      =\u003e 'Mark as Featured',\n        'capability' =\u003e 'edit_posts',\n        'callback'   =\u003e function( $post_ids ) {\n            foreach ( $post_ids as $post_id ) {\n                update_post_meta( $post_id, '_featured', true );\n            }\n            return [ 'message' =\u003e count($post_ids) . ' posts marked as featured' ];\n        }\n    ]\n] );\n```\n\n### Users\n\n```php\nregister_user_bulk_actions( [\n    'send_welcome' =\u003e [\n        'label'      =\u003e 'Send Welcome Email',\n        'capability' =\u003e 'edit_users',\n        'callback'   =\u003e function( $user_ids ) {\n            // Send emails...\n            return [ 'message' =\u003e 'Emails sent!' ];\n        }\n    ]\n] );\n```\n\n### Taxonomies\n\n```php\nregister_taxonomy_bulk_actions( 'category', [\n    'feature_terms' =\u003e [\n        'label'    =\u003e 'Mark as Featured',\n        'callback' =\u003e function( $term_ids ) {\n            foreach ( $term_ids as $term_id ) {\n                update_term_meta( $term_id, '_featured', true );\n            }\n            return [ 'message' =\u003e 'Done!' ];\n        }\n    ]\n] );\n```\n\n### Comments\n\n```php\nregister_comment_bulk_actions( [\n    'mark_helpful' =\u003e [\n        'label'    =\u003e 'Mark as Helpful',\n        'callback' =\u003e function( $comment_ids ) {\n            foreach ( $comment_ids as $comment_id ) {\n                update_comment_meta( $comment_id, '_helpful', true );\n            }\n            return [ 'message' =\u003e 'Marked as helpful' ];\n        }\n    ]\n] );\n```\n\n### Media\n\n```php\nregister_media_bulk_actions( [\n    'regenerate' =\u003e [\n        'label'    =\u003e 'Regenerate Thumbnails',\n        'callback' =\u003e function( $attachment_ids ) {\n            require_once ABSPATH . 'wp-admin/includes/image.php';\n            \n            foreach ( $attachment_ids as $attachment_id ) {\n                $file = get_attached_file( $attachment_id );\n                $meta = wp_generate_attachment_metadata( $attachment_id, $file );\n                wp_update_attachment_metadata( $attachment_id, $meta );\n            }\n            \n            return [ 'message' =\u003e 'Thumbnails regenerated' ];\n        }\n    ]\n] );\n```\n\n## Options\n\n```php\n[\n    'label'      =\u003e 'Action Label',    // Required - shown in dropdown\n    'capability' =\u003e 'manage_options',  // Optional - default: manage_options\n    'callback'   =\u003e function( $ids ) { // Required - receives array of IDs\n        // Do something with $ids\n        \n        // Return success message\n        return [ 'message' =\u003e 'Done!' ];\n        \n        // Or return error\n        return [ \n            'success' =\u003e false,\n            'message' =\u003e 'Error occurred'\n        ];\n    }\n]\n```\n\n## Multiple Post Types/Taxonomies\n\n```php\nregister_post_bulk_actions( ['post', 'page', 'product'], [\n    'my_action' =\u003e [ /* ... */ ]\n] );\n\nregister_taxonomy_bulk_actions( ['category', 'post_tag'], [\n    'my_action' =\u003e [ /* ... */ ]\n] );\n```\n\n## Features\n\n- ✅ Automatic admin notices\n- ✅ Capability checking\n- ✅ Success/error handling\n- ✅ Works on all admin tables\n- ✅ No hooks needed - just call the function\n\n## Requirements\n\n- PHP 7.4+\n- WordPress 5.0+\n\n## License\n\nGPL-2.0-or-later","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farraypress%2Fwp-register-bulk-actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farraypress%2Fwp-register-bulk-actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farraypress%2Fwp-register-bulk-actions/lists"}