Quick Drafts Access

Author: Scott Reilly
Version: 2.3.1
First released: 2010-09-01
Last update: 2023-08-22
Compatibility: WP 4.6 – 6.3.3
Download: [ zip ]
Description:

Adds links to 'All Drafts' and 'My Drafts' under Posts, Pages, and other custom post type sections in the admin menu.

Extended Description

By default in WordPress, accessing the drafts listing of any given post type (including posts and pages) in the admin requires multiple clicks. Then filtering the drafts listing by a particular user (generally to view only your drafts) additionally requires some non-obvious manual URL hacking.

This plugin allows you one click access to all drafts, as well as to just your drafts, of each post type via the main admin menu.

In addition, the plugin provides a count of the number of current drafts for that post type in the link (i.e. the link could read “All Drafts (3)” to indicate there are three drafts for that post type, and “My Drafts (1)” to indicate you only have one draft for that post type).

When the user is responsible for all of the drafts of a given post type (and the “My Drafts” link is not disabled via a hook) then only the “My Drafts” links will appear. It would be redundant to show both the “All Drafts” and “My Drafts” links in this situation. This behavior also ensures only one link is present for single-author blogs.

Also, the draft link(s) only appear for users who have the capability to edit posts of that post type.

The plugin hides the two types of draft links when no related drafts for that post type are present. See the Filters section for how to override this behavior. Filters are also provided to disable the plugin from ever showing the “All Drafts” or the “My Drafts” links.

On admin listings of only draft posts, this plugin also adds a dropdown above the table that allows for the listing to be filtered by the selected draft author. (Only users who actually have a draft post are included in the dropdown.)

Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage

Developer Documentation

Developer documentation can be found in DEVELOPER-DOCS.md. That documentation covers the numerous hooks provided by the plugin. Those hooks are listed below to provide an overview of what’s available.

  • c2c_quick_drafts_access_post_types : Customize the list of post_types for which the draft links will be shown
  • c2c_quick_drafts_access_show_all_drafts_menu_link : Customize whether the ‘All Drafts’ link will appear at all for a post type.
  • c2c_quick_drafts_access_show_my_drafts_menu_link : Customize whether the ‘My Drafts’ link will appear at all for a post type.
  • c2c_quick_drafts_access_show_if_empty : Customize whether the ‘All Drafts’ and/or ‘My Drafts’ links will appear for a post type when that post type currently has no drafts.
  • c2c_quick_drafts_access_disable_filter_dropdown : removal of the ‘Drafts By’ dropdown from drafts post list table.

Find out more at the plugin’s WordPress Plugin Repository page.

Screenshots

Click to see full-size image.

  1. A screenshot of the main admin menu (with the menu expanded) showing the "All Drafts" and "My Drafts" link (with pending draft counts) for both posts (in the sidebar menu popup) and pages (in the expanded sidebar menu). Note that for pages, the "All Drafts" link is not shown because the current user is responsible for all of the current page drafts.

    A screenshot of the main admin menu (with the menu expanded) showing the “All Drafts” and “My Drafts” link (with pending draft counts) for both posts (in the sidebar menu popup) and pages (in the expanded sidebar menu). Note that for pages, the “All Drafts” link is not shown because the current user is responsible for all of the current page drafts.

  2. When viewing a listing of drafts, the plugin introduces a dropdown above the posts table that allows filtering the drafts by post author.

    When viewing a listing of drafts, the plugin introduces a dropdown above the posts table that allows filtering the drafts by post author.

Installation

  1. Install via the built-in WordPress plugin installer. Or download and unzip quick-drafts-access.zip inside the plugins directory for your site (typically wp-content/plugins/)
  2. Activate the plugin through the ‘Plugins’ admin menu in WordPress

Release Log

2.3.1 (2023-04-29)

  • Change: Note compatibility through WP 6.3+
  • Change: Update copyright date (2023)
  • Fix: Fix typo for link to DEVELOPER-DOCS.md in README.md
  • Fix: Fix typo in readme.txt
  • New: Add a possible TODO item

2.3 (2021-09-22)

  • New: Add DEVELOPER-DOCS.md and move hooks documentation into it
  • Change: Only support public post types, but also exclude ‘attachment’
  • Change: Improve and tweak developer documentation and code examples
  • Change: Note compatibility through WP 5.8+
  • Unit tests:
    • New: Add setUp(), namely to actually register post types
    • Change: Test support for actual post types
    • Change: Change c2c_quick_drafts_access_post_types() to actual use the post types sent to it
    • Change: Restructure unit test directories
      • Change: Move bin/ into tests/
      • Change: Move tests/ into tests/phpunit/
      • Change: Move unit test file into tests/phpunit/tests/
    • Change: Remove ‘test-‘ prefix from unit test file
    • Change: Rename phpunit.xml to phpunit.xml.dist per best practices
    • Change: In bootstrap, store path to plugin file constant
    • Change: In bootstrap, add backcompat for PHPUnit pre-v6.0
  • New: Add a possible TODO item

2.2.4 (2021-03-27)

  • Fix: Fix plugin name defined in README.md
  • Change: Note compatibility through WP 5.7+
  • Change: Update copyright date (2021)

Copyright & Disclaimer

Copyright © 2010-2024 by Scott Reilly (aka coffee2code)

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Discussion / Support

Have any questions, comments, or suggestions? Please provide them via the plugin’s WordPress.org support forum. I’ll do my best to reply in a timely fashion and help as best I can.

Unfortunately, I cannot provide guaranteed support, nor do I provide support via any other means.

Was this plugin useful useful to you? Consider giving it a rating. If you’re inclined to give it a poor rating, please first post to the support forum to give me a chance to address or explain the situation.