#15406 closed enhancement (wontfix)
Add a pending post count indicator to the admin menu
Reported by: | iign | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | trivial | Version: | 3.0.1 |
Component: | Posts, Post Types | Keywords: | has-patch |
Focuses: | ui, administration | Cc: |
Description
Comments has an indicator bubble on the dashboard with the pending comments count.
Pending posts should have such a feature, since they are quite more important.
Attachments (2)
Change History (16)
#1
@
14 years ago
- Keywords 2nd-opinion added; pending posts removed
- Milestone changed from Awaiting Review to Future Release
#4
@
12 years ago
- Component changed from UI to Administration
- Keywords ui-focus added
- Milestone changed from Future Release to Awaiting Review
- Summary changed from Pending posts indicator not showing in menu to Add a pending post count indicator to the admin menu
Not totally sure what constitutes a pending post, especially once various post statuses are thrown into the mix.
#5
@
11 years ago
I like this idea. I'd consider a pending post one with the "Pending Review" status. Shown only for users who can publish_posts
, this would serve a similar function to the comment count. It indicates that there are posts from contributors that are awaiting review and must be approved/published or reverted to drafts.
#6
@
11 years ago
- Component changed from Administration to Posts, Post Types
- Focuses administration added
#7
@
10 years ago
- Keywords needs-patch added; 2nd-opinion removed
- Milestone changed from Awaiting Review to Future Release
#8
@
10 years ago
- Keywords has-patch added; needs-patch removed
I'm attaching a patch that introduces a new function called pending_posts_bubble()
(naming convention suggestions anyone?) that when passed a post type slug, returns:
NULL
if the post type doesn't exist.false
if the current user is not capable of publishing posts from that post type.- empty string if there are no pending posts.
- HTML string for the bubble containing the number of pending posts.
Behind the scenes the function uses wp_count_posts()
- that seemed like the most appropriate existing function to use.
pending_posts_bubble()
is then called in the appropriate places in wp-admin/menu.php
.
In the screenshot below you can see that the bubble is pretty much the standard one(as seen on the Plugins menu item).
#9
@
10 years ago
I updated the patch, since the original one was created from /src/wp-admin/ directory instead of from / .
#10
@
10 years ago
- Milestone Future Release deleted
- Resolution set to wontfix
- Status changed from new to closed
I think I'd rather not make this a core thing - not everybody uses the various pending post statuses the same way, and unlike updates or comments awaiting moderation, they need not inherently be actionable. For instance, I store a lot of things as draft posts with no intention of ever publishing them, and the indicator would just be more visual noise. If something needs to be added to enable devs to do this should they want to, perhaps that's worth exploring, as certainly there do exist sites and post types that use pending posts as actionable items.
#11
follow-ups:
↓ 12
↓ 13
@
10 years ago
Hi @helen , would it make sense to implement this feature and make it an option that could be enabled/disabled as a setting? I think it makes sense for WordPress to have this feature within Core. I believe most people write drafts to eventually publish them. For those who don't want a 'pending post indicator', they could disable it in their settings.
What's your take? Thanks -- Alex
#12
in reply to:
↑ 11
@
10 years ago
Replying to Satri:
would it make sense to implement this feature and make it an option that could be enabled/disabled as a setting?
I would be very much against making this any kind of UI setting. I think this is far too individual to a given site or user's workflow to make sense as a higher level core API.
#13
in reply to:
↑ 11
;
follow-up:
↓ 14
@
9 years ago
Replying to Satri:
Hi @helen , would it make sense to implement this feature and make it an option that could be enabled/disabled as a setting? I think it makes sense for WordPress to have this feature within Core. I believe most people write drafts to eventually publish them. For those who don't want a 'pending post indicator', they could disable it in their settings.
What's your take? Thanks -- Alex
I wish this was a core feature too. I couldn't even find a plugin to do this kind of useful trick for pending posts / questions ( Custom Post Type ) when people post something from the front-end, and it requires a moderation by the admin. I know we receive email notifications based on new posts or questions visitors make from the front-end but I think this would be nice to have this option in core of WP as well as Satri suggested.
@Satri. By the way, I found this useful article regarding WP Menu Bauble Notifivation
https://wisdmlabs.com/blog/display-dashboard-notifications-custom-post-types-menus/
#14
in reply to:
↑ 13
@
9 years ago
Replying to LukeSeven:
@Satri. By the way, I found this useful article regarding WP Menu Bauble Notifivation
https://wisdmlabs.com/blog/display-dashboard-notifications-custom-post-types-menus/
Thanks @LukeSeven for sharing this link, I hope the solution will be built _into_ WordPress since I suspect a large majority of WordPress admins would be happy to benefit from this feature :-) Take care -- Alex
Not sure how to integrate this code into the core menu functions, but here's a workaround I'm currently using, which should demonstrate what's missing in the current menu output: