﻿=== DZIEWA Publications Planner and Organiser ===
Contributors: putiek
Donate link: https://buycoffee.to/rdziewa
Tags: calendar, editorial, schedule, posts, planning
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Editorial calendar for WordPress: see and manage your whole publishing week at a glance — schedule, drag, edit, duplicate — without leaving wp-admin.

== Description ==

**DZIEWA Publications Planner and Organiser** gives editors and content managers a Monday–Sunday calendar view of all scheduled and draft posts, so you always know what is going out and when. Instead of scrolling through the standard posts list and guessing what belongs to which day, you open a single screen and see the whole week.

**See the full week at once**
A seven-column grid runs Monday to Sunday with the current week highlighted. Previous and next weeks load as previews only when you click **Show previous week** / **Show next week** — the calendar never fetches more from the database than you actually need.

**Filter by category, colour-code your content types**
Pick a category from the filter bar to focus on one topic. Assign a custom colour to any category under Posts → Categories → Edit — cards in that category show the colour, so you can read the schedule at a glance without reading every title.

**Quick Edit without leaving the calendar**
Click the edit icon on any card to open a modal where you can change the title, publish date, time, categories, and tags. Save and the card updates in place — no full page reload.

**Duplicate posts in one click**
Create a copy of any post as a draft or as a new scheduled entry straight from the calendar card. Useful for recurring content, templates, or rescheduled pieces.

**Drag drafts onto the calendar**
The drafts sidebar lists your unscheduled posts. Drag any draft onto a day column and the plugin schedules it for that day, placing it at the right time based on where you drop it.

**Keyboard navigation**
Press ← or → when the week strip has focus to jump to the previous or next week without touching the mouse.

**Completely free**
No paid version. No feature gating. No subscription. No in-plugin upsells. The plugin does what it says and nothing else.

**Author:** Rafał Dziewa — https://dziewa.pl

== Installation ==

1. Upload the `dziewa-publications-planner-and-organiser` folder to `/wp-content/plugins/`, or install the ZIP from **Plugins → Add New → Upload Plugin**.
2. Activate the plugin through the **Plugins** menu.
3. Go to **Posts → DZIEWA Publications Planner** to open the calendar.

== Frequently Asked Questions ==

= Does this plugin change the front end of my site? =

No. The calendar is an admin-only screen under the Posts menu. It adds nothing to your theme or public pages.

= What language does the interface use? =

Source strings are **English** (gettext, text domain `dziewa-publications-planner-and-organiser`). WordPress loads language packs from WordPress.org automatically when available. The plugin also ships a compiled Polish translation in its `languages/` folder. You can add your own translation with Poedit or Loco Translate, or place a `.mo` file under `wp-content/languages/plugins/`.

= The calendar feels slow on my site — can I reduce the number of posts loaded? =

The week query uses a default cap of **2000 posts** per visible week. To raise or remove the limit, add this to your theme's `functions.php` or a must-use plugin:

`add_filter( 'DZIEWA_PUBLICATIONS_PLANNER_AND_ORGANISER_max_posts_per_week_query', '__return_zero' );`

Returning `0` removes the cap entirely. Return any positive integer to set a custom limit.

= Where is the REST API? =

The plugin registers routes under `dziewa-publications-planner-and-organiser/v1`. Endpoints handle drag-and-drop rescheduling, Quick Edit, duplicate, trash, tag autocomplete, and lazy week preview. All requests require the appropriate WordPress capabilities and a valid REST nonce — no public access.

= Can I customise the calendar with my own CSS or hooks? =

Yes. The plugin applies a `dpc-calendar-screen` class to the admin body on the calendar page, so you can target it in your admin stylesheet. PHP developers can hook into `DZIEWA_PUBLICATIONS_PLANNER_AND_ORGANISER_item_html` to modify card output, `DZIEWA_PUBLICATIONS_PLANNER_AND_ORGANISER_category_pill_text_color` to override pill contrast, and `DZIEWA_PUBLICATIONS_PLANNER_AND_ORGANISER_max_posts_per_week_query` to control the query limit.

== Screenshots ==

1. Week view with the current week highlighted, category filter bar, and drafts sidebar on the right.
2. Category colour picker in Posts → Categories → Edit category.
3. Quick Edit modal — change title, date, time, categories, and tags without leaving the calendar.

== Changelog ==

= 1.0.0 =
* First release.
* Monday–Sunday week grid; current week highlighted; previous and next weeks load lazily on demand.
* Category filter bar; custom colour per category (set in Posts → Categories).
* Quick Edit modal for title, date, time, categories, and tags; inline title and tag editing directly on cards.
* Drag drafts from the sidebar onto a day column to schedule them.
* Duplicate any post as a draft or a new scheduled entry.
* Keyboard navigation (← / →) on the week strip.
* REST API under `dziewa-publications-planner-and-organiser/v1` for all calendar actions.
* Default post cap of 2000 per week query; configurable via `DZIEWA_PUBLICATIONS_PLANNER_AND_ORGANISER_max_posts_per_week_query` filter.
* Polish translation bundled (`pl_PL`).
* WordPress.org directory compliance: translations loaded by core (WP 4.6+; no redundant `load_plugin_textdomain`); calendar week/category GET uses nonces; legacy redirect builds a safe allowlisted query; unique `dziewaPublicationsPlanner*` JavaScript globals; admin REST helper `dziewa-publications-planner-admin-rest-api.js`; inline calendar CSS sanitized with `wp_strip_all_tags`.
