1.29.0 - The block editor stops deleting primary terms and unpublish dates
Version 1.29.0 brings two per-post controls to the block editor that only ever existed in the classic one — the primary term picker and the unpublish date — and gives the terms block a primary-term option. Both controls had the same thing wrong with them, and it was worse than their absence: a save in the block editor deleted the value the classic editor had stored.
- [NEW FEATURE] Adds a Primary term list to the block editor, inside each hierarchical taxonomy's own panel, under the checklist it refers to. It lists the terms currently ticked and offers Make primary on each, with Clear on the one already chosen. It appears only when two or more terms are ticked — with one, there is nothing to choose between.
- [NEW FEATURE] Adds the Unpublish Date field to the block editor's Summary panel, beside the post's status and publish date, where the classic editor puts it in the Publish metabox. It takes and shows site-local time, stores GMT, resolves daylight saving for the date chosen rather than today's, refuses a date that has already passed, and schedules the same
Yoko\UnpublishPostaction either editor always did. See Unpublish Feature. - [NEW FEATURE] Adds a Primary Term option to the core/post-terms block: render every term as usual, the primary term first, or the primary term only. Set per block, so one template can lead with the primary term while another lists everything. A post without a primary term is unaffected — it renders every term rather than rendering nothing.
- [FIX] A save that was not the classic editor's own form no longer clears the stored value — for both per-post controls.
save_postfires for every save, and none but that form carries the field, so each handler read "no field posted" as "the editor cleared it" and deleted the meta. The block editor, WP-CLI, quick edit, and any plugin callingwp_update_post()all wiped a primary term or a scheduled unpublish date just by saving the post. - [FIX] A rejected unpublish date no longer cancels the unpublishing that was already scheduled. Setting a date in the past was refused, correctly — but the pending action had already been cancelled by then, so the post kept advertising a date nothing would ever act on.
- [IMPROVEMENT] Adds
YokoCo\PrimaryTaxTerm::get_primary_terms( $post_id ), which returns only pairs whose term is still assigned to the post, and theyoko_primary_term_taxonomiesfilter.
On any site using the block editor, primary terms set in the classic editor have most likely already been lost — a single save was enough, with nothing to indicate it. The same is true of any scheduled unpublish date. This release stops the bleeding, but it cannot bring back values that are gone. On a site that relies on primary-term: body classes or the new terms block option, it is worth spot-checking the posts that matter; for unpublishing, Tools > Scheduled Actions shows what is still pending.
Taxonomies in the consolidated panel
A taxonomy pulled into the Consolidated Taxonomy Panel does not get the primary term control, and does not need it: its own panel is hidden and the control lives inside that panel, so it goes with it. Anything already stored keeps working, and comes back into view if the taxonomy is taken out of the panel again.
The unpublish date needs ACF
The whole feature is gated on Advanced Custom Fields, in both editors — the post types that offer it are chosen under Settings > Writing, and that setting only exists when ACF is active. Where ACF is present, the block editor now hides ACF's own "Scheduled Unpublishing" metabox: two controls for one value fought each other, because the block editor saves the post first and posts its metaboxes second.
Full documentation: Primary Category, the block option and Unpublish Feature.