WordPress.org

Make WordPress Core

Opened 14 months ago

Last modified 2 months ago

#24284 new enhancement

is_multi_author() should query by specific post type and status

Reported by: alex-ye Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords: needs-patch
Focuses: Cc:

Description

Current is_multi_author() function only checks by the 'post' post-type and 'publish' post-status..

I think the function should be able to query by custom-post-type and custom-post-status

Attachments (1)

author-templates.patch (2.6 KB) - added by alex-ye 14 months ago.
First Try :)

Download all attachments as: .zip

Change History (3)

alex-ye14 months ago

First Try :)

comment:1 SergeyBiryukov14 months ago

Note that the function is filterable (#18600), so a workaround is currently possible.

comment:2 cais2 months ago

Good thing I searched first, although this is not what I had in mind ...

... looking through my notes for some feature ideas I happened across the is_multi_author function and thought I might put it to use, at least until I saw it was basically incomplete for a standard WordPress installation. It would be negligent to think WordPress installations could only be filled with posts for multiple authors. I would actually more expect to see multiple authors when the installation is only filled with pages and looking at this function as is, it only queries for posts and ignores the possibility another author may only write pages, or that the site only contains pages and no posts.

Modifying the query should be easy enough to also take into account pages

Note: See TracTickets for help on using tickets.