=== Scheduled Content Dashboard ===
Contributors: jeangalea
Tags: scheduled, editorial calendar, content overview, dashboard widget, missed schedule
Requires at least: 5.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 3.1.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Editorial calendar with drag-and-drop, a grouped content overview, and a dashboard widget. Auto-fixes missed schedules. No bloat.

== Description ==

Scheduled Content Dashboard gives you a clear view of everything queued up for publication. It adds a dashboard widget that groups scheduled content by when it's due and an editorial calendar where you drag posts to different days. It also flags posts WordPress failed to publish on time and republishes them for you.

A Content Overview screen groups everything in the pipeline by status, post type, author, or category, and prints cleanly for an editorial meeting.

There's no social sharing and no upsell. It shows what's scheduled, lets you reshuffle it, and keeps it publishing.

An optional add-on, [Scheduled Content Dashboard Pro](https://github.com/jgalea/scheduled-content-dashboard-pro), adds a drag-and-drop Content Board. It's free on GitHub during early access.

= Features =

* **Editorial calendar**: Month and Week views with drag-and-drop rescheduling (time of day preserved) and an undo
* **Create and edit from the calendar**: click an empty day to add a post, or click a post to change its title and time
* **Multi-select**: Ctrl/Command-click several posts and drag them together
* **Export to .ics**: download the month for Google Calendar, Apple Calendar, or Outlook
* **Content Overview**: every item in the pipeline grouped by status, post type, author, or category, with a past-due filter and a Print button
* **Custom status support**: statuses registered by editorial workflow plugins show up on the calendar and overview, color-coded, with their own filter
* **Dashboard widget**: scheduled content grouped by Today, Tomorrow, This Week, Next Week, and Later
* **Mini calendar view**: switch the widget to a month grid with dots on days that have scheduled posts
* **Missed-schedule detection**: posts stuck in `future` status past their date are flagged in red
* **Auto-fix missed schedules**: republishes stuck posts when someone loads an admin page (checks at most every 10 minutes, up to 20 posts per check)
* **One-click "Publish now"**: manually push any missed post live from the widget or the Overview
* **Admin bar counter**: shows how many posts are scheduled, and how many are missed, while there's something scheduled
* **Optional email digest**: daily or weekly summary of missed and upcoming posts, sent at 9am site time
* **REST API**: endpoints for scheduled, missed, counts, statuses, publish-now, and reschedule
* **Post type and author filters**: drill down inside the widget without leaving the dashboard
* **"Mine only" toggle**: multi-author sites can limit the widget to the current user's content
* **Drafts in widget (optional)**: show drafts alongside scheduled items
* **Settings page**: item limit, post types, statuses, default view, overview grouping, auto-fix, and digest
* **Any public post type**: posts, pages, products, events, custom post types. New installs include Posts only; tick others under Scheduled > Settings
* **Privacy-friendly**: no tracking, no external requests, no cookies

= Use cases =

* Editorial teams managing a content calendar
* Bloggers scheduling posts in advance
* Agencies juggling multiple client sites
* Anyone frustrated by WordPress missing scheduled publish times

= Privacy =

This plugin does not collect data, send data to external servers, use cookies, or track users. Everything displayed is already in your WordPress database.

= Developer hooks =

`scheduled_content_dashboard_query_args`: filter the WP_Query args used for the scheduled content list.

`scheduled_content_dashboard_auto_fix_missed`: return `false` to disable the auto-publish of missed scheduled posts.

`scheduled_content_dashboard_statuses`: filter the list of post statuses the calendar and overview can display.

= REST API =

Base namespace: `scheduled-content-dashboard/v1`. The `GET` endpoints require a logged-in user with the `edit_posts` capability. The `POST` endpoints require permission to edit that post, and publishing also needs the post type's publish capability.

* `GET /scheduled`: list scheduled posts (query args: `post_type`, `author`, `limit` up to 200, default 50, `status`)
* `GET /statuses`: list the statuses this site can show, with labels, colors, and which are enabled
* `GET /missed`: list missed scheduled posts
* `GET /counts`: return `{ total, scheduled, missed }`
* `POST /publish/{id}`: publish a scheduled post now
* `POST /reschedule/{id}`: set a post's publish date and schedule it (body: `date`, any format `strtotime()` understands, must be in the future)

== Installation ==

1. Go to Plugins > Add New in your WordPress admin
2. Search for "Scheduled Content Dashboard"
3. Click Install Now, then Activate
4. Visit your Dashboard to see the widget

== Frequently Asked Questions ==

= Where does the widget appear? =

On your main WordPress admin dashboard. You can drag it to reposition it among your other widgets.

= What content types are displayed? =

Any public post type: posts, pages, and custom post types such as products or events. A new install includes Posts only. Tick the others under Scheduled > Settings.

= What is a "missed schedule"? =

WordPress uses wp-cron to publish scheduled posts at their designated time. If cron doesn't fire (low traffic sites, server cron issues, fatal errors), posts stay stuck in `future` status past their publish date. This plugin detects those posts, flags them, and by default publishes them the next time someone loads an admin page. Auto-fix runs in the admin only, so on a site nobody logs in to, a real server cron job hitting `wp-cron.php` is the proper fix.

= How do I disable auto-fix? =

Add this to your theme's `functions.php` or a mu-plugin:

`add_filter( 'scheduled_content_dashboard_auto_fix_missed', '__return_false' );`

You can also turn it off under Scheduled > Settings. You'll still see missed posts flagged in the widget with a manual "Publish now" button.

= How many scheduled items does the widget show? =

Seven by default, soonest first. Change it under Scheduled > Settings (1 to 500). A link to the full calendar appears when more are queued.

= Does it work with custom post statuses? =

Yes, and it doesn't register any of its own. Any status another plugin registers shows up under Scheduled > Settings. Tick the ones you want and that content appears on the calendar and in the Content Overview, colour-coded, with a filter of its own. Dragging a post in a non-scheduled status moves its intended publish date and leaves the status alone.

= What is the Content Overview for? =

Seeing the pipeline as a list rather than a grid. Group by status, post type, author, or category, filter down to past-due items, then hit Print for a copy to take into an editorial meeting.

= Does this work with Gutenberg / the block editor? =

Yes. The plugin displays scheduled content and links to standard edit screens, so it doesn't depend on the editor.

= Is there a Pro version? =

Scheduled Content Dashboard Pro adds a kanban-style Content Board under Scheduled > Board: one column per pipeline status, and dragging a card changes the post's status. It's free on [GitHub](https://github.com/jgalea/scheduled-content-dashboard-pro) during early access and needs this plugin active.

= Does this work with Multisite? =

Yes. Each site has its own widget showing that site's scheduled content.

= The widget isn't showing. What now? =

1. Confirm the plugin is activated
2. Confirm you have scheduled content (posts with future publish dates)
3. On the Dashboard, click Screen Options at the top and make sure "Scheduled Content" is ticked

== Screenshots ==

1. Editorial calendar with Month and Week views
2. Drag a post to another day to reschedule it
3. Content Overview, grouped by status with a past-due filter
4. Dashboard widget with missed-schedule posts and a "Publish now" button, plus the admin bar counter
5. Content Board from the free Pro add-on

== Changelog ==

= 3.1.3 =
* Readme updated to match what the plugin does, with new screenshots.

= 3.1.2 =
* Fixed: the calendar's edit popup had a see-through panel, and long titles opened scrolled to their end.

= 3.1.1 =
* Requires WordPress 5.3 or later, which is what the plugin already needed for site-timezone dates.
* Tested up to WordPress 7.1.
* Added translator comments and tightened output escaping in the calendar and dashboard widget.

= 3.1.0 =
* Content Overview screen: everything in the pipeline grouped by status, post type, author, or category, with per-status counts, a past-due filter, and a print layout.
* Custom statuses registered by other plugins now appear in Settings. Tick one and that content shows on the calendar as a dashed, colour-coded chip.
* Calendar gained a status filter, and dragging a draft moves its intended date without scheduling or publishing it.
* REST: `GET /statuses`, a `status` argument on `GET /scheduled`, and status fields on every item.
* New `scheduled_content_dashboard_statuses` filter.
* Fix: on sites west of UTC the calendar opened on the previous month and Next could get stuck, and posts dated near midnight could show on the wrong day in any non-UTC timezone. The calendar, week view, dashboard widget, Overview and .ics export now do their date math in the site's timezone.

= 3.0.0 =
* Editorial calendar redesign. Month and Week views with a toggle, plus filters by post type and author.
* Posts now show as colour-coded chips with their time, type, and author; missed posts stand out in red.
* Drag a scheduled post to another day to reschedule it (rebuilt without jQuery UI), with an undo.
* Click an empty day to create a post on that date; click a post to edit its title and time inline.
* "+N more" expands a busy day in place, and day cells size to their content instead of a fixed height.
* Keyboard navigation, and multi-select to move several posts at once.
* Export the month to an .ics calendar file.
* Light and dark, following your system appearance.
* The calendar now respects the included post types from Settings.

= 2.0.8 =
* Editorial calendar: uniform faint borders around every day cell, cleaner outer grid, removed the separator line under the legend.

= 2.0.7 =
* Dashboard widget switching view, toggling "Mine only", or applying filters no longer reloads the whole page; it swaps content in place.
* Fresh installs now default to the Post type only. Page, Media, and CPTs are unchecked by default.
* Settings page now lives under Scheduled → Settings (was jumping to WP Settings). Old URL redirects automatically.
* Editorial calendar: softer day-of-week header, legend has room to breathe.

= 2.0.6 =
* Changed: Editorial calendar visual redesign: solid dark header row, proper 1px borders on every cell, today cell gets a blue top-bar marker, weekends lightly shaded, other-month days clearly faded, missed days highlighted red
* Added: Legend below the calendar showing Scheduled / Missed / Today
* Changed: Item hover states for clearer interactivity

= 2.0.5 =
* Changed: Admin bar counter now links to the full editorial calendar page instead of the dashboard widget
* Fixed: Editorial calendar row heights were variable; each day cell is now a fixed 140px and caps at 3 visible items with a "+N more" indicator

= 2.0.4 =
* Fixed: Editorial calendar row heights were variable depending on how many posts were scheduled per day (superseded by 2.0.5)

= 2.0.3 =
* Changed: Widget item limit default lowered from 15 to 7 to keep the widget tight by default; power users can raise it from settings

= 2.0.2 =
* Changed: Shortened the wp.org short description to fit the 150-character cap (previously truncated on import)

= 2.0.1 =
* Changed: Widget item limit default lowered from 50 to 15 so the dashboard widget no longer balloons to full height on sites with a heavy schedule
* Added: "+N more scheduled, open full calendar" footer link in the widget when there are more scheduled items than the display limit

= 2.0.0 =
* Added: Full editorial calendar admin page with drag-and-drop rescheduling (jQuery UI)
* Added: Top-level "Scheduled" menu with Calendar and Settings submenus
* Added: REST API (`scheduled-content-dashboard/v1`) with scheduled, missed, counts, publish, reschedule endpoints
* Added: Optional email digest (daily or weekly) sent at 9am local time, configurable recipients
* Added: "Open full calendar" link in the widget header
* Changed: Deactivation cleanly unschedules the digest cron event

= 1.2.0 =
* Added: Settings page (Settings > Scheduled Content) for item limit, included post types, default view, drafts, auto-fix toggle
* Added: Mini month calendar view with per-user preference, dots for days with scheduled posts, missed-day highlighting, and day detail
* Added: Post type + author filter dropdowns in the widget (collapsible)
* Added: Optional drafts group alongside scheduled content
* Added: "List / Calendar" view switcher per user
* Changed: Auto-fix now also respects the settings UI toggle in addition to the filter

= 1.1.0 =
* Added: Missed-schedule detection with red flagging in the widget
* Added: Auto-fix missed scheduled posts (admin-page-load cron, filterable)
* Added: One-click "Publish now" button for missed posts
* Added: Admin bar counter showing scheduled + missed post counts
* Added: "Mine only" toggle to filter the widget by current user
* Added: `scheduled_content_dashboard_auto_fix_missed` filter
* Changed: Scheduled items query skips missed posts (they render in their own group)

= 1.0.0 =
* Initial release
* Dashboard widget with grouped scheduled content
* Support for all public post types

== Upgrade Notice ==

= 2.0.0 =
Major release. Adds full editorial calendar page with drag-and-drop, REST API, and optional email digest. The plugin grows beyond "dashboard widget only", but the widget and all 1.x features still work the same way.

= 1.2.0 =
Adds settings page, mini calendar view, post type and author filters, and optional drafts display. Existing users don't need to change anything. Defaults match previous behavior.

= 1.1.0 =
Adds missed-schedule detection with auto-fix, admin bar counter, and per-user filtering. Auto-fix is on by default. Disable with the scheduled_content_dashboard_auto_fix_missed filter if you want manual control.
