=== Bulk Status Toggle ===
Contributors: snehalpancholi
Tags: bulk actions, post status, publish, draft, admin
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds "Publish" and "Move to Draft" bulk actions to the Posts, Pages, and custom post type admin list screens.

== Description ==

Bulk Status Toggle gives you two new options in the WordPress admin bulk actions dropdown: **Publish** and **Move to Draft**. Select as many posts as you like, pick an action, and all of them change status in one click.

**Features:**

* Adds "Publish" and "Move to Draft" to Posts and Pages by default
* Optionally extend to any registered public custom post type via Settings
* Skips posts the current user lacks permission to edit
* Skips posts already in the target status (no unnecessary updates)
* Admin notice shows how many posts were changed and how many were skipped
* Per-post permission check using `current_user_can( 'edit_post', $id )`
* Nonce-protected via WordPress core bulk action handling

**Use Cases:**

* Unpublish a batch of seasonal posts quickly
* Publish a set of pre-written drafts simultaneously
* Manage large inventories of WooCommerce products (with CPT extension)
* Quickly move multiple posts back to draft for revision

== Installation ==

1. Upload `bulk-status-toggle` to `/wp-content/plugins/`.
2. Activate through **Plugins → Installed Plugins**.
3. Go to **Posts → All Posts**, select some posts, and use the "Bulk Actions" dropdown — you will see "Publish" and "Move to Draft".
4. Optionally visit **Settings → Bulk Status Toggle** to enable the actions on custom post types.

== Frequently Asked Questions ==

= Does it work on custom post types? =
Yes — go to Settings → Bulk Status Toggle and check any registered public custom post types.

= What happens if I try to publish a post I don't have permission to edit? =
That post is skipped and counted in the "skipped" total shown in the admin notice.

= Does it affect scheduled posts? =
Moving a scheduled post to draft cancels the scheduled publication. Publishing a post immediately bypasses the scheduled date.

== Screenshots ==

1. The Bulk Actions dropdown showing the two new actions on All Posts.
2. Admin notice showing how many posts were changed.
3. Settings page for enabling the actions on custom post types.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
