I’ll look at this in a future release. I’m not an expert at WordPress programming yet, so it might take some time to figure it all out.
Please can you try this version 1.1.0 which now includes a back-end interface with enable/disable, color pickers and dashicons pickers. Phew that was a huge rewrite.
This works perfectly, except for “Scheduled”. It will show the correct background color, but not the badge and dash icon.
Thanks for the massive rewrite! It’s much appreciated.
That is a limitation of WordPress. Schedule posts do not have a “tag” appended to the title, so I can’t add the color tag for it. It’s the same for published. Only exception status values are appended to the title (which I can then convert to a tag).
I see. Let’s check if there’s a Trac ticket for this request and otherwise I’ll file it.
A complete list of post statuses are not available in the hook, only a list of the ones WordPress deems “necessary” to add to the title. I think it should actually be a list of all the statuses and then a list of the visible ones, then we can decide which ones to display/hide.
Good news! Scheduled is committed as post status for 4.3!
Which ones are still missing as (styleable) post_status?
Hey JeanPaulH
Only saw your reply now. They will only add scheduled into the list of “added to the title” so we can make it a cool tag with icon. It is currently already able to be used with a different color. As soon as it becomes available in 4.3, it should auto-magically just work, as there is already an interface for it in the backend.
The modification is however not for all post statuses, or to have a list of which to display next to a title, but just scheduled added to the title (along with draft, pending, etc.).