Added
- Add an
--append_coauthorsflag to thewp co-authors-plus assign-user-to-coauthorWP-CLI command, allowing the new co-author to be appended rather than skipping any post that already has co-authors assigned by @RobjS and @GaryJones in #1264 and #1267 - Accept
--user_idas an alternative to--user_loginonwp co-authors-plus assign-user-to-coauthor, so posts whosepost_authorreferences a user that no longer exists (orphaned posts) can be reassigned to a co-author by @GaryJones in #1266 - Add
--offsetand--numberparameters to thewp co-authors-plus create-guest-authorsWP-CLI command, so guest-author creation can be run in resumable chunks across large user bases by @aaronjorbin in #378 - Add a column to the Users list table showing each user's linked guest author, clarifying why a linked account's post count differs by @jeherve in #502
- Add contextual Screen Help tabs to the Guest Author admin screens, explaining linked accounts, slugs, the Posts column, and the delete reassignment options by @GaryJones in #1272
- Honour Yoast SEO's author-archive indexing setting (
noindex-author-wpseo), so toggling "Show author archives in search results" off is respected on co-author archive pages by @mchanDev in #1062 - Add a
coauthors_plus_is_author_queryfilter so a specificWP_Querycan opt out of the co-author taxonomy rewrite and run as a standardpost_authorquery by @faisalahammad in #1304
Changed
- Memoise
supported_post_types()so the supported-post-type list is computed once per request rather than rebuilt on each of its many calls by @douglas-johnson and @GaryJones in #1307
Fixed
- Honour the Archive Title block's
showPrefixtoggle on author archive pages so the "Author:" prefix can be hidden in block themes by @GaryJones in #1259 - Restrict the guest-author "Linked Account" dropdown to users with the
edit_postscapability, preventing the dropdown from rendering hundreds of thousands of subscribers and crashing the browser on large sites by @leogermani in #941 - Guard
get_current_screen()calls to prevent a fatal error when admin code runs in early-init contexts where the current screen has not yet been set by @faisalahammad in #1260 - Sync
post_authorto the assigned co-author on REST save beforewp_insert_postfires, so the value Jetpack Sync ships is correct on the first save and the newsletter preview no longer shows the post creator until a second save by @GaryJones in #1273 - Keep
post_authorpointing at the first co-author after reordering co-authors in the block editor, sothe_author(), the RESTauthorfield, and author archives reflect the new order by @GaryJones in #1298 - Normalise the block editor's co-author entity-store values to term IDs, fixing the empty
/authors-by-term-idsresponses and permanent sidebar spinner that appeared where the store returned full author objects by @faisalahammad in #1283 - Keep the block editor's "Select An Author" combobox populated with the alphabetical author list before a search is typed, so it no longer shows "No items found" on focus or after clearing the query by @faisalahammad in #1305
- Preserve feed query flags when clearing conflicting flags on guest-author pages, so author feed URLs like
/author/USERNAME/feed/are served as feeds rather than the HTML archive by @faisalahammad in #1303 - Render the posts list table's Authors column from the row's post ID rather than the global
$post, fixing a warning and blank column when the list is built from a programmaticWP_Query(for example Admin Columns exports) by @justinmaurerdotdev and @GaryJones in #1309 - Refresh a co-author's search term and clear its cached author term when the linked user's profile changes, so author search stays current on sites with a persistent object cache by @GaryJones in #1312
- Guard against
get_post_type_object()returningnullwhen thecoauthors_supported_post_typesfilter restricts the plugin to a single custom post type, avoiding PHP warnings by @garubi in #1114 - Guard against a missing post or ID in Yoast's
filter_graphcontext, preventing PHP warnings when a post type is excluded from the Yoast index by @mattwatsoncodes in #1125
Maintenance
- Move hook registration out of the plugin's class constructors, so instantiating
CoAuthors_Plus,CoAuthors_Guest_Authors, the REST endpoints, and the template filters no longer mutates the global hook registry as a side effect by @GaryJones in #1316 - Resolve Plugin Check (PCP) violations across the codebase: add
ABSPATHdirect-access guards, escape_deprecated_hook()message strings, add translator comments for blocksprintf()calls, migrateget_terms()to the single-array signature, and harden input sanitisation by @faisalahammad in #1284, #1285, #1286, #1287, #1288 and #1289 - Restructure the PHP test suite into feature-focused files and sub-directories, and add a WordPress-free unit test layer by @GaryJones in #1317 and #1319
- Fix and enforce the JS and CSS lint baseline so ESLint and Stylelint can fail CI again by @GaryJones in #1318
- Update development dependencies by @dependabot
Documentation
- Add missing PHPDocs to four legacy template-tag and upgrade functions by @GaryJones in #1265
New Contributors
- @aaronjorbin made their first contribution in #378
- @jeherve made their first contribution in #502
- @mchanDev made their first contribution in #1062
- @garubi made their first contribution in #1114
- @mattwatsoncodes made their first contribution in #1125
- @justinmaurerdotdev made their first contribution in #1309
Full Changelog: 4.0.2...4.1.0