Automattic / Co-Authors-Plus

Multiple bylines and Guest Authors for WordPress
https://wordpress.org/plugins/co-authors-plus/
GNU General Public License v2.0
287 stars 205 forks source link

Fix missing author column in wp-admin Posts table #1038

Closed GaryJones closed 2 months ago

GaryJones commented 2 months ago

Description

In CAP 3.6.0, there was a bug that resulted in the author's column missing in wp-admin Posts table. When removing the author dropdown from the quick edit box, the old logic removed post type support for the CAP-registered author taxonomy, which has the same name as the regular author feature. This hard-hitting removal was likely due to the "inconvenient truths" documented in #1036.

The new logic has a more targeted approach - it updates the query args for getting the quick-edit authors list population to only try and include a 0, and this successfully bails the dropdown from being displayed.

Fixes #1033. Fixed #1037. Closes #1036.

Steps to Test

Use 3.6.0 tag and see that the author column is missing. Switch to the PR branch, and see that the author column is present. In both cases, the quick edit does not show the author box.

Screenshots

3.6.0

Author column not present (incorrect):

Screenshot 2024-04-25 at 16 06 22

This PR

Author column present (correct):

Screenshot 2024-04-25 at 16 06 35

Quick Edit view does not include author box (correct):

Screenshot 2024-04-25 at 16 05 50

(For comparison, here's what the view would look like with the author box - we don't want this):

Screenshot 2024-04-25 at 16 05 15
GaryJones commented 2 months ago

Tests failing for PHP 7.1 will be handled via #1034. They can be ignored for this PR.

douglas-johnson commented 2 months ago

This is working for me locally with WP 6.5.2

I think this also resolves #1037

justinmaurerdotdev commented 2 months ago

Love it. I've checked out this branch and it looks like everything works as expected.

alecgeatches commented 2 months ago

This fix has been merged and included in the 3.6.1 release!